-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
49371b4
commit 2aede07
Showing
2 changed files
with
20 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,35 +10,37 @@ jobs: | |
- name: Checkout own repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: "Checkout surrealdb.wasm repo (latest tag)" | ||
- name: Checkout surrealdb.wasm repo (latest tag) | ||
run: | | ||
git clone https://github.com/surrealdb/surrealdb.wasm.git | ||
cd surrealdb.wasm;export LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) | ||
git checkout $LATEST_TAG | ||
- name: "Install Node & NPM" | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.x" | ||
registry-url: "https://registry.npmjs.org" | ||
- name: Install pnpm | ||
uses: pnpm/[email protected] | ||
|
||
|
||
- name: "Install wasm-pack" | ||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
#- name: Install wasm-pack | ||
# run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
|
||
- name: "Install surrealdb.wasm NPM dependencies" | ||
run: cd surrealdb.wasm;npm install | ||
- name: Install surrealdb.wasm NPM dependencies | ||
run: cd surrealdb.wasm;pnpm install | ||
|
||
- name: "Build" | ||
run: cd surrealdb.wasm;wasm-pack build --release --target web --out-name index --out-dir ../assets/wasm/surrealdb --no-default-features --features kv-indxdb,kv-mem | ||
- name: Build | ||
run: | | ||
cd surrealdb.wasm | ||
make build | ||
cp ./dist/embedded/esm.bundled.js ../assets/wasm/surrealdb | ||
cp ./dist/embedded/index_bg.wasm ../assets/wasm/surrealdb | ||
- name: "Install NPM dependencies" | ||
run: npm install | ||
run: pnpm install | ||
|
||
- name: "Minify and compress JavaScript files" | ||
run: npm run package | ||
run: pnpm run package | ||
|
||
- name: "Compress wasm file" | ||
run: npm run compress-wasm | ||
run: pnpm run compress-wasm | ||
|
||
- name: Git commit compressed surrealdb_wasm assets | ||
run: | | ||
|
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