forked from sorbet/sorbet
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Build Sorbet ARM64 | ||
|
||
on: | ||
push: | ||
workflow_dispatch: # Allows manual triggering | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest-xlarge | ||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install packages | ||
run: brew install autoconf coreutils parallel | ||
|
||
- name: Build x86_64 | ||
run: | | ||
TARGET_PLATFORM=darwin-x86_64 ./bazel build //main:sorbet --strip=always --config=release-mac | ||
mv bazel-bin/main/sorbet sorbet_x86_64 | ||
- name: Build arm64 | ||
run: | | ||
./bazel clean --expunge | ||
TARGET_PLATFORM=darwin-arm64 ./bazel build //main:sorbet --strip=always --config=release-mac-arm64 | ||
mv bazel-bin/main/sorbet sorbet_arm64 | ||
- name: Merge binaries | ||
run: | | ||
lipo -create -output sorbet sorbet_x86_64 sorbet_arm64 | ||
rm sorbet_x86_64 sorbet_arm64 | ||
- name: Run | ||
run: | | ||
file ./sorbet | ||
./sorbet -e "42 + 'hello'" | ||
# TODO: package the gem | ||
# TODO: upload to internal package manager |