Skip to content

Commit

Permalink
Merge pull request #89 from ninegua/fix-ci-wasm-pack
Browse files Browse the repository at this point in the history
Install wasm-pack using cargo and choose nodejs version 20
  • Loading branch information
dylanhart authored Jan 8, 2025
2 parents a33a00f + 1fe0ab7 commit 7ae9502
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: ci-build
on: [push, pull_request]

env:
WASM_PACK_VERSION: 0.12.1

jobs:
do-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
Expand All @@ -18,20 +18,7 @@ jobs:
- run: cargo test --no-default-features --features=std
- run: cargo test --no-default-features

- name: Create a directory for binary dependencies
shell: bash
run: |
mkdir -p $GITHUB_WORKSPACE/bin
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
- name: Install wasm-pack
working-directory: ${{ github.workspace }}/bin
shell: bash
run: |
file_name="wasm-pack-v${WASM_PACK_VERSION}-x86_64-unknown-linux-musl"
curl \
--config ${GITHUB_WORKSPACE}/.github/curl_options \
https://github.com/rustwasm/wasm-pack/releases/download/v${WASM_PACK_VERSION}/${file_name}.tar.gz \
| tar --strip-components=1 -xzvf- "${file_name}/wasm-pack"
run: cargo install wasm-pack

- run: wasm-pack test --node
- run: ~/.cargo/bin/wasm-pack test --node

0 comments on commit 7ae9502

Please sign in to comment.