2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-26 14:56:29 +00:00

Merge pull request #3942 from MichaelEischer/split-cross-compile-test

Split cross compile test
This commit is contained in:
Michael Eischer 2022-09-24 22:27:08 +02:00 committed by GitHub
commit d6575f53ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,7 +69,7 @@ jobs:
steps: steps:
- name: Set up Go ${{ matrix.go }} - name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v2 uses: actions/setup-go@v3
with: with:
go-version: ${{ matrix.go }} go-version: ${{ matrix.go }}
@ -98,7 +98,7 @@ jobs:
chmod 755 $HOME/bin/rclone chmod 755 $HOME/bin/rclone
rm -rf 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 echo $HOME/bin >> $GITHUB_PATH
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest' if: matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest'
@ -120,7 +120,7 @@ jobs:
unzip rclone.zip unzip rclone.zip
copy rclone*/rclone.exe $Env:USERPROFILE/bin 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 $Env:USERPROFILE\bin >> $Env:GITHUB_PATH
echo "install tar" echo "install tar"
@ -142,7 +142,7 @@ jobs:
if: matrix.os == 'windows-latest' if: matrix.os == 'windows-latest'
- name: Check out code - name: Check out code
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Build with build.go - name: Build with build.go
run: | run: |
@ -209,15 +209,16 @@ jobs:
# ATTENTION: the list of architectures must be in sync with helpers/build-release-binaries/main.go! # ATTENTION: the list of architectures must be in sync with helpers/build-release-binaries/main.go!
matrix: 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: targets:
- "linux/386 linux/amd64 linux/arm linux/arm64 linux/ppc64le linux/mips linux/mipsle linux/mips64 linux/mips64le linux/s390x \ - "linux/386 linux/amd64 linux/arm linux/arm64 linux/ppc64le linux/mips linux/mipsle linux/mips64 linux/mips64le linux/s390x"
openbsd/386 openbsd/amd64"
- "freebsd/386 freebsd/amd64 freebsd/arm \ - "openbsd/386 openbsd/amd64 \
freebsd/386 freebsd/amd64 freebsd/arm \
aix/ppc64 \ aix/ppc64 \
darwin/amd64 darwin/arm64 \ darwin/amd64 darwin/arm64"
netbsd/386 netbsd/amd64 \
- "netbsd/386 netbsd/amd64 \
windows/386 windows/amd64 \ windows/386 windows/amd64 \
solaris/amd64" solaris/amd64"
@ -230,7 +231,7 @@ jobs:
steps: steps:
- name: Set up Go ${{ env.latest_go }} - name: Set up Go ${{ env.latest_go }}
uses: actions/setup-go@v2 uses: actions/setup-go@v3
with: with:
go-version: ${{ env.latest_go }} go-version: ${{ env.latest_go }}
@ -239,7 +240,7 @@ jobs:
go install github.com/mitchellh/gox@latest go install github.com/mitchellh/gox@latest
- name: Check out code - name: Check out code
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Cross-compile with gox for ${{ matrix.targets }} - name: Cross-compile with gox for ${{ matrix.targets }}
env: env:
@ -255,22 +256,21 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Set up Go ${{ env.latest_go }} - name: Set up Go ${{ env.latest_go }}
uses: actions/setup-go@v2 uses: actions/setup-go@v3
with: with:
go-version: ${{ env.latest_go }} go-version: ${{ env.latest_go }}
- name: Check out code - name: Check out code
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: golangci-lint - name: golangci-lint
uses: golangci/golangci-lint-action@v2 uses: golangci/golangci-lint-action@v3
with: with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. # 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`. # Optional: show only new issues if it's a pull request. The default value is `false`.
only-new-issues: true only-new-issues: true
args: --verbose --timeout 5m args: --verbose --timeout 5m
skip-go-installation: true
# only run golangci-lint for pull requests, otherwise ALL hints get # only run golangci-lint for pull requests, otherwise ALL hints get
# reported. We need to slowly address all issues until we can enable # reported. We need to slowly address all issues until we can enable
@ -288,11 +288,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out code - name: Check out code
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Docker meta - name: Docker meta
id: meta id: meta
uses: docker/metadata-action@v3 uses: docker/metadata-action@v4
with: with:
# list of Docker images to use as base name for tags # list of Docker images to use as base name for tags
images: | images: |
@ -308,14 +308,14 @@ jobs:
type=sha type=sha
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v1 uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v2
- name: Build and push - name: Build and push
id: docker_build id: docker_build
uses: docker/build-push-action@v2 uses: docker/build-push-action@v3
with: with:
push: false push: false
context: . context: .