oozextract 0.5.2

Open source Kraken / Mermaid / Selkie / Leviathan / LZNA / Bitknit decompressor
name: build

on:
  push:
    branches: [ "dev" ]
  pull_request:
    branches: [ "dev" ]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: Swatinem/rust-cache@v2
      - uses: actions/setup-node@v4
        with:
          cache: npm
          cache-dependency-path: wasm-test/package-lock.json
      - name: Build
        run: |
          cargo install cargo-all-features wasm-pack
          wasm-pack build --profiling --target web --features wasm
          npx -y wasm-pack-inline pkg --dir pkg
      - name: Cargo tests
        run: cargo all-features test --release
      - name: Benchmark wasm
        working-directory: wasm-test
        run: |
          npm install
          npm run bench
      - uses: actions/upload-artifact@v4
        with:
          name: wasm-bench
          path: wasm-test/test-runner-profile