forked from prisma/prisma-engines
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (49 loc) · 1.86 KB
/
build-engines-apple-silicon-template.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Build Engines for Apple Silicon
on:
workflow_call:
inputs:
commit:
description: 'Commit on the given branch to build'
type: string
required: false
jobs:
build:
name: 'MacOS ARM64 (Apple Silicon) engines build for commit ${{ 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/${{ inputs.commit }}
- name: Checkout ${{ inputs.commit }}
uses: actions/checkout@v4
with:
ref: ${{ inputs.commit }}
- run: xcodebuild -showsdks
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: |
cargo build --target=aarch64-apple-darwin --release -p query-engine -p query-engine-node-api -p schema-engine-cli -p prisma-fmt
- name: Rename files
working-directory: ${{ github.workspace }}/target/aarch64-apple-darwin/release
run: |
echo "Files in target/release before renaming"
ls -la .
mv libquery_engine.dylib libquery_engine.dylib.node
echo "Files in target/release after renaming"
ls -la .
- uses: actions/upload-artifact@v4
with:
name: darwin-arm64
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.node