Repository navigation
deps: bump js-component-bindgen crate #1065
Workflow file for this run
This file contains hidden or 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
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| defaults: | |
| run: | |
| shell: bash | |
| # Cancel any in-flight jobs for the same PR/branch so there's only one active | |
| # at a time | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| run: | | |
| rustup update stable | |
| rustup default stable | |
| rustup component add rustfmt | |
| - name: Format source code | |
| run: cargo fmt -- --check | |
| - name: Run clippy | |
| run: cargo clippy --workspace --all-targets --all-features | |
| ######### | |
| # Build # | |
| ######### | |
| build-splicer: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| node-version: | |
| - '24.10.0' | |
| rust-version: | |
| - 'stable' | |
| os: | |
| - windows-latest | |
| - ubuntu-latest | |
| - macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache Splicer build | |
| uses: actions/cache@v4 | |
| id: splicer-build | |
| with: | |
| key: splicer-${{ matrix.os }}-${{ hashFiles('Cargo.lock', 'crates/spidermonkey-embedding-splicer/src/**/*.rs') }} | |
| path: | | |
| lib | |
| target | |
| - name: Install Rust Toolchain | |
| if: steps.splicer-build.outputs.cache-hit != 'true' | |
| run: | | |
| rustup toolchain install ${{ matrix.rust-version }} | |
| rustup target add wasm32-wasip1 --toolchain ${{ matrix.rust-version }} | |
| rustup target add wasm32-wasip1 | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| if: steps.splicer-build.outputs.cache-hit != 'true' | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install NPM packages | |
| if: steps.splicer-build.outputs.cache-hit != 'true' | |
| run: npm install | |
| - name: Build splicer | |
| if: steps.splicer-build.outputs.cache-hit != 'true' | |
| run: make lib/spidermonkey-embedding-splicer.js | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| needs: | |
| - build-splicer | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: | |
| - '24.10.0' | |
| rust-version: | |
| - 'stable' | |
| os: | |
| # NOTE: at present the build does *not* work on windows. Required binaries are built here | |
| # (only on linux) and reused in later steps | |
| - ubuntu-latest | |
| build-type: | |
| - 'release' | |
| - 'debug' | |
| - 'weval' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Get native engine source hash | |
| id: starlingmonkey-commit | |
| # Include the embedding; Git objects avoid checkout line-ending differences. | |
| run: echo "STARLINGMONKEY_HASH=$(git ls-tree -z HEAD -- StarlingMonkey embedding | git hash-object --stdin)" >> "$GITHUB_OUTPUT" | |
| - uses: actions/cache@v4 | |
| id: starlingmonkey-build | |
| with: | |
| key: starlingmonkey-${{matrix.build-type}}-${{ steps.starlingmonkey-commit.outputs.STARLINGMONKEY_HASH }} | |
| path: lib | |
| - name: Install Rust Toolchain | |
| if: steps.starlingmonkey-build.outputs.cache-hit != 'true' | |
| run: | | |
| rustup toolchain install ${{ matrix.rust-version }} | |
| rustup target add wasm32-wasip1 --toolchain ${{ matrix.rust-version }} | |
| rustup target add wasm32-wasip1 | |
| - name: Install wasm-tools | |
| if: steps.starlingmonkey-build.outputs.cache-hit != 'true' | |
| run: cargo install wasm-tools | |
| - name: Restore Embedding Splicer from cache | |
| uses: actions/cache/restore@v4 | |
| id: splicer-build | |
| with: | |
| key: splicer-${{ matrix.os }}-${{ hashFiles('Cargo.lock', 'crates/spidermonkey-embedding-splicer/src/**/*.rs') }} | |
| path: | | |
| lib | |
| target | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| if: steps.starlingmonkey-build.outputs.cache-hit != 'true' | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install NPM packages | |
| if: steps.starlingmonkey-build.outputs.cache-hit != 'true' | |
| run: npm install | |
| - name: Build ComponentizeJS | |
| if: steps.starlingmonkey-build.outputs.cache-hit != 'true' | |
| run: | | |
| npm run clean | |
| npm run build:${{matrix.build-type}} | |
| ######## | |
| # Test # | |
| ######## | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| needs: | |
| - build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: | |
| - '24.10.0' | |
| - latest # reenable when https://github.com/nodejs/node/issues/57172 is fixed | |
| os: | |
| - ubuntu-latest | |
| - windows-latest | |
| - macos-latest | |
| build-type: | |
| - 'release' | |
| - 'debug' | |
| - 'weval' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Get native engine source hash | |
| id: starlingmonkey-commit | |
| run: echo "STARLINGMONKEY_HASH=$(git ls-tree -z HEAD -- StarlingMonkey embedding | git hash-object --stdin)" >> "$GITHUB_OUTPUT" | |
| - name: Restore StarlingMonkey build from cache | |
| uses: actions/cache/restore@v4 | |
| id: restore-starlingmonkey-jit-build | |
| with: | |
| enableCrossOsArchive: true | |
| key: starlingmonkey-${{matrix.build-type}}-${{ steps.starlingmonkey-commit.outputs.STARLINGMONKEY_HASH }} | |
| path: lib | |
| - name: Restore Embedding Splicer from cache | |
| uses: actions/cache/restore@v4 | |
| id: splicer-build | |
| with: | |
| key: splicer-${{ matrix.os }}-${{ hashFiles('Cargo.lock', 'crates/spidermonkey-embedding-splicer/src/**/*.rs') }} | |
| path: | | |
| lib | |
| target | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| with: | |
| node-version: ${{matrix.node-version}} | |
| - name: Install NPM packages | |
| run: npm install | |
| - name: Test | |
| run: | | |
| npm run test:${{matrix.build-type}} | |
| test-example: | |
| runs-on: ${{ matrix.os }} | |
| needs: | |
| - build | |
| strategy: | |
| matrix: | |
| node-version: | |
| - '24.10.0' | |
| os: | |
| - ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Get native engine source hash | |
| id: starlingmonkey-commit | |
| run: echo "STARLINGMONKEY_HASH=$(git ls-tree -z HEAD -- StarlingMonkey embedding | git hash-object --stdin)" >> "$GITHUB_OUTPUT" | |
| - name: Restore StarlingMonkey build from cache | |
| uses: actions/cache/restore@v4 | |
| id: restore-starlingmonkey-jit-build | |
| with: | |
| key: starlingmonkey-release-${{ steps.starlingmonkey-commit.outputs.STARLINGMONKEY_HASH }} | |
| path: lib | |
| - name: Restore Embedding Splicer from cache | |
| uses: actions/cache/restore@v4 | |
| id: splicer-build | |
| with: | |
| key: splicer-${{ matrix.os }}-${{ hashFiles('Cargo.lock', 'crates/spidermonkey-embedding-splicer/src/**/*.rs') }} | |
| path: | | |
| lib | |
| target | |
| - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install NPM packages | |
| run: npm install | |
| - name: Cache Example build | |
| uses: actions/cache@v4 | |
| with: | |
| path: 'examples/hello-world/host/target/release/wasmtime-test*' | |
| key: example-hello-world-cargo-${{ hashFiles('examples/hello-world/host/src/main.rs', | |
| 'examples/hello-world/host/Cargo.lock', | |
| 'examples/hello-world/guest/hello.wit') }} | |
| - name: Test Example | |
| run: | | |
| cd examples/hello-world | |
| ./test.sh |