.github/workflows: build with GOARCH=amd64 explicitly on macOS

Now a macOS server is arm64, not amd64.
See https://github.com/actions/runner-images/issues/9741
This commit is contained in:
Hajime Hoshi 2024-07-02 10:44:28 +09:00
parent 4267664b8b
commit e3af35e6ff

View File

@ -98,7 +98,7 @@ jobs:
- name: go build (macOS)
if: runner.os == 'macOS'
run: |
env CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build -v ./...
env CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -v ./...
env CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 go build -o flappy_amd64 -v ./examples/flappy
env CGO_ENABLED=1 GOOS=darwin GOARCH=arm64 go build -o flappy_arm64 -v ./examples/flappy
lipo -create flappy_amd64 flappy_arm64 -output flappy