Add some derive debug tags (#960) #2062
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: | |
| jobs: | |
| ci: | |
| name: CI | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Cargo Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo | |
| key: cargo-${{ hashFiles('Cargo.toml') }} | |
| restore-keys: | | |
| cargo-${{ hashFiles('Cargo.toml') }} | |
| cargo | |
| - name: Cargo Target Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: target | |
| key: cargo-target-${{ hashFiles('Cargo.toml') }} | |
| restore-keys: | | |
| cargo-target-${{ hashFiles('Cargo.toml') }} | |
| cargo-target | |
| - name: Read wasmtime version | |
| id: wasmtime_version | |
| shell: bash | |
| run: | | |
| VERSION=$(cargo metadata --format-version=1 --locked | jq '.packages[] | select(.name == "wasmtime") | .version' -r) | |
| echo "wasmtime_version=$VERSION" >> "$GITHUB_OUTPUT" | |
| - name: Install wasmtime-cli | |
| shell: bash | |
| run: | | |
| wget -nv 'https://github.com/bytecodealliance/wasmtime/releases/download/v${{ steps.wasmtime_version.outputs.wasmtime_version }}/wasmtime-v${{ steps.wasmtime_version.outputs.wasmtime_version }}-x86_64-linux.tar.xz' -O /tmp/wasmtime.tar.xz | |
| mkdir /tmp/wasmtime | |
| tar xvf /tmp/wasmtime.tar.xz --strip-components=1 -C /tmp/wasmtime | |
| echo "/tmp/wasmtime" >> $GITHUB_PATH | |
| - name: Install cargo-hack | |
| uses: taiki-e/install-action@cargo-hack | |
| - name: Compile plugin | |
| run: cargo build -p javy-plugin --release --target=wasm32-wasip1 | |
| - name: Test | |
| env: | |
| CARGO_TARGET_WASM32_WASIP1_RUNNER: wasmtime --dir=. | |
| run: cargo hack test --target=wasm32-wasip1 --workspace --exclude=javy-cli --exclude=javy-codegen --exclude=javy-runner --exclude=javy-test-plugin --each-feature -- --nocapture | |
| - name: Test Runner | |
| run: cargo test --package=javy-runner | |
| - name: Lint | |
| run: | | |
| cargo clippy --workspace \ | |
| --exclude=javy-cli \ | |
| --exclude=javy-codegen \ | |
| --exclude=javy-runner \ | |
| --exclude=javy-fuzz \ | |
| --target=wasm32-wasip1 --all-targets -- -D warnings | |
| # We need to specify a different job for linting `javy-runner` given that | |
| # it depends on Wasmtime and Cranelift cannot be compiled to `wasm32-wasip1` | |
| - name: Lint Runner | |
| run: cargo clippy --package=javy-runner -- -D warnings | |
| - name: Build test-plugin | |
| run: | | |
| cargo build --package=javy-test-plugin --release --target=wasm32-wasip1 | |
| CARGO_PROFILE_RELEASE_LTO=off cargo build --package=javy-cli --release | |
| target/release/javy init-plugin target/wasm32-wasip1/release/test_plugin.wasm -o crates/runner/test_plugin.wasm | |
| - name: Test CLI | |
| run: CARGO_PROFILE_RELEASE_LTO=off cargo test --package=javy-cli --release -- --nocapture | |
| - name: Test CodeGen | |
| run: | | |
| target/release/javy emit-plugin -o crates/codegen/default_plugin.wasm | |
| CARGO_PROFILE_RELEASE_LTO=off cargo hack test --package=javy-codegen --release --each-feature -- --nocapture | |
| - name: Check benchmarks | |
| run: CARGO_PROFILE_RELEASE_LTO=off cargo check --package=javy-cli --release --benches | |
| - name: Lint CLI | |
| run: | | |
| cargo fmt -- --check | |
| CARGO_PROFILE_RELEASE_LTO=off cargo clippy --package=javy-cli --release --all-targets -- -D warnings | |
| - name: Lint CodeGen | |
| run: | | |
| cargo fmt -- --check | |
| CARGO_PROFILE_RELEASE_LTO=off cargo hack clippy --package=javy-codegen --release --all-targets --each-feature -- -D warnings | |
| - name: WPT | |
| run: | | |
| npm install --prefix wpt | |
| npm test --prefix wpt |