Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export QE_LOG_LEVEL=debug # Set it to "trace" to enable query-graph debugging lo
export FMT_SQL=1 # Uncomment it to enable logging formatted SQL queries

### Uncomment to run driver adapters tests. See query-engine-driver-adapters.yml workflow for how tests run in CI.
# export EXTERNAL_TEST_EXECUTOR="napi"
# export DRIVER_ADAPTER=pg # Set to pg, neon, planetscale, libsql or cfd1
# export PRISMA_DISABLE_QUAINT_EXECUTORS=1 # Disable quaint executors for driver adapters
# export DRIVER_ADAPTER_URL_OVERRIDE ="postgres://USER:PASSWORD@DATABASExxxx" # Override the database url for the driver adapter tests
Expand Down
15 changes: 1 addition & 14 deletions .github/workflows/build-engines-apple-intel-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,11 @@ jobs:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- run: |
cargo build --release -p query-engine -p query-engine-node-api -p schema-engine-cli -p prisma-fmt

- name: Rename files
working-directory: ${{ github.workspace }}/target/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 .
cargo build --release -p schema-engine-cli -p prisma-fmt

- uses: actions/upload-artifact@v4
with:
name: darwin
path: |
${{ github.workspace }}/target/release/schema-engine
${{ github.workspace }}/target/release/prisma-fmt
${{ github.workspace }}/target/release/query-engine
${{ github.workspace }}/target/release/libquery_engine.dylib.node
15 changes: 1 addition & 14 deletions .github/workflows/build-engines-apple-silicon-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,11 @@ jobs:
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 .
cargo build --target=aarch64-apple-darwin --release -p schema-engine-cli -p prisma-fmt

- 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
28 changes: 2 additions & 26 deletions .github/workflows/build-engines-linux-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,31 +131,19 @@ jobs:
TARGET_NAME: ${{ matrix.target.name }}
RELEASE_DIR: ${{ github.workspace }}/target/release
run: |
echo "Files in target/release before renaming"
echo "Files in target/release"
ls -la $RELEASE_DIR

echo "Copying files to engines-artifacts"
cp -r $RELEASE_DIR/ engines-artifacts

echo "Rename libquery_engine.so to libquery_engine.so.node for non-static targets"
if [[ "$TARGET_NAME" == *-static-* ]]; then
echo "Current target is static. Skipping."
else
mv engines-artifacts/libquery_engine.so engines-artifacts/libquery_engine.so.node
fi

echo "Files in engines-artifacts after renaming"
ls -la engines-artifacts

- name: Upload artifacts for "release" target
uses: actions/upload-artifact@v4
if: ${{ matrix.target.target_path == '' }}
with:
name: '${{ matrix.target.name }}'
path: |
${{ github.workspace }}/engines-artifacts/libquery_engine.so.node
${{ github.workspace }}/engines-artifacts/schema-engine
${{ github.workspace }}/engines-artifacts/query-engine
${{ github.workspace }}/engines-artifacts/prisma-fmt

- name: Prepare files for "${{ matrix.target.name }}" target
Expand All @@ -164,29 +152,17 @@ jobs:
TARGET_NAME: ${{ matrix.target.name }}
RELEASE_DIR: ${{ github.workspace }}/target/${{ matrix.target.target_path }}/release
run: |
echo "Files in target/release before renaming"
echo "Files in target/release"
ls -la $RELEASE_DIR

echo "Copying files to engines-artifacts"
cp -r $RELEASE_DIR/ engines-artifacts

echo "Rename libquery_engine.so to libquery_engine.so.node for non-static targets"
if [[ "$TARGET_NAME" == *-static-* ]]; then
echo "Current target is static. Skipping."
else
mv engines-artifacts/libquery_engine.so engines-artifacts/libquery_engine.so.node
fi

echo "Files in engines-artifacts after renaming"
ls -la engines-artifacts

- name: Upload artifacts for "${{ matrix.target.name }}" target
uses: actions/upload-artifact@v4
if: ${{ matrix.target.target_path != '' }}
with:
name: ${{ matrix.target.name }}
path: |
${{ github.workspace }}/engines-artifacts/libquery_engine.so.node
${{ github.workspace }}/engines-artifacts/schema-engine
${{ github.workspace }}/engines-artifacts/query-engine
${{ github.workspace }}/engines-artifacts/prisma-fmt
102 changes: 0 additions & 102 deletions .github/workflows/build-engines-react-native-template.yml

This file was deleted.

16 changes: 1 addition & 15 deletions .github/workflows/build-engines-windows-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,11 @@ jobs:

- uses: actions-rust-lang/setup-rust-toolchain@v1

- run: cargo build --release -p query-engine -p query-engine-node-api -p schema-engine-cli -p prisma-fmt

- name: Rename files
working-directory: ${{ github.workspace }}/target/release/
run: |
echo "Files in target/release before renaming"
ls .

mv query_engine.dll query_engine.dll.node
mv query-engine.exe query-engine.exe

echo "Files in target/release after renaming"
ls .
- run: cargo build --release -p schema-engine-cli -p prisma-fmt

