From 3fddbefdb51ad5be5ead6cac533d3c04da4a9a8f Mon Sep 17 00:00:00 2001 From: Alexander <4584443+DragonStuff@users.noreply.github.com> Date: Sat, 28 Aug 2021 09:59:23 +0900 Subject: [PATCH 01/14] fix(ci): seaweedfs does not build for ppc or z-kernel systems --- .github/workflows/container_latest.yml | 4 ++-- .github/workflows/container_release.yml | 4 ++-- .github/workflows/container_test.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/container_latest.yml b/.github/workflows/container_latest.yml index b55922df9..9626c9375 100644 --- a/.github/workflows/container_latest.yml +++ b/.github/workflows/container_latest.yml @@ -55,7 +55,7 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile - platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} @@ -109,6 +109,6 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile.go_build - platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} diff --git a/.github/workflows/container_release.yml b/.github/workflows/container_release.yml index 1b155b7bd..5e7fb506f 100644 --- a/.github/workflows/container_release.yml +++ b/.github/workflows/container_release.yml @@ -58,7 +58,7 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile.go_build - platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} build-large: @@ -113,6 +113,6 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile.go_build_large - platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} diff --git a/.github/workflows/container_test.yml b/.github/workflows/container_test.yml index dbb542e54..76e46ff80 100644 --- a/.github/workflows/container_test.yml +++ b/.github/workflows/container_test.yml @@ -39,6 +39,6 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile - platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} From 4f452b71c9d84c52794e66cd84730e6618a405dc Mon Sep 17 00:00:00 2001 From: Alexander <4584443+DragonStuff@users.noreply.github.com> Date: Sat, 28 Aug 2021 10:32:35 +0900 Subject: [PATCH 02/14] feature(ci): add additional platforms to release --- .github/workflows/release.yml | 14 +++++++++++--- .github/workflows/release_binaries.yml | 16 ++++++++++++++-- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 41ac40dc2..85f746c25 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,16 +11,24 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - goos: [linux, windows, darwin, freebsd, netbsd, openbsd ] - goarch: [amd64, arm, arm64, 386] + 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: arm + - goarch: ppc64le + goos: windows + - goarch: s390x goos: windows steps: diff --git a/.github/workflows/release_binaries.yml b/.github/workflows/release_binaries.yml index ca3457c8b..ff8f98c63 100644 --- a/.github/workflows/release_binaries.yml +++ b/.github/workflows/release_binaries.yml @@ -15,13 +15,25 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - goos: [linux, windows, darwin, freebsd ] - goarch: [amd64, arm] + 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 represent a sequence of tasks that will be executed as part of the job steps: From ba45852ca5b090ac81d17ac45e9f8f591dbaf372 Mon Sep 17 00:00:00 2001 From: Alexander <4584443+DragonStuff@users.noreply.github.com> Date: Sat, 28 Aug 2021 10:35:02 +0900 Subject: [PATCH 03/14] revert(ci): re-add platforms since builds were added --- .github/workflows/container_latest.yml | 4 ++-- .github/workflows/container_release.yml | 4 ++-- .github/workflows/container_test.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/container_latest.yml b/.github/workflows/container_latest.yml index 9626c9375..b55922df9 100644 --- a/.github/workflows/container_latest.yml +++ b/.github/workflows/container_latest.yml @@ -55,7 +55,7 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile - platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} @@ -109,6 +109,6 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile.go_build - platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} diff --git a/.github/workflows/container_release.yml b/.github/workflows/container_release.yml index 5e7fb506f..1b155b7bd 100644 --- a/.github/workflows/container_release.yml +++ b/.github/workflows/container_release.yml @@ -58,7 +58,7 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile.go_build - platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} build-large: @@ -113,6 +113,6 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile.go_build_large - platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} diff --git a/.github/workflows/container_test.yml b/.github/workflows/container_test.yml index 76e46ff80..dbb542e54 100644 --- a/.github/workflows/container_test.yml +++ b/.github/workflows/container_test.yml @@ -39,6 +39,6 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile - platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} From ee52f29c3315443b85ef67113dd68ab1853cf1f8 Mon Sep 17 00:00:00 2001 From: Alexander <4584443+DragonStuff@users.noreply.github.com> Date: Sat, 28 Aug 2021 10:53:24 +0900 Subject: [PATCH 04/14] feature(ci): recognise more arches and add build tests --- .github/workflows/container_release.yml | 1 + .github/workflows/container_test.yml | 1 + .github/workflows/release_test.yml | 46 +++++++++++++++++++++++++ docker/Dockerfile | 4 ++- 4 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release_test.yml diff --git a/.github/workflows/container_release.yml b/.github/workflows/container_release.yml index 1b155b7bd..3c66c7215 100644 --- a/.github/workflows/container_release.yml +++ b/.github/workflows/container_release.yml @@ -1,4 +1,5 @@ name: Build Release Containers + on: push: tags: diff --git a/.github/workflows/container_test.yml b/.github/workflows/container_test.yml index dbb542e54..7ba460cf2 100644 --- a/.github/workflows/container_test.yml +++ b/.github/workflows/container_test.yml @@ -1,4 +1,5 @@ name: Test Building Container Images + on: push: pull_request: diff --git a/.github/workflows/release_test.yml b/.github/workflows/release_test.yml new file mode 100644 index 000000000..d99d40620 --- /dev/null +++ b/.github/workflows/release_test.yml @@ -0,0 +1,46 @@ +name: Build Dev Binaries + +on: + push: + pull_request: + workflow_dispatch: [] + +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' diff --git a/docker/Dockerfile b/docker/Dockerfile index cf8eac251..d2c365c29 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -8,7 +8,9 @@ RUN \ elif [ $(uname -m) == "x86_64" ] && [ $(getconf LONG_BIT) == "32" ]; then echo "386"; \ elif [ $(uname -m) == "aarch64" ]; then echo "arm64"; \ elif [ $(uname -m) == "armv7l" ]; then echo "arm"; \ - elif [ $(uname -m) == "armv6l" ]; then echo "arm"; fi;) && \ + elif [ $(uname -m) == "armv6l" ]; then echo "arm"; \ + elif [ $(uname -m) == "s390x" ]; then echo "s390x"; \ + elif [ $(uname -m) == "ppc64le" ]; then echo "ppc64le"; fi;) && \ echo "Building for $ARCH" 1>&2 && \ SUPERCRONIC_SHA1SUM=$(echo $ARCH | sed 's/386/e0126b0102b9f388ecd55714358e3ad60d0cebdb/g' | sed 's/amd64/5ddf8ea26b56d4a7ff6faecdd8966610d5cb9d85/g' | sed 's/arm64/e2714c43e7781bf1579c85aa61259245f56dbba1/g' | sed 's/arm/47481c3341bc3a1ae91a728e0cc63c8e6d3791ad/g') && \ SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.9/supercronic-linux-$ARCH && \ From 9ac962888cfa71f8800c3c301f115844831a3bbb Mon Sep 17 00:00:00 2001 From: Alexander <4584443+DragonStuff@users.noreply.github.com> Date: Sat, 28 Aug 2021 10:54:44 +0900 Subject: [PATCH 05/14] fix(ci): use distinct test job name --- .github/workflows/release_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release_test.yml b/.github/workflows/release_test.yml index d99d40620..d31177301 100644 --- a/.github/workflows/release_test.yml +++ b/.github/workflows/release_test.yml @@ -1,4 +1,4 @@ -name: Build Dev Binaries +name: Cross-platform binary build test on: push: From e73044f1f02c88c5bd43e7fb846399b232a8a4ad Mon Sep 17 00:00:00 2001 From: Alexander <4584443+DragonStuff@users.noreply.github.com> Date: Sat, 28 Aug 2021 10:57:13 +0900 Subject: [PATCH 06/14] feature(ci): cancel previous runs if in-progress --- .github/workflows/container_test.yml | 4 ++++ .github/workflows/go.yml | 4 ++++ .github/workflows/release_test.yml | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/.github/workflows/container_test.yml b/.github/workflows/container_test.yml index 7ba460cf2..8c83e5c94 100644 --- a/.github/workflows/container_test.yml +++ b/.github/workflows/container_test.yml @@ -5,6 +5,10 @@ on: pull_request: workflow_dispatch: [] +concurrency: + group: ${{ github.head_ref }} + cancel-in-progress: true + jobs: build-test: runs-on: [ubuntu-latest] diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index b2948a0b7..88c0295ab 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -6,6 +6,10 @@ on: pull_request: branches: [ master ] +concurrency: + group: ${{ github.head_ref }} + cancel-in-progress: true + jobs: build: diff --git a/.github/workflows/release_test.yml b/.github/workflows/release_test.yml index d31177301..9049d18ba 100644 --- a/.github/workflows/release_test.yml +++ b/.github/workflows/release_test.yml @@ -5,6 +5,10 @@ on: pull_request: workflow_dispatch: [] +concurrency: + group: ${{ github.head_ref }} + cancel-in-progress: true + jobs: build: 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: [PATCH 07/14] fix(ci): only cancel previous in-progress workflow of the same group --- .github/workflows/{release_test.yml => binary_test.yml} | 2 +- .github/workflows/container_test.yml | 2 +- .github/workflows/go.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename .github/workflows/{release_test.yml => binary_test.yml} (96%) diff --git a/.github/workflows/release_test.yml b/.github/workflows/binary_test.yml similarity index 96% rename from .github/workflows/release_test.yml rename to .github/workflows/binary_test.yml index 9049d18ba..467332359 100644 --- a/.github/workflows/release_test.yml +++ b/.github/workflows/binary_test.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: [] concurrency: - group: ${{ github.head_ref }} + group: ${{ github.head_ref }}/binary_test cancel-in-progress: true jobs: diff --git a/.github/workflows/container_test.yml b/.github/workflows/container_test.yml index 8c83e5c94..122248b14 100644 --- a/.github/workflows/container_test.yml +++ b/.github/workflows/container_test.yml @@ -6,7 +6,7 @@ on: workflow_dispatch: [] concurrency: - group: ${{ github.head_ref }} + group: ${{ github.head_ref }}/container_test cancel-in-progress: true jobs: diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 88c0295ab..d6f7bf1b9 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -7,7 +7,7 @@ on: branches: [ master ] concurrency: - group: ${{ github.head_ref }} + group: ${{ github.head_ref }}/go cancel-in-progress: true jobs: 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: [PATCH 08/14] 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(-) 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 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: [PATCH 09/14] feature(ci): simplify go binary test build --- .github/workflows/binary_test.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) 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 . 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: [PATCH 10/14] fix(ci): allow test job to continue on error --- .github/workflows/binary_test.yml | 1 + 1 file changed, 1 insertion(+) 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 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: [PATCH 11/14] fix(ci): remove ppc64le and s390x support --- .github/workflows/binary_test.yml | 10 +--------- .github/workflows/container_latest.yml | 4 ++-- .github/workflows/container_release.yml | 4 ++-- .github/workflows/container_test.yml | 2 +- .github/workflows/release.yml | 10 +--------- .github/workflows/release_binaries.yml | 10 +--------- 6 files changed, 8 insertions(+), 32 deletions(-) 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 }} diff --git a/.github/workflows/container_latest.yml b/.github/workflows/container_latest.yml index b55922df9..ded3636fc 100644 --- a/.github/workflows/container_latest.yml +++ b/.github/workflows/container_latest.yml @@ -55,7 +55,7 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile - platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} @@ -109,6 +109,6 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile.go_build - platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} diff --git a/.github/workflows/container_release.yml b/.github/workflows/container_release.yml index 3c66c7215..ba4d2eeb9 100644 --- a/.github/workflows/container_release.yml +++ b/.github/workflows/container_release.yml @@ -59,7 +59,7 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile.go_build - platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} build-large: @@ -114,6 +114,6 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile.go_build_large - platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} diff --git a/.github/workflows/container_test.yml b/.github/workflows/container_test.yml index 122248b14..a2e94b7bb 100644 --- a/.github/workflows/container_test.yml +++ b/.github/workflows/container_test.yml @@ -44,6 +44,6 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile - platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 + platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 85f746c25..e1105e5d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,24 +12,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 steps: diff --git a/.github/workflows/release_binaries.yml b/.github/workflows/release_binaries.yml index ff8f98c63..9d44209f6 100644 --- a/.github/workflows/release_binaries.yml +++ b/.github/workflows/release_binaries.yml @@ -16,24 +16,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 # Steps represent a sequence of tasks that will be executed as part of the job steps: 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: [PATCH 12/14] revert(ci): remove continue-on-error --- .github/workflows/binary_test.yml | 1 - 1 file changed, 1 deletion(-) 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 From b1331ba3fe117ac950cb14d572c70ea7597f95dd Mon Sep 17 00:00:00 2001 From: Alexander <4584443+DragonStuff@users.noreply.github.com> Date: Sat, 28 Aug 2021 11:33:08 +0900 Subject: [PATCH 13/14] feature(ci): use matrix for container build --- .github/workflows/container_latest.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/container_latest.yml b/.github/workflows/container_latest.yml index ded3636fc..6536805db 100644 --- a/.github/workflows/container_latest.yml +++ b/.github/workflows/container_latest.yml @@ -8,6 +8,11 @@ on: jobs: build-latest: runs-on: [ubuntu-latest] + strategy: + matrix: + platform: [ linux ] + arch: [ amd64, arm, arm64, 386 ] + steps: - name: Checkout @@ -55,12 +60,17 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile - platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 + platforms: ${{ matrix.platform }}/${{ matrix.arch }} tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} build-dev: runs-on: [ubuntu-latest] + strategy: + matrix: + platform: [ linux ] + arch: [ amd64, arm, arm64, 386 ] + steps: - name: Checkout @@ -109,6 +119,6 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile.go_build - platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 + platforms: ${{ matrix.platform }}/${{ matrix.arch }} tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} From 7b56a6400d12ae0f1693d0a0b2d46128544cdca4 Mon Sep 17 00:00:00 2001 From: Alexander <4584443+DragonStuff@users.noreply.github.com> Date: Sat, 28 Aug 2021 11:36:32 +0900 Subject: [PATCH 14/14] fix(ci): use matrix for all container runs --- .github/workflows/container_release.yml | 14 ++++++++++++-- .github/workflows/container_test.yml | 7 ++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/container_release.yml b/.github/workflows/container_release.yml index ba4d2eeb9..a0cbbbb68 100644 --- a/.github/workflows/container_release.yml +++ b/.github/workflows/container_release.yml @@ -9,6 +9,11 @@ on: jobs: build-default: runs-on: [ubuntu-latest] + strategy: + matrix: + platform: [ linux ] + arch: [ amd64, arm, arm64, 386 ] + steps: - name: Checkout @@ -59,11 +64,16 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile.go_build - platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 + platforms: ${{ matrix.platform }}/${{ matrix.arch }} tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} build-large: runs-on: [ubuntu-latest] + strategy: + matrix: + platform: [ linux ] + arch: [ amd64, arm, arm64, 386 ] + steps: - name: Checkout @@ -114,6 +124,6 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile.go_build_large - platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 + platforms: ${{ matrix.platform }}/${{ matrix.arch }} tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} diff --git a/.github/workflows/container_test.yml b/.github/workflows/container_test.yml index a2e94b7bb..410d1d21a 100644 --- a/.github/workflows/container_test.yml +++ b/.github/workflows/container_test.yml @@ -12,6 +12,11 @@ concurrency: jobs: build-test: runs-on: [ubuntu-latest] + strategy: + matrix: + platform: [ linux ] + arch: [ amd64, arm, arm64, 386 ] + steps: - name: Checkout @@ -44,6 +49,6 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile - platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 + platforms: ${{ matrix.platform }}/${{ matrix.arch }} tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }}