101 lines (86 loc) 路 3.08 KB
/
build-engines-react-native.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Build Engines for React native
on:
workflow_dispatch:
inputs:
commit:
description: "Commit on the given branch to build"
required: false
jobs:
build-ios:
# Do not change `name`, prisma-engines Buildkite build job depends on this name ending with the commit
name: "iOS build on branch ${{ github.event.ref }} for commit ${{ github.event.inputs.commit }}"
runs-on: macos-14
steps:
- name: Output link to real commit
run: echo ${{ github.repository }}/commit/${{ github.event.inputs.commit }}
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.commit }}
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-apple-ios,aarch64-apple-ios,aarch64-apple-ios-sim
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-ios-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: |
cd query-engine/query-engine-c-abi
make ios
- uses: actions/upload-artifact@v4
with:
name: ios
path: |
${{ github.workspace }}/query-engine/query-engine-c-abi/ios/*
build-android:
# Do not change `name`, prisma-engines Buildkite build job depends on this name ending with the commit
name: "Android build on branch ${{ github.event.ref }} for commit ${{ github.event.inputs.commit }}"
runs-on: ubuntu-latest
steps:
- name: Output link to real commit
run: echo ${{ github.repository }}/commit/${{ github.event.inputs.commit }}
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.commit }}
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-linux-android,armv7-linux-androideabi,x86_64-linux-android,i686-linux-android
- uses: nttld/setup-ndk@v1
with:
ndk-version: r26d
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-android-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: |
cd query-engine/query-engine-c-abi
make android
- uses: actions/upload-artifact@v4
with:
name: android
path: |
${{ github.workspace }}/query-engine/query-engine-c-abi/android/*
combine-artifacts:
# Do not change `name`, prisma-engines Buildkite build job depends on this name ending with the commit
name: "Combine iOS and Android artifacts on branch ${{ github.event.ref }} for commit ${{ github.event.inputs.commit }}"
runs-on: ubuntu-latest
needs:
- build-ios
- build-android
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Upload combined artifact
uses: actions/upload-artifact@v4
with:
name: binaries
path: |
${{ github.workspace }}/ios
${{ github.workspace }}/android