name: CI on: push: branches: - master pull_request: branches: - "**" env: CARGO_TERM_COLOR: always CARGO_INCREMENTAL: 0 jobs: tests: name: Unix tests runs-on: ${{ matrix.os }} strategy: fail-fast: true matrix: os: [macos-latest, ubuntu-latest] toolchain: [stable] steps: - name: Checkout repo uses: actions/checkout@v2 - name: Cache artifacts uses: actions/cache@v2 with: path: | ~/.cargo/registry ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }} - name: Install rust uses: actions-rs/toolchain@v1 with: toolchain: ${{ matrix.toolchain }} profile: minimal override: true - name: Install emscripten run: eval $(script/fetch-emscripten) if: matrix.os == 'macos-latest' - name: Build C library run: make - name: Build wasm library run: script/build-wasm - name: Build CLI run: cargo build --release - name: Set up fixture parsers run: | script/fetch-fixtures script/generate-fixtures script/generate-fixtures-wasm - name: Run main tests run: script/test - name: Run wasm tests run: script/test-wasm - name: Run benchmarks run: script/benchmark