Skip to content

Commit

Permalink
fix(NA): arm builds on release workflow by including cpu flags (#510)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic authored Mar 16, 2022
1 parent 6e4eeae commit 0fa0be6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,28 @@ jobs:
artifact: ibazel_linux_amd64
os: ubuntu-18.04
build_flags: --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64
cpu_flag:
ext: ""

- name: windows_amd64
artifact: ibazel_windows_amd64.exe
os: ubuntu-18.04
build_flags: --platforms=@io_bazel_rules_go//go/toolchain:windows_amd64
cpu_flag:
ext: ".exe"

- name: darwin_amd64
artifact: ibazel_darwin_amd64
os: macos-latest
build_flags: --platforms=@io_bazel_rules_go//go/toolchain:darwin_amd64_cgo
cpu_flag:
ext: ""

- name: darwin_arm64
artifact: ibazel_darwin_arm64
os: macos-latest
build_flags: --platforms=@io_bazel_rules_go//go/toolchain:darwin_arm64_cgo --cpu=darwin_arm64
build_flags: --platforms=@io_bazel_rules_go//go/toolchain:darwin_arm64_cgo
cpu_flag: --cpu=darwin_arm64
ext: ""

steps:
Expand All @@ -49,10 +53,10 @@ jobs:
run: npm --global install @bazel/bazelisk@latest

- name: Build ibazel
run: bazel build //ibazel:ibazel --config release ${{ matrix.build_flags }}
run: bazel build //ibazel:ibazel --config release ${{ matrix.build_flags }} ${{ matrix.cpu_flag }}

- name: Copy binary
run: cp $(bazel info bazel-bin)/ibazel/ibazel_/ibazel${{ matrix.ext }} ${{ matrix.artifact }}
run: cp $(bazel info ${{ matrix.cpu_flag }} bazel-bin)/ibazel/ibazel_/ibazel${{ matrix.ext }} ${{ matrix.artifact }}

- name: Upload binary
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 0fa0be6

Please sign in to comment.