From eb72b10f553b34bd964966b2306acfcbc05a65e3 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 2 Jan 2021 13:02:16 +0100 Subject: [PATCH 1/3] Add mips* architectures to CI and release --- .github/workflows/tests.yml | 2 +- helpers/build-release-binaries/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2bfd8d215..cac311af2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -210,7 +210,7 @@ jobs: GOX_ARCHS: "aix/ppc64 \ darwin/amd64 \ freebsd/386 freebsd/amd64 freebsd/arm \ - linux/386 linux/amd64 linux/arm linux/arm64 linux/ppc64le \ + linux/386 linux/amd64 linux/arm linux/arm64 linux/ppc64le linux/mips linux/mipsle linux/mips64 linux/mips64le \ netbsd/386 netbsd/amd64 \ openbsd/386 openbsd/amd64 \ windows/386 windows/amd64 \ diff --git a/helpers/build-release-binaries/main.go b/helpers/build-release-binaries/main.go index f13867c28..f0b3592a3 100644 --- a/helpers/build-release-binaries/main.go +++ b/helpers/build-release-binaries/main.go @@ -226,7 +226,7 @@ var defaultBuildTargets = map[string][]string{ "aix": {"ppc64"}, "darwin": {"amd64"}, "freebsd": {"386", "amd64", "arm"}, - "linux": {"386", "amd64", "arm", "arm64", "ppc64le"}, + "linux": {"386", "amd64", "arm", "arm64", "ppc64le", "mips", "mipsle", "mips64", "mips64le"}, "netbsd": {"386", "amd64"}, "openbsd": {"386", "amd64"}, "windows": {"386", "amd64"}, From 36db248e30d1f7949b8f5b203977d6131917e79f Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 3 Jan 2021 10:46:32 +0100 Subject: [PATCH 2/3] Split cross compilation targets into two jobs --- .github/workflows/tests.yml | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cac311af2..537e1c5c5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -184,12 +184,30 @@ jobs: if: matrix.check_changelog cross_compile: + strategy: + + # 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 + targets: + - "linux/386 linux/amd64 linux/arm linux/arm64 linux/ppc64le linux/mips linux/mipsle linux/mips64 linux/mips64le \ + openbsd/386 openbsd/amd64" + + - "freebsd/386 freebsd/amd64 freebsd/arm \ + aix/ppc64 \ + darwin/amd64 \ + netbsd/386 netbsd/amd64 \ + windows/386 windows/amd64 \ + solaris/amd64" + env: go: 1.15.x GOPROXY: https://proxy.golang.org runs-on: ubuntu-latest + name: Cross Compile for ${{ matrix.targets }} + steps: - name: Set up Go ${{ env.go }} uses: actions/setup-go@v2 @@ -203,18 +221,10 @@ jobs: run: | go get github.com/mitchellh/gox - # ATTENTION: the list of architectures must be in sync with helpers/build-release-binaries/main.go! - - name: Cross-compile with gox + - name: Cross-compile with gox for ${{ matrix.targets }} env: GOFLAGS: "-trimpath" - GOX_ARCHS: "aix/ppc64 \ - darwin/amd64 \ - freebsd/386 freebsd/amd64 freebsd/arm \ - linux/386 linux/amd64 linux/arm linux/arm64 linux/ppc64le linux/mips linux/mipsle linux/mips64 linux/mips64le \ - netbsd/386 netbsd/amd64 \ - openbsd/386 openbsd/amd64 \ - windows/386 windows/amd64 \ - solaris/amd64" + GOX_ARCHS: "${{ matrix.targets }}" run: | mkdir build-output gox -parallel 2 -verbose -osarch "$GOX_ARCHS" -output "build-output/{{.Dir}}_{{.OS}}_{{.Arch}}" ./cmd/restic From 7d665fa1f4bc8714ffb11da9cf568b4861ab1478 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 3 Jan 2021 14:41:11 +0100 Subject: [PATCH 3/3] Add entry to changelog --- changelog/unreleased/issue-3191 | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 changelog/unreleased/issue-3191 diff --git a/changelog/unreleased/issue-3191 b/changelog/unreleased/issue-3191 new file mode 100644 index 000000000..7048197b6 --- /dev/null +++ b/changelog/unreleased/issue-3191 @@ -0,0 +1,8 @@ +Enhancement: Add release binaries for MIPS architectures + +We've added a few new architectures for Linux to the release binaries: `mips`, +`mipsle`, `mips64`, and `mip64le`. MIPS is mostly used for low-end embedded +systems. + +https://github.com/restic/restic/issues/3191 +https://github.com/restic/restic/pull/3208