Skip to content

Commit

Permalink
Build binaries for Apple Silicon (#13)
Browse files Browse the repository at this point in the history
* Build darwin/arm64 version on CI
* Update `x/sys` to a newer version with support for darwin/arm64
  • Loading branch information
romac authored Oct 26, 2022
1 parent f5dab84 commit 4b2cd09
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ commands:
name: Release
command: |
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-extldflags static" -o build/stoml_darwin_amd64 .
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags "-extldflags static" -o build/stoml_darwin_arm64 .
CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -ldflags "-extldflags static" -o build/stoml_linux_386 .
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-extldflags static" -o build/stoml_linux_amd64 .
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 go build -ldflags "-extldflags static" -o build/stoml_linux_armv7 .
Expand Down
2 changes: 1 addition & 1 deletion .circleci/release.bash
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ echo "Release ID: ${id}"

# Upload binaries

for binary in stoml_darwin_amd64 stoml_linux_386 stoml_linux_amd64 stoml_windows_386 stoml_windows_amd64 stoml_linux_armv7
for binary in stoml_darwin_amd64 stoml_darwin_arm64 stoml_linux_386 stoml_linux_amd64 stoml_windows_386 stoml_windows_amd64 stoml_linux_armv7
do
echo -ne "Processing ${binary}... "
if [[ ! -f "build/${binary}" ]]; then
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ require (
github.com/spf13/cobra v1.1.3
github.com/spf13/viper v1.7.1
github.com/stretchr/testify v1.3.0
golang.org/x/sys v0.0.0-20220907062415-87db552b00fd // indirect
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0 h1:HyfiK1WMnHj5FXFXatD+Qs1A/xC2Run6RzeW1SyHxpc=
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220907062415-87db552b00fd h1:AZeIEzg+8RCELJYq8w+ODLVxFgLMMigSwO/ffKPEd9U=
golang.org/x/sys v0.0.0-20220907062415-87db552b00fd/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
Expand Down

0 comments on commit 4b2cd09

Please sign in to comment.