Skip to content

Commit b29b91d

Browse files
authored
goreleaser: add arm64 build for each OS (#1073)
* goreleaser: add arm64 build for each OS The latest release of the Exercism CLI (3.1.0, 2022-10-04) includes these assets, via GoReleaser: exercism-3.1.0-darwin-x86_64.tar.gz exercism-3.1.0-freebsd-i386.tar.gz exercism-3.1.0-freebsd-x86_64.tar.gz exercism-3.1.0-linux-armv5.tar.gz exercism-3.1.0-linux-armv6.tar.gz exercism-3.1.0-linux-i386.tar.gz exercism-3.1.0-linux-ppc64.tar.gz exercism-3.1.0-linux-x86_64.tar.gz exercism-3.1.0-openbsd-i386.tar.gz exercism-3.1.0-openbsd-x86_64.tar.gz exercism-3.1.0-windows-armv5.zip exercism-3.1.0-windows-armv6.zip exercism-3.1.0-windows-i386.zip exercism-3.1.0-windows-x86_64.zip exercism_checksums.txt exercism_checksums.txt.sig For future releases, this commit configures GoReleaser to include an arm64 (also known as aarch64) release asset for each of the existing OSes. Note that we will have separate x86_64 and arm64 release assets for macOS; previously macOS users on arm64 had to run the x86_64 binary via Rosetta (or build the CLI themselves). At least for now, let's avoid adding a fat binary. But note that GoReleaser does support it [1]. [1] https://goreleaser.com/customization/universalbinaries/ Closes: #966 * go.mod, go.sum: bump `golang.org/x/sys` from 20170803 to 20201202 This commits the result of running go get golang.org/x/sys@v0.0.0-20201202213521-69691e467435 to fix a build failure for freebsd_arm64. This seems to be the minimum bump to fix that failure without introducing a build failure for darwin_arm64 and openbsd_arm64. We cannot bump to the latest release (0.3.0, 2022-12-03) because that causes the Linux and macOS CI jobs to fail with: Error: ../../../go/pkg/mod/golang.org/x/sys@v0.3.0/unix/syscall.go:83:16: undefined: unsafe.Slice Error: ../../../go/pkg/mod/golang.org/x/sys@v0.3.0/unix/syscall_darwin.go:95:8: undefined: unsafe.Slice Error: ../../../go/pkg/mod/golang.org/x/sys@v0.3.0/unix/syscall_unix.go:118:7: undefined: unsafe.Slice Error: ../../../go/pkg/mod/golang.org/x/sys@v0.3.0/unix/sysvshm_unix.go:33:7: undefined: unsafe.Slice note: module requires Go 1.17 and we need other changes in order to bump the minimum Go version.
1 parent e0dbcd1 commit b29b91d

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

.goreleaser.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ builds:
1515
- amd64
1616
- 386
1717
- arm
18+
- arm64
1819
- ppc64
1920
goarm:
2021
- 5

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ require (
2222
github.com/spf13/viper v0.0.0-20180507071007-15738813a09d
2323
github.com/stretchr/testify v1.1.4
2424
golang.org/x/net v0.0.0-20170726083632-f5079bd7f6f7
25-
golang.org/x/sys v0.0.0-20170803140359-d8f5ea21b929
25+
golang.org/x/sys v0.0.0-20201202213521-69691e467435
2626
golang.org/x/text v0.0.0-20170730040918-3bd178b88a81
2727
gopkg.in/yaml.v2 v2.0.0-20170721122051-25c4ec802a7d
2828
)

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ golang.org/x/net v0.0.0-20170726083632-f5079bd7f6f7 h1:1Pw+ZX4dmGORIwGkTwnUr7RFu
3838
golang.org/x/net v0.0.0-20170726083632-f5079bd7f6f7/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
3939
golang.org/x/sys v0.0.0-20170803140359-d8f5ea21b929 h1:M4VPQYSW/nB4Bcg1XMD4yW2sprnwerD3Kb6apRphtZw=
4040
golang.org/x/sys v0.0.0-20170803140359-d8f5ea21b929/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
41+
golang.org/x/sys v0.0.0-20201202213521-69691e467435 h1:25AvDqqB9PrNqj1FLf2/70I4W0L19qqoaFq3gjNwbKk=
42+
golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
4143
golang.org/x/text v0.0.0-20170730040918-3bd178b88a81 h1:7aXI3TQ9sZ4JdDoIDGjxL6G2mQxlsPy9dySnJaL6Bdk=
4244
golang.org/x/text v0.0.0-20170730040918-3bd178b88a81/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
4345
gopkg.in/yaml.v2 v2.0.0-20170721122051-25c4ec802a7d h1:2DX7x6HUDGZUyuEDAhUsQQNqkb1zvDyKTjVoTdzaEzo=

0 commit comments

Comments
 (0)