From 26fdba6049501403cf3de29feb45971b7aa16ad5 Mon Sep 17 00:00:00 2001 From: Toby Date: Tue, 29 Aug 2023 20:15:27 -0700 Subject: [PATCH] ci: build all platforms --- .github/workflows/dev-build-hy2.yml | 18 ++++++++--------- platforms.txt | 30 +++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 10 deletions(-) create mode 100644 platforms.txt diff --git a/.github/workflows/dev-build-hy2.yml b/.github/workflows/dev-build-hy2.yml index 3577063..885ab00 100644 --- a/.github/workflows/dev-build-hy2.yml +++ b/.github/workflows/dev-build-hy2.yml @@ -1,12 +1,11 @@ -name: "Build WIP Hysteria 2" +name: "Build Hysteria 2" on: push: branches: - - 'wip-hy2' + - "wip-hy2" jobs: - build: name: Build runs-on: ubuntu-latest @@ -14,27 +13,26 @@ jobs: ACTIONS_ALLOW_UNSECURE_COMMANDS: true steps: - - name: Check out uses: actions/checkout@v3 - name: Setup Go uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: "1.21" - name: Setup Python # This is for the build script uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: "3.11" - name: Run build script - env: - HY_APP_PLATFORMS: 'windows/amd64,linux/amd64,linux/arm64,darwin/amd64,darwin/arm64' - run: 'python hyperbole.py build -r' + run: | + export HY_APP_PLATFORMS=$(sed 's/\r$//' platforms.txt | awk '!/^#/ && !/^$/' | paste -sd ",") + python hyperbole.py build -r - name: Archive uses: actions/upload-artifact@v3 with: name: hy2-wip-${{ github.sha }} - path: build \ No newline at end of file + path: build diff --git a/platforms.txt b/platforms.txt new file mode 100644 index 0000000..af4b781 --- /dev/null +++ b/platforms.txt @@ -0,0 +1,30 @@ +# This file controls what platform/architecture combinations we build for a release. + +# Windows +windows/amd64 +windows/amd64-avx +windows/386 +windows/arm64 + +# macOS +darwin/amd64 +darwin/amd64-avx +darwin/arm64 + +# Linux +linux/amd64 +linux/amd64-avx +linux/386 +linux/arm +linux/armv5 +linux/arm64 +linux/s390x +linux/mipsle +linux/mipsle-sf + +# FreeBSD +freebsd/amd64 +freebsd/amd64-avx +freebsd/386 +freebsd/arm +freebsd/arm64