Skip to content

Commit 296237c

Browse files
committed
[CI] Fix macOS release configuration
The macOS-ARM64 configuration would overwrite the macOS-X64 definition based on how matrix includes work since target-arch is not part of the original matrix configuration. This way we now have macOS-ARM64, but are suddenly missing macOS-X64. Fix this by adding target-arch to the default matrix configuration so that a new configuration is created with the `target-arch: ARM64` directive. Adjust "macOS" os-name to "macOS-x64" to be more descriptive and handle the cross-compilation setup step correctly.
1 parent 8219f2f commit 296237c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,27 +57,25 @@ jobs:
5757
strategy:
5858
matrix:
5959
os: [ubuntu-20.04, macos-15, windows-2022]
60+
target-arch: [ X64 ]
6061
include:
6162
- os-name: linux
6263
os: ubuntu-20.04
6364
bazel-config: release_linux
64-
target-arch: X64
6565
# Based on runner availability, we build both Apple Silicon and (cross-compiled) x86
6666
# release binaries on the macos-15 runner.
67-
- os-name: macOS
67+
- os-name: macOS-x64
6868
# This configuration is used for cross-compiling – macos-15 is Apple Silicon-based but
6969
# we use it to compile the x64 release.
7070
os: macos-15
7171
bazel-config: release_macos
72-
target-arch: X64
7372
- os-name: macOS-arm64
7473
os: macos-15
7574
bazel-config: release_macos
7675
target-arch: ARM64
7776
- os-name: windows
7877
os: windows-2022
7978
bazel-config: release_windows
80-
target-arch: X64
8179
runs-on: ${{ matrix.os }}
8280
name: build (${{ matrix.os-name }})
8381
steps:
@@ -113,7 +111,7 @@ jobs:
113111
# Enable lld identical code folding to significantly reduce binary size.
114112
echo "build:macos --config=macos_lld_icf" >> .bazelrc
115113
- name: Setup macOS (cross)
116-
if: ${{ matrix.os-name }} == 'macOS'
114+
if: ${{ matrix.os-name }} == 'macOS-x64'
117115
run: |
118116
# Cross-compile so that we can use the latest Xcode version for the Intel Mac binary
119117
echo "build:macos --config=macos-cross-x86_64" >> .bazelrc

0 commit comments

Comments
 (0)