name: Build ROM on: push: branches: [main, master] pull_request: workflow_dispatch: jobs: fmt: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v6 - name: Install toolchain from rust-toolchain.toml uses: mkroening/rust-toolchain-toml@v1.3.5 - name: Check formatting run: cargo fmt --all --check build-rom: runs-on: ubuntu-latest strategy: fail-fast: false matrix: include: - name: base args: "" - name: base-cycle-timing args: "--features cycle,timing" steps: - name: Checkout uses: actions/checkout@v6 - name: Install toolchain from rust-toolchain.toml uses: mkroening/rust-toolchain-toml@v1.3.5 - name: Install stable toolchain for nust64 run: rustup toolchain install stable --profile minimal - name: Install nust64 # Pinned: nust64 bundles the IPL3; an unpinned bump can break booting. run: cargo +stable install nust64 --version 0.4.1 --locked - name: Build ROM (${{ matrix.name }}) run: cargo run --release ${{ matrix.args }} env: # Fail the build on any warning. RUSTFLAGS overrides the config's target rustflags, so the # linker-plugin-lto flag from .cargo/config.toml has to be repeated here. RUSTFLAGS: "-Clinker-plugin-lto -D warnings" - name: Upload ROM artifact uses: actions/upload-artifact@v6 with: name: n64-systemtest-${{ matrix.name }}-z64 path: target/mips-nintendo64-none/release/n64-systemtest.z64 if-no-files-found: error