From 519059cca4b419c2aca34d56eb676d1e8bda09fa Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sat, 24 Sep 2022 21:59:36 +0200 Subject: [PATCH 1/3] update ci actions --- .github/workflows/tests.yml | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2e628b5b8..2c00e8543 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -69,7 +69,7 @@ jobs: steps: - name: Set up Go ${{ matrix.go }} - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: ${{ matrix.go }} @@ -98,7 +98,7 @@ jobs: chmod 755 $HOME/bin/rclone rm -rf rclone* - # add $HOME/bin to path ($GOBIN was already added to the path by setup-go@v2) + # add $HOME/bin to path ($GOBIN was already added to the path by setup-go@v3) echo $HOME/bin >> $GITHUB_PATH if: matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest' @@ -120,7 +120,7 @@ jobs: unzip rclone.zip copy rclone*/rclone.exe $Env:USERPROFILE/bin - # add $USERPROFILE/bin to path ($GOBIN was already added to the path by setup-go@v2) + # add $USERPROFILE/bin to path ($GOBIN was already added to the path by setup-go@v3) echo $Env:USERPROFILE\bin >> $Env:GITHUB_PATH echo "install tar" @@ -142,7 +142,7 @@ jobs: if: matrix.os == 'windows-latest' - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Build with build.go run: | @@ -230,7 +230,7 @@ jobs: steps: - name: Set up Go ${{ env.latest_go }} - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: ${{ env.latest_go }} @@ -239,7 +239,7 @@ jobs: go install github.com/mitchellh/gox@latest - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Cross-compile with gox for ${{ matrix.targets }} env: @@ -255,22 +255,21 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Go ${{ env.latest_go }} - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: ${{ env.latest_go }} - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: golangci-lint - uses: golangci/golangci-lint-action@v2 + uses: golangci/golangci-lint-action@v3 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. version: v1.48 # Optional: show only new issues if it's a pull request. The default value is `false`. only-new-issues: true args: --verbose --timeout 5m - skip-go-installation: true # only run golangci-lint for pull requests, otherwise ALL hints get # reported. We need to slowly address all issues until we can enable @@ -288,11 +287,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Docker meta id: meta - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v4 with: # list of Docker images to use as base name for tags images: | @@ -308,14 +307,14 @@ jobs: type=sha - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: push: false context: . From bd191ec60b902f0b5d18b6fdbf8f5b4c7f22c957 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sat, 24 Sep 2022 22:00:08 +0200 Subject: [PATCH 2/3] update golang-ci to version 1.49 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2c00e8543..ced4341a5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -266,7 +266,7 @@ jobs: uses: golangci/golangci-lint-action@v3 with: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v1.48 + version: v1.49 # Optional: show only new issues if it's a pull request. The default value is `false`. only-new-issues: true args: --verbose --timeout 5m From 46b30b9826cea45f9e68b6d717c48f3291ce0b0c Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sat, 24 Sep 2022 22:00:22 +0200 Subject: [PATCH 3/3] split cross compilation into three parts The cross compilation tasks are currently the slowest part of the CI runs. Splitting it into three parts should reduce its time to roughly that of the windows CI run. --- .github/workflows/tests.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ced4341a5..bbd0e5d49 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -209,15 +209,16 @@ jobs: # ATTENTION: the list of architectures must be in sync with helpers/build-release-binaries/main.go! matrix: - # run cross-compile in two batches parallel so the overall tests run faster + # run cross-compile in three batches parallel so the overall tests run faster targets: - - "linux/386 linux/amd64 linux/arm linux/arm64 linux/ppc64le linux/mips linux/mipsle linux/mips64 linux/mips64le linux/s390x \ - openbsd/386 openbsd/amd64" + - "linux/386 linux/amd64 linux/arm linux/arm64 linux/ppc64le linux/mips linux/mipsle linux/mips64 linux/mips64le linux/s390x" - - "freebsd/386 freebsd/amd64 freebsd/arm \ + - "openbsd/386 openbsd/amd64 \ + freebsd/386 freebsd/amd64 freebsd/arm \ aix/ppc64 \ - darwin/amd64 darwin/arm64 \ - netbsd/386 netbsd/amd64 \ + darwin/amd64 darwin/arm64" + + - "netbsd/386 netbsd/amd64 \ windows/386 windows/amd64 \ solaris/amd64"