- uses: actions/upload-artifact@v4
with:
name: windows
path: |
${{ github.workspace }}/target/release/prisma-fmt.exe
${{ github.workspace }}/target/release/schema-engine.exe
${{ github.workspace }}/target/release/query-engine.exe
${{ github.workspace }}/target/release/query_engine.dll.node
17 changes: 0 additions & 17 deletions .github/workflows/build-engines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,6 @@ jobs:
with:
commit: ${{ github.sha }}

build-react-native:
name: Build Engines for React native
needs:
- is-release-necessary
if: ${{ needs.is-release-necessary.outputs.release == 'true' }}
uses: ./.github/workflows/build-engines-react-native-template.yml
with:
commit: ${{ github.sha }}

build-windows:
name: Build Engines for Windows
needs:
Expand All @@ -189,7 +180,6 @@ jobs:
- build-linux
- build-macos-intel
- build-macos-silicon
- build-react-native
- build-windows
env:
BUCKET_NAME: 'prisma-builds'
Expand Down Expand Up @@ -250,13 +240,6 @@ jobs:
cp -r rhel-openssl-1.1.x debian-openssl-1.1.x
cp -r rhel-openssl-3.0.x debian-openssl-3.0.x

- name: Create .zip for react-native
working-directory: engines-artifacts
run: |
mkdir react-native
zip -r react-native/binaries.zip ios android
rm -rf ios android

- name: 'Create compressed engine files (.gz)'
working-directory: engines-artifacts
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'QE: Codespeed benchmarks'
name: 'QC: Codespeed benchmarks'
on:
push:
branches:
Expand Down Expand Up @@ -28,8 +28,8 @@ jobs:
- name: 'Build the benchmark targets: schema'
run: cargo codspeed build -p schema --features all_connectors

- name: 'Build the benchmark targets: request-handlers'
run: cargo codspeed build -p request-handlers --features all
- name: 'Build the benchmark targets: core-tests'
run: cargo codspeed build -p core-tests

- name: Run the benchmarks
uses: CodSpeedHQ/action@v3
Expand Down
40 changes: 17 additions & 23 deletions .github/workflows/on-push-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- next

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -21,23 +22,18 @@ jobs:

- uses: ./.github/workflows/include/rust-wasm-setup

- name: Build native engines
run: |
cargo build --release -p query-engine -p query-engine-node-api
mv target/release/libquery_engine.{so,node}

- name: Build WASM engines
- name: Build WASM modules
env:
WASM_BUILD_PROFILE: release
PKG_DIR: query-engine/query-engine-wasm/pkg
TARGET_DIR: target/query-engine-wasm
PKG_DIR: query-compiler/query-compiler-wasm/pkg
TARGET_DIR: target/query-compiler-wasm
run: |
make build-qe-wasm-gz
make build-qc-wasm-gz
mkdir -p $TARGET_DIR

for provider in "postgresql" "mysql" "sqlite" "sqlserver" "cockroachdb"; do
cp $PKG_DIR/$provider/query_engine_bg.wasm $TARGET_DIR/query-engine-$provider.wasm
cp $PKG_DIR/$provider.gz $TARGET_DIR/query-engine-$provider.wasm.gz
cp $PKG_DIR/$provider/query_compiler_bg.wasm $TARGET_DIR/query-compiler-$provider.wasm
cp $PKG_DIR/$provider.gz $TARGET_DIR/query-compiler-$provider.wasm.gz
done

- name: Check out gh-pages branch
Expand All @@ -48,18 +44,16 @@ jobs:
- name: Update engines size
run: |
files=(
target/release/query-engine
target/release/libquery_engine.node
target/query-engine-wasm/query-engine-postgresql.wasm.gz
target/query-engine-wasm/query-engine-postgresql.wasm
target/query-engine-wasm/query-engine-mysql.wasm.gz
target/query-engine-wasm/query-engine-mysql.wasm
target/query-engine-wasm/query-engine-sqlite.wasm.gz
target/query-engine-wasm/query-engine-sqlite.wasm
target/query-engine-wasm/query-engine-sqlserver.wasm.gz
target/query-engine-wasm/query-engine-sqlserver.wasm
target/query-engine-wasm/query-engine-cockroachdb.wasm.gz
target/query-engine-wasm/query-engine-cockroachdb.wasm
target/query-compiler-wasm/query-compiler-postgresql.wasm.gz
target/query-compiler-wasm/query-compiler-postgresql.wasm
target/query-compiler-wasm/query-compiler-mysql.wasm.gz
target/query-compiler-wasm/query-compiler-mysql.wasm
target/query-compiler-wasm/query-compiler-sqlite.wasm.gz
target/query-compiler-wasm/query-compiler-sqlite.wasm
target/query-compiler-wasm/query-compiler-sqlserver.wasm.gz
target/query-compiler-wasm/query-compiler-sqlserver.wasm
target/query-compiler-wasm/query-compiler-cockroachdb.wasm.gz
target/query-compiler-wasm/query-compiler-cockroachdb.wasm
)

DATE_TIME="$(date -u --iso-8601=seconds)"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-query-compiler-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Build @prisma/query-compiler-wasm
run: make build-qc-wasm
env:
QE_WASM_VERSION: ${{ github.event.inputs.packageVersion }}
QC_WASM_VERSION: ${{ github.event.inputs.packageVersion }}

- name: Install Node.js
uses: actions/setup-node@v4
Expand Down
Loading
Loading