-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Generate the same output as nix when measuring size * Don't use nix in wasm-size.yml, and wasm-benchmarks.yml * Fix wasm-size job * Point base branch to head * Bring back rustup in the build script. Should be a no-op * Get rid of nix in publish-query-engine-wasm * Add build-qe-wasm to Makefile * Also output size of all providers * Do not publish cargo docs * WASM_SIZE_OUTPUT to ENGINE_SIZE_OUTPUT * Try extracting deps for rust-wasm into a workflow * Move rust-wasm-setup * Add check-schema-wasm make target * Make rust wasm setup a composite workflow * Render prisma-schema-wasm version in package.json * add newline * Specify shell following action metadata syntax * Let the build script add targets and components * Pin nightly * Use relative path to scripts because we are always in the repo root * Try to use rustup included in action runners * add wasm-pack and wasm-opt * Driver adapter tests * Add clean wrappers * Remove unnecessary building step * use make target in build-prisma-schema-wasm workflow * update publish-prisma-schema-wasm pipeline * Fix * remove outdated comment * update PENDING.md * fix measure size * Remove things from PENDING.md * Use cargo binistall to accelerate binary installation * Fix previous bug in WASM_BUILD_PROFILE * add wasm target for schema-wasm * Use standard posix bc syntax * deduplicate wasm target * Output sizes in bytes, no KiB * Remove PENDING.md * Ping cargo binstall versions * Remove nix files except the shell * Be intentional about the use of nix * Extract toml config to rust-toolchain.toml cherry-picked from #4699 * Fix shellcheck * Fix publishing prisma-schema-wasm * Address some feedback * Revert rust-toolchain.toml * Remove engine size publishing from pipeline momentarily. Read more Extracted from the scope to: https://github.com/prisma/team-orm/issues/943 * Take back publishing engine sizes * Update flake.nix --------- Co-authored-by: Alexey Orlenko <[email protected]>
- Loading branch information
Showing
21 changed files
with
305 additions
and
578 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Rust + WASM common deps | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set default toolchain | ||
shell: bash | ||
run: rustup default stable | ||
|
||
- name: Add WASM target | ||
shell: bash | ||
run: rustup target add wasm32-unknown-unknown | ||
|
||
- uses: cargo-bins/cargo-binstall@main | ||
|
||
- name: Install wasm-bindgen, wasm-opt | ||
shell: bash | ||
run: | | ||
cargo binstall -y \ | ||
[email protected] \ | ||
[email protected] | ||
- name: Install bc | ||
shell: bash | ||
run: sudo apt update && sudo apt-get install -y bc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,8 +27,5 @@ jobs: | |
git config user.email "[email protected]" | ||
git config user.name "prisma-bot" | ||
- name: Generate cargo docs for the workspace to gh-pages branch | ||
run: nix run .#publish-cargo-docs | ||
|
||
- name: Publish engines size to gh-pages branch | ||
run: nix run .#publish-engine-size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,14 +9,14 @@ on: | |
inputs: | ||
packageVersion: | ||
required: true | ||
description: 'New @prisma/query-engine-wasm package version' | ||
description: "New @prisma/query-engine-wasm package version" | ||
enginesHash: | ||
required: true | ||
description: 'prisma-engines commit to build' | ||
description: "prisma-engines commit to build" | ||
npmDistTag: | ||
required: true | ||
default: 'latest' | ||
description: 'npm dist-tag (e.g. latest or integration)' | ||
default: "latest" | ||
description: "npm dist-tag (e.g. latest or integration)" | ||
|
||
jobs: | ||
build: | ||
|
@@ -30,22 +30,24 @@ jobs: | |
with: | ||
ref: ${{ github.event.inputs.enginesHash }} | ||
|
||
- uses: cachix/install-nix-action@v24 | ||
- uses: ./.github/workflows/include/rust-wasm-setup | ||
|
||
- name: Build @prisma/query-engine-wasm | ||
run: nix run .#export-query-engine-wasm "${{ github.event.inputs.packageVersion }}" package | ||
run: make build-qe-wasm | ||
env: | ||
QE_WASM_VERSION: ${{ github.event.inputs.packageVersion }} | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
node-version: "20.x" | ||
|
||
- name: Set up NPM token for publishing | ||
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | ||
|
||
- name: Publish @prisma/query-engine-wasm | ||
run: npm publish --access public --tag ${{ github.event.inputs.npmDistTag }} | ||
working-directory: package | ||
working-directory: query-engine/query-engine-wasm/pkg | ||
|
||
# | ||
# Failure handlers | ||
|
@@ -57,7 +59,7 @@ jobs: | |
if: ${{ failure() }} | ||
uses: rtCamp/[email protected] | ||
env: | ||
SLACK_TITLE: 'Building and publishing @prisma/query-engine-wasm failed :x:' | ||
SLACK_COLOR: '#FF0000' | ||
SLACK_TITLE: "Building and publishing @prisma/query-engine-wasm failed :x:" | ||
SLACK_COLOR: "#FF0000" | ||
SLACK_CHANNEL: feed-prisma-query-engine-wasm-publish-failures | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_WASM_FAILING }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
This directory contains a nix shell that is convenient to streamline developement, however, | ||
contributors must not require to depend on nix for any specific workflow. | ||
|
||
Instead, automation should be provided in a combination of bash scripts and docker, exposed over | ||
tasks in the [root's Makefile](/Makefile) |
Oops, something went wrong.