Build Engines for Apple Silicon #136
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
name: Build Engines for Apple Silicon | |
on: | |
workflow_dispatch: | |
inputs: | |
commit: | |
description: "Commit on the given branch to build" | |
required: false | |
jobs: | |
build: | |
# Do not change `name`, prisma-engines Buildkite build job depends on this name ending with the commit | |
name: "MacOS ARM64 (Apple Silicon) engines build on branch ${{ github.event.ref }} for commit ${{ github.event.inputs.commit }}" | |
env: | |
SQLITE_MAX_VARIABLE_NUMBER: 250000 | |
SQLITE_MAX_EXPR_DEPTH: 10000 | |
runs-on: macos-13 | |
steps: | |
- name: Output link to real commit | |
run: echo ${{ github.repository }}/commit/${{ github.event.inputs.commit }} | |
- name: Checkout ${{ github.event.inputs.commit }} | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.commit }} | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Install aarch64 toolchain | |
run: rustup target add aarch64-apple-darwin | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- run: xcodebuild -showsdks | |
- run: | | |
cargo build --target=aarch64-apple-darwin --release -p query-engine -p query-engine-node-api -p schema-engine-cli -p prisma-fmt | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: binaries | |
path: | | |
${{ github.workspace }}/target/aarch64-apple-darwin/release/schema-engine | |
${{ github.workspace }}/target/aarch64-apple-darwin/release/prisma-fmt | |
${{ github.workspace }}/target/aarch64-apple-darwin/release/query-engine | |
${{ github.workspace }}/target/aarch64-apple-darwin/release/libquery_engine.dylib |