Skip to content

Commit 86dc6db

Browse files
committed
[CI] Build release binaries for Apple Silicon
These binaries are not added to releases yet, in case the new configuration doesn't work out of the box. Later this will be used to replace the internal Apple Silicon build.
1 parent cc16022 commit 86dc6db

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,18 @@ jobs:
6262
os: ubuntu-20.04
6363
bazel-config: release_linux
6464
target-arch: X64
65+
# Based on runner availability, we build both Apple Silicon and (cross-compiled) x86
66+
# release binaries on the macos-15 runner.
6567
- os-name: macOS
6668
# This configuration is used for cross-compiling – macos-15 is Apple Silicon-based but
6769
# we use it to compile the x64 release.
6870
os: macos-15
6971
bazel-config: release_macos
7072
target-arch: X64
73+
- os-name: macOS-arm64
74+
os: macos-15
75+
bazel-config: release_macos
76+
target-arch: ARM64
7177
- os-name: windows
7278
os: windows-2022
7379
bazel-config: release_windows
@@ -104,10 +110,13 @@ jobs:
104110
# exist from an older pre-installed LLVM version on the runner image.
105111
brew install lld
106112
sudo ln -s -f $(brew --prefix lld)/bin/ld64.lld /usr/local/bin/ld64.lld
107-
# Cross-compile so that we can use the latest Xcode version for the Intel Mac binary
108-
echo "build:macos --config=macos-cross-x86_64" >> .bazelrc
109113
# Enable lld identical code folding to significantly reduce binary size.
110114
echo "build:macos --config=macos_lld_icf" >> .bazelrc
115+
- name: Setup macOS (cross)
116+
if: ${{ matrix.os-name }} == 'macOS'
117+
run: |
118+
# Cross-compile so that we can use the latest Xcode version for the Intel Mac binary
119+
echo "build:macos --config=macos-cross-x86_64" >> .bazelrc
111120
- name: Setup Windows
112121
if: runner.os == 'Windows'
113122
run: |
@@ -146,6 +155,11 @@ jobs:
146155
name: Linux-X64
147156
- arch: darwin-64
148157
name: macOS-X64
158+
# TODO(soon): After verifying that Apple Silicon artifacts are being built and uploaded
159+
# properly, decommission the internal build and add them to the tagged release instead of
160+
# using the internal build.
161+
# - arch: darwin-arm64
162+
# name: macOS-ARM64
149163
- arch: windows-64
150164
name: Windows-X64
151165
steps:

0 commit comments

Comments
 (0)