Multiboot Testing #149
Workflow file for this run
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: gba_test | |
| on: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: rust-src | |
| - run: sudo apt-get install binutils-arm-none-eabi | |
| - run: cd gba_test && cargo test --features log --no-run --message-format=json | tee results.json | |
| - run: echo "ROM_PATH=$(cd tests/parse_executable && cargo run ../../gba_test/results.json )" >> $GITHUB_ENV | |
| - run: arm-none-eabi-objcopy -O binary ${{ env.ROM_PATH }} test.gba | |
| - run: cargo install gbafix | |
| - run: gbafix test.gba | |
| - uses: felixjones/github-mgba-rom-test@v1 | |
| with: | |
| swi-call: 0x27 | |
| read-register: 'r0' | |
| rom-path: test.gba | |
| success-code: 0 # Pass | |
| test_mb: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: rust-src | |
| - run: sudo apt-get install binutils-arm-none-eabi | |
| - run: cd gba_test && cargo test --features log --no-run --message-format=json | tee results.json | |
| env: | |
| RUSTFLAGS: -Clinker=arm-none-eabi-ld -Clink-arg=-Tgba.ld -Ztrap-unreachable=no --cfg gba_test_mb | |
| - run: echo "ROM_PATH=$(cd tests/parse_executable && cargo run ../../gba_test/results.json )" >> $GITHUB_ENV | |
| - run: arm-none-eabi-objcopy -O binary ${{ env.ROM_PATH }} test.mb.gba | |
| - run: cargo install gbafix | |
| - run: gbafix test.mb.gba | |
| - uses: felixjones/github-mgba-rom-test@v1 | |
| with: | |
| swi-call: 0x27 | |
| read-register: 'r0' | |
| rom-path: test.mb.gba | |
| success-code: 0 # Pass | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: rust-src | |
| - run: cd gba_test && cargo check | |
| clippy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: clippy, rust-src | |
| - run: cd gba_test && cargo clippy -- --deny warnings | |
| fmt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: rustfmt | |
| - run: cd gba_test && cargo fmt -- --check |