Skip to content

Commit

Permalink
Prepare for engineer integration
Browse files Browse the repository at this point in the history
  • Loading branch information
SevInf committed Apr 25, 2024
1 parent 9a2e5fc commit 4fe72df
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 26 deletions.
40 changes: 18 additions & 22 deletions .github/workflows/build-engines-react-native.yml
@@ -1,30 +1,25 @@
name: Build Engines for React native
on:
# TODO: engineer integration
pull_request:
paths-ignore:
- "!.github/workflows/build-engines-react-native.yml"
- ".github/**"
- ".buildkite/**"
- "*.md"
- "LICENSE"
- "CODEOWNERS"
- "renovate.json"
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" #"MacOS Intel engines build on branch ${{ github.event.ref }} for commit ${{ github.event.inputs.commit }}"
name: "iOS build on branch ${{ github.event.ref }} for commit ${{ github.event.inputs.commit }}"
runs-on: macos-13

steps:
# - name: Output link to real commit
# run: echo ${{ github.repository }}/commit/${{ github.event.inputs.commit }}
- name: Output link to real commit
run: echo ${{ github.repository }}/commit/${{ github.event.inputs.commit }}

- name: Checkout # TODO: commit
- name: Checkout
uses: actions/checkout@v4
# with:
# ref: ${{ github.event.inputs.commit }}
with:
ref: ${{ github.event.inputs.commit }}

- uses: dtolnay/rust-toolchain@stable
with:
Expand All @@ -49,17 +44,17 @@ jobs:
build-android:
# Do not change `name`, prisma-engines Buildkite build job depends on this name ending with the commit
name: "Android build" #"MacOS Intel engines build on branch ${{ github.event.ref }} for commit ${{ github.event.inputs.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: Output link to real commit
run: echo ${{ github.repository }}/commit/${{ github.event.inputs.commit }}

- name: Checkout # TODO: commit
uses: actions/checkout@v4
# with:
# ref: ${{ github.event.inputs.commit }}
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
Expand All @@ -86,7 +81,8 @@ jobs:
path: |
${{ github.workspace }}/query-engine/query-engine-c-abi/android/*
combine-artifacts:
name: Combine iOS and Android 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
Expand Down
9 changes: 5 additions & 4 deletions query-engine/query-engine-c-abi/Makefile
Expand Up @@ -13,13 +13,14 @@ ARCHS_ANDROID = aarch64-linux-android armv7-linux-androideabi x86_64-linux-andro
LIB = libquery_engine.a
XCFRAMEWORK = QueryEngine.xcframework

.PHONY: clean ios android $(ARCH_IOS_SIM) $(ARCHS_IOS) $(ARCHS_ANDROID) sim copy-ios nuke openssl
.PHONY: clean ios android $(ARCH_IOS_SIM) $(ARCHS_IOS) $(ARCHS_ANDROID) sim nuke

nuke:
rm -rf ../../target

clean:
rm -rf QueryEngine.xcframework
rm -rf ios
rm -rf android
rm -rf simulator_fat
mkdir simulator_fat

Expand All @@ -46,11 +47,11 @@ ios: clean $(XCFRAMEWORK)

sim: clean
cargo build --target $(ARCH_IOS_SIM)
xcodebuild -create-xcframework -library ../../target/$(ARCH_IOS_SIM)/debug/libquery_engine.a -headers include -output $(XCFRAMEWORK)
xcodebuild -create-xcframework -library ../../target/$(ARCH_IOS_SIM)/debug/libquery_engine.a -headers include -output ios/$(XCFRAMEWORK)

sim-release: clean
cargo build --target $(ARCH_IOS_SIM) --release
xcodebuild -create-xcframework -library ../../target/$(ARCH_IOS_SIM)/release/libquery_engine.a -headers include -output $(XCFRAMEWORK)
xcodebuild -create-xcframework -library ../../target/$(ARCH_IOS_SIM)/release/libquery_engine.a -headers include -output ios/$(XCFRAMEWORK)

$(ARCHS_IOS): %:
cargo build -p query-engine-c-abi --release --target $@
Expand Down

0 comments on commit 4fe72df

Please sign in to comment.