Skip to content

0.15.0

0.15.0 #465

Workflow file for this run

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:
test:
name: Test
strategy:
fail-fast: false
matrix:
config:
- { os: ubuntu-latest, build: "npm run build", test: "npm run test", cacheDirectory: "build-release", cacheKeySuffix: "", enableAot: "0" }
- { os: ubuntu-latest, build: "npm run build:weval", test: "npm run test:weval", cacheDirectory: "build-release-weval", cacheKeySuffix: "-weval", enableAot: "1" }
runs-on: ${{ matrix.config.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install Rust Toolchain
run: |
rustup toolchain install 1.77.1
rustup target add wasm32-wasi --toolchain 1.77.1
rustup target add wasm32-wasi
- uses: actions/setup-node@v2
with:
node-version: '22'
- name: Cache Rust dependencies
uses: actions/cache@v3
id: rust-build
with:
path: target
key: engine-build-${{ hashFiles('Cargo.lock', 'crates/spidermonkey-embedding-splicer/src/**/*.rs') }}
- name: Install NPM packages
run: npm ci
- name: Get StarlingMonkey Commit
id: starlingmonkey-commit
run: echo "STARLINGMONKEY_HASH=$(git submodule status | head -c9 | tail -c8)" >> "$GITHUB_OUTPUT"
- name: Cache StarlingMonkey
uses: actions/cache@v3
id: starlingmonkey-build
with:
path: ${{matrix.config.cacheDirectory}}
key: engine-build${{matrix.config.cacheKeySuffix}}-${{ steps.starlingmonkey-commit.outputs.STARLINGMONKEY_HASH }}
- name: Build
run: ${{matrix.config.build}}
- name: Test
run: ${{matrix.config.test}}
- name: Cache Example build
uses: actions/cache@v3
with:
path: example/target
key: engine-cargo-${{ hashFiles('example/src/main.rs', 'example/Cargo.lock', 'example/hello.wit') }}
- name: Test Example
run: cd example && ENABLE_AOT=${{matrix.config.enableAot}} npm run build && ./test.sh
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust
run: rustup update stable && rustup default stable && rustup component add rustfmt
- name: Format source code
run: cargo fmt -- --check