Skip to content

Commit a6977e5

Browse files
author
Serhii Tatarintsev
authored
ci: Restore compilation check on PR (#4963)
* ci: Restore compilation check on PR Restore macos/windows compilation check on pull requests and add react native as well. * Trigger build * Add cache, name * Speed up check * Remove clean * Run in bash even on windows * Cleanup
1 parent ff166c7 commit a6977e5

File tree

3 files changed

+37
-13
lines changed

3 files changed

+37
-13
lines changed

.github/workflows/build-engines-react-native-template.yml

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
description: 'Commit on the given branch to build'
88
type: string
99
required: false
10+
uploadArtifacts:
11+
description: If the job should upload artifacts after build finishes
12+
type: boolean
13+
default: true
1014

1115
jobs:
1216
build-ios:
@@ -46,6 +50,7 @@ jobs:
4650
ls -la .
4751
4852
- uses: actions/upload-artifact@v4
53+
if: ${{ inputs.uploadArtifacts }}
4954
with:
5055
name: ios
5156
path: |
@@ -90,6 +95,7 @@ jobs:
9095
ls -la .
9196
9297
- uses: actions/upload-artifact@v4
98+
if: ${{ inputs.uploadArtifacts }}
9399
with:
94100
name: android
95101
path: |

.github/workflows/test-compilation.yml

+31-13
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,43 @@ concurrency:
1616

1717
jobs:
1818
test-crate-compilation:
19-
name: "Check release compilation"
19+
name: "${{ matrix.crate }} on ${{ matrix.os }}"
2020
strategy:
2121
fail-fast: false
22-
runs-on: ubuntu-latest
22+
matrix:
23+
os:
24+
- ubuntu-latest
25+
- windows-latest
26+
- macos-13
27+
crate:
28+
- schema-engine-cli
29+
- prisma-fmt
30+
- query-engine
31+
- query-engine-node-api
32+
runs-on: ${{ matrix.os }}
2333
steps:
2434
- uses: actions/checkout@v4
2535
- uses: actions-rust-lang/setup-rust-toolchain@v1
36+
- uses: actions/cache@v4
37+
with:
38+
path: |
39+
~/.cargo/registry
40+
~/.cargo/git
41+
target
42+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
2643

27-
- run: "cargo clean && cargo build --release -p schema-engine-cli"
28-
name: "Compile Migration Engine"
29-
30-
- run: "cargo clean && cargo build --release -p prisma-fmt"
31-
name: "Compile prisma-fmt"
32-
33-
- run: "cargo clean && cargo build --release -p query-engine"
34-
name: "Compile Query Engine Binary"
35-
36-
- run: "cargo clean && cargo build --release -p query-engine-node-api"
37-
name: "Compile Query Engine Library"
44+
- name: compile ${{ matrix.crate }}
45+
shell: bash
46+
env:
47+
CRATE: ${{ matrix.crate }}
48+
run: cargo build --release -p "$CRATE"
3849

3950
- name: "Check that Cargo.lock did not change"
4051
run: "git diff --exit-code"
52+
53+
test-react-native-compilation:
54+
name: React Native
55+
uses: ./.github/workflows/build-engines-react-native-template.yml
56+
with:
57+
commit: ${{ github.sha }}
58+
uploadArtifacts: false

query-engine/query-engine-node-api/tmp

Whitespace-only changes.

0 commit comments

Comments
 (0)