Skip to content

Commit

Permalink
Merge branch 'main' into integration/jemalloc
Browse files Browse the repository at this point in the history
  • Loading branch information
aqrln authored Jan 7, 2025
2 parents 7183e55 + 51db5cf commit d84addb
Show file tree
Hide file tree
Showing 333 changed files with 8,028 additions and 3,913 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[*.{yml,yaml}]
indent_style = space
indent_size = 2
7 changes: 2 additions & 5 deletions .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,11 @@ fi
# export TEST_CONNECTOR="postgres"
# export TEST_CONNECTOR_VERSION="10"

# Set up env vars and build inputs from flake.nix automatically for nix users.
# Set up env vars and build inputs from shell.nix automatically for nix users.
# If you don't use nix, you can safely ignore this.
# You can set the DISABLE_NIX environment variable if you're in an environment
# where nix is pre-installed (e.g. gitpod) but you don't want to use it.
if command -v nix &> /dev/null && [ -z ${DISABLE_NIX+x} ]
then
if nix flake metadata > /dev/null; then
watch_file nix/shell.nix nix/all-engines.nix nix/args.nix
use flake
fi
use nix
fi
4 changes: 2 additions & 2 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ concurrency:

jobs:
run:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
Expand All @@ -34,7 +34,7 @@ jobs:
run: cargo codspeed build -p request-handlers --features all

- name: Run the benchmarks
uses: CodSpeedHQ/action@v2
uses: CodSpeedHQ/action@v3
with:
run: cargo codspeed run
token: ${{ secrets.CODSPEED_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
# it is a shortcut for `--lib --bins --tests --benches --examples`.
- run: |
cargo clippy --workspace --all-features --all-targets
cargo clippy --all-features --all-targets -p query-engine-wasm --target wasm32-unknown-unknown
cargo clippy --all-features --all-targets -p query-engine-wasm -p prisma-schema-build --target wasm32-unknown-unknown
rustfmt:
runs-on: ubuntu-latest
Expand Down
70 changes: 59 additions & 11 deletions .github/workflows/on-push-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,68 @@ concurrency:
jobs:
publish-to-gh-pages:
runs-on: ubuntu-latest
strategy:
fail-fast: true

env:
CSV_PATH: engines-size/data.csv

steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
with:
# we need internet access for the moment
extra_nix_config: |
sandbox = false

- run: |
- 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
env:
WASM_BUILD_PROFILE: release
PKG_DIR: query-engine/query-engine-wasm/pkg
TARGET_DIR: target/query-engine-wasm
run: |
make build-qe-wasm-gz
mkdir -p $TARGET_DIR
for provider in "postgresql" "mysql" "sqlite"; 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
done
- name: Check out gh-pages branch
run: |
git fetch --depth=1 origin gh-pages
git checkout origin/gh-pages
- 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
)
DATE_TIME="$(date -u --iso-8601=seconds)"
if [[ ! -f $CSV_PATH ]]; then
echo "date_time,branch,commit,file,size_bytes" > "$CSV_PATH"
fi
for file in "${files[@]}"; do
file_name=$(basename "$file")
size=$(stat -c %s "$file")
echo "$DATE_TIME,$GITHUB_REF_NAME,$GITHUB_SHA,$file_name,$size" >> "$CSV_PATH"
done
- name: Commit the changes
run: |
git config user.email "[email protected]"
git config user.name "prisma-bot"
- name: Publish engines size to gh-pages branch
run: nix run .#publish-engine-size
git add "$CSV_PATH"
git commit --quiet -m "update engines size for $GITHUB_SHA"
git push origin '+HEAD:gh-pages'
4 changes: 2 additions & 2 deletions .github/workflows/test-driver-adapters-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node_version: ["18"]
node_version: ["20"]
partition: ["1/4", "2/4", "3/4", "4/4"]
env:
LOG_LEVEL: "info" # Set to "debug" to trace the query engine and node process running the driver adapter
Expand Down Expand Up @@ -42,7 +42,7 @@ jobs:
- name: "Setup pnpm"
uses: pnpm/[email protected]
with:
version: 8
version: 9

- name: "Login to Docker Hub"
uses: docker/login-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wasm-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: "Setup pnpm"
uses: pnpm/[email protected]
with:
version: 8
version: 9

- name: "Login to Docker Hub"
uses: docker/login-action@v3
Expand Down
1 change: 0 additions & 1 deletion Brewfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
brew "docker"
brew "protobuf"
brew "direnv"
brew "rustup-init"
Loading

0 comments on commit d84addb

Please sign in to comment.