# SPDX-License-Identifier: MIT name: CI # Kept small: main and pull requests, superseded runs cancelled. The lockstep # gate (rungs 2-6) needs the reference on PyPy and the SuperGrafx cards, which # are the user's, and runs by hand (README). CI runs the build, the # transcribed unit tests (rung 1; the Covell test is skipped without $COVELL) # and the library for wasm32-unknown-unknown. # # pcengine-rust comes in by path from a sibling clone at 26ea621 (Cargo.toml), # and through it huc6280-rust from a sibling clone at e1d24a3; both are cloned # below. Those commits are not on GitHub yet, so CI fails at the clone until # both are pushed (then Cargo.toml may go back to the git pin it names, and the # clone steps can go). on: push: branches: [main] pull_request: concurrency: group: ci-${{ github.ref }} cancel-in-progress: true env: CARGO_TERM_COLOR: always jobs: build: name: fmt, clippy, test, wasm runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: pcengine-rust 26ea621 and huc6280-rust e1d24a3 beside this repository run: | git clone -q https://github.com/alewman/pcengine-rust ../pcengine-rust git -C ../pcengine-rust checkout -q 26ea62123184ebef7daca7955cb47446b692a8c1 git clone -q https://github.com/alewman/huc6280-rust ../huc6280-rust git -C ../huc6280-rust checkout -q e1d24a395743779d5fa13aa70e7590f4821345f3 - uses: dtolnay/rust-toolchain@stable with: components: rustfmt, clippy targets: wasm32-unknown-unknown - run: cargo fmt --check - run: cargo clippy --release --all-targets -- -D warnings - run: cargo test --release - run: cargo build --release --lib --target wasm32-unknown-unknown