From 7107ded3cd7d1ef7ba56e9a8077843d0542b2098 Mon Sep 17 00:00:00 2001 From: Alexander <4584443+DragonStuff@users.noreply.github.com> Date: Sat, 28 Aug 2021 11:01:09 +0900 Subject: fix(ci): only cancel previous in-progress workflow of the same group --- .github/workflows/binary_test.yml | 50 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/binary_test.yml (limited to '.github/workflows/binary_test.yml') diff --git a/.github/workflows/binary_test.yml b/.github/workflows/binary_test.yml new file mode 100644 index 000000000..467332359 --- /dev/null +++ b/.github/workflows/binary_test.yml @@ -0,0 +1,50 @@ +name: Cross-platform binary build test + +on: + push: + pull_request: + workflow_dispatch: [] + +concurrency: + group: ${{ github.head_ref }}/binary_test + cancel-in-progress: true + +jobs: + + build: + name: Build + runs-on: ubuntu-latest + strategy: + matrix: + goos: [linux, windows, darwin, freebsd, netbsd, openbsd] + goarch: [amd64, arm, arm64, 386, ppc64le, s390x] + exclude: + - goarch: arm + goos: darwin + - goarch: 386 + goos: darwin + - goarch: ppc64le + goos: darwin + - goarch: s390x + goos: darwin + - goarch: arm + goos: windows + - goarch: arm64 + goos: windows + - goarch: ppc64le + goos: windows + - goarch: s390x + goos: windows + + steps: + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Go cross-platform build test + uses: thatisuday/go-cross-build@v1 + with: + platforms: ${{ matrix.goos }}/${{ matrix.goarch }} + package: 'weed' + name: 'weed' + dest: '/tmp/dist' -- cgit v1.2.3 From b68e76bbace24528d0c4d8c75ac9b706a94b0369 Mon Sep 17 00:00:00 2001 From: Alexander <4584443+DragonStuff@users.noreply.github.com> Date: Sat, 28 Aug 2021 11:10:15 +0900 Subject: fix(ci): only cancel previous in-progress workflow of the same group --- .github/workflows/binary_test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.github/workflows/binary_test.yml') diff --git a/.github/workflows/binary_test.yml b/.github/workflows/binary_test.yml index 467332359..87e3347a0 100644 --- a/.github/workflows/binary_test.yml +++ b/.github/workflows/binary_test.yml @@ -5,10 +5,6 @@ on: pull_request: workflow_dispatch: [] -concurrency: - group: ${{ github.head_ref }}/binary_test - cancel-in-progress: true - jobs: build: @@ -36,6 +32,10 @@ jobs: - goarch: s390x goos: windows + concurrency: + group: ${{ github.head_ref }}/binary_test/${{ matrix.goos }}/${{ matrix.goarch }} + cancel-in-progress: true + steps: - name: Check out code into the Go module directory -- cgit v1.2.3 From b4de7c09e77ca49da9cb58966b0678a5164c2984 Mon Sep 17 00:00:00 2001 From: Alexander <4584443+DragonStuff@users.noreply.github.com> Date: Sat, 28 Aug 2021 11:17:03 +0900 Subject: feature(ci): simplify go binary test build --- .github/workflows/binary_test.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to '.github/workflows/binary_test.yml') diff --git a/.github/workflows/binary_test.yml b/.github/workflows/binary_test.yml index 87e3347a0..b575c9612 100644 --- a/.github/workflows/binary_test.yml +++ b/.github/workflows/binary_test.yml @@ -38,13 +38,22 @@ jobs: steps: + - name: Set up Go 1.x + uses: actions/setup-go@v2 + with: + go-version: ^1.13 + id: go + - name: Check out code into the Go module directory uses: actions/checkout@v2 - - name: Go cross-platform build test - uses: thatisuday/go-cross-build@v1 - with: - platforms: ${{ matrix.goos }}/${{ matrix.goarch }} - package: 'weed' - name: 'weed' - dest: '/tmp/dist' + - name: Get dependencies + run: | + cd weed; go get -v -t -d ./... + if [ -f Gopkg.toml ]; then + curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh + dep ensure + fi + + - name: Build + run: cd weed; GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -v . -- cgit v1.2.3 From 46e78e9b3ef7b3a48553411ff56ef2dcf54ea5b3 Mon Sep 17 00:00:00 2001 From: Alexander <4584443+DragonStuff@users.noreply.github.com> Date: Sat, 28 Aug 2021 11:19:33 +0900 Subject: fix(ci): allow test job to continue on error --- .github/workflows/binary_test.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.github/workflows/binary_test.yml') diff --git a/.github/workflows/binary_test.yml b/.github/workflows/binary_test.yml index b575c9612..aa7d3dbf4 100644 --- a/.github/workflows/binary_test.yml +++ b/.github/workflows/binary_test.yml @@ -57,3 +57,4 @@ jobs: - name: Build run: cd weed; GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -v . + continue-on-error: true -- cgit v1.2.3 From 5a10f27c8d599a15779358023330928c3b19da3c Mon Sep 17 00:00:00 2001 From: Alexander <4584443+DragonStuff@users.noreply.github.com> Date: Sat, 28 Aug 2021 11:23:20 +0900 Subject: fix(ci): remove ppc64le and s390x support --- .github/workflows/binary_test.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to '.github/workflows/binary_test.yml') diff --git a/.github/workflows/binary_test.yml b/.github/workflows/binary_test.yml index aa7d3dbf4..ed138ca31 100644 --- a/.github/workflows/binary_test.yml +++ b/.github/workflows/binary_test.yml @@ -13,24 +13,16 @@ jobs: strategy: matrix: goos: [linux, windows, darwin, freebsd, netbsd, openbsd] - goarch: [amd64, arm, arm64, 386, ppc64le, s390x] + goarch: [amd64, arm, arm64, 386] exclude: - goarch: arm goos: darwin - goarch: 386 goos: darwin - - goarch: ppc64le - goos: darwin - - goarch: s390x - goos: darwin - goarch: arm goos: windows - goarch: arm64 goos: windows - - goarch: ppc64le - goos: windows - - goarch: s390x - goos: windows concurrency: group: ${{ github.head_ref }}/binary_test/${{ matrix.goos }}/${{ matrix.goarch }} -- cgit v1.2.3 From 6850252e7c9067ab4204d8f010bedd0533d4eb5d Mon Sep 17 00:00:00 2001 From: Alexander <4584443+DragonStuff@users.noreply.github.com> Date: Sat, 28 Aug 2021 11:23:49 +0900 Subject: revert(ci): remove continue-on-error --- .github/workflows/binary_test.yml | 1 - 1 file changed, 1 deletion(-) (limited to '.github/workflows/binary_test.yml') diff --git a/.github/workflows/binary_test.yml b/.github/workflows/binary_test.yml index ed138ca31..288abc848 100644 --- a/.github/workflows/binary_test.yml +++ b/.github/workflows/binary_test.yml @@ -49,4 +49,3 @@ jobs: - name: Build run: cd weed; GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -v . - continue-on-error: true -- cgit v1.2.3 From bfb66b88b1d714c2d24e0de0f35fb807e381fa25 Mon Sep 17 00:00:00 2001 From: Alexander <4584443+DragonStuff@users.noreply.github.com> Date: Sun, 29 Aug 2021 12:02:58 +0900 Subject: fix(ci): do not run on mainline branch --- .github/workflows/binary_test.yml | 4 ++++ 1 file changed, 4 insertions(+) (limited to '.github/workflows/binary_test.yml') diff --git a/.github/workflows/binary_test.yml b/.github/workflows/binary_test.yml index 288abc848..1cad91f82 100644 --- a/.github/workflows/binary_test.yml +++ b/.github/workflows/binary_test.yml @@ -2,6 +2,10 @@ name: Cross-platform binary build test on: push: + branches-ignore: + - master + tags-ignore: + - * pull_request: workflow_dispatch: [] -- cgit v1.2.3 From 7cfaa1a3652fc6703402cb5699ec674f14337ec8 Mon Sep 17 00:00:00 2001 From: Alexander <4584443+DragonStuff@users.noreply.github.com> Date: Sun, 29 Aug 2021 12:06:10 +0900 Subject: fix(ci): further testing of CI logic --- .github/workflows/binary_test.yml | 5 ----- 1 file changed, 5 deletions(-) (limited to '.github/workflows/binary_test.yml') diff --git a/.github/workflows/binary_test.yml b/.github/workflows/binary_test.yml index 1cad91f82..d9e726292 100644 --- a/.github/workflows/binary_test.yml +++ b/.github/workflows/binary_test.yml @@ -1,11 +1,6 @@ name: Cross-platform binary build test on: - push: - branches-ignore: - - master - tags-ignore: - - * pull_request: workflow_dispatch: [] -- cgit v1.2.3 From aeda4be42c53d8a8f0c02c4be07877c3d0fda1b0 Mon Sep 17 00:00:00 2001 From: Alexander <4584443+DragonStuff@users.noreply.github.com> Date: Sun, 29 Aug 2021 12:12:30 +0900 Subject: fix(ci): use cleaner naming for jobs --- .github/workflows/binary_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows/binary_test.yml') diff --git a/.github/workflows/binary_test.yml b/.github/workflows/binary_test.yml index 288abc848..f1f911dc9 100644 --- a/.github/workflows/binary_test.yml +++ b/.github/workflows/binary_test.yml @@ -1,4 +1,4 @@ -name: Cross-platform binary build test +name: "go: test building cross-platform binary" on: push: -- cgit v1.2.3