|
| 1 | +name: Public source checks |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + push: |
| 6 | + branches: [main] |
| 7 | + workflow_dispatch: |
| 8 | + |
| 9 | +permissions: |
| 10 | + contents: read |
| 11 | + |
| 12 | +concurrency: |
| 13 | + group: public-checks-${{ github.ref }} |
| 14 | + cancel-in-progress: true |
| 15 | + |
| 16 | +jobs: |
| 17 | + tools-and-policy: |
| 18 | + name: ROM-free tools and source policy |
| 19 | + runs-on: ubuntu-24.04 |
| 20 | + timeout-minutes: 30 |
| 21 | + env: |
| 22 | + CARGO_TARGET_DIR: ${{ github.workspace }}/tools/out/cargo-target |
| 23 | + RUSTUP_TOOLCHAIN: 1.98.1 |
| 24 | + steps: |
| 25 | + - name: Check out source and approved compiler sources |
| 26 | + uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 |
| 27 | + with: |
| 28 | + submodules: true |
| 29 | + persist-credentials: false |
| 30 | + |
| 31 | + - name: Install the pinned Rust toolchain |
| 32 | + run: rustup toolchain install "$RUSTUP_TOOLCHAIN" --profile minimal --component rustfmt |
| 33 | + |
| 34 | + - name: Fetch locked public Rust dependencies |
| 35 | + run: cargo fetch --locked --manifest-path tools/Cargo.toml |
| 36 | + |
| 37 | + - name: Build the source checker |
| 38 | + run: cargo build --locked --offline --release --manifest-path tools/Cargo.toml -p alchemy |
| 39 | + |
| 40 | + - name: Build pinned binutils for synthetic ELF tests |
| 41 | + run: tools/out/cargo-target/release/alchemy bootstrap --binutils |
| 42 | + |
| 43 | + - name: Test coverage failure paths with synthetic objects |
| 44 | + run: >- |
| 45 | + env PATH="$PWD/tools/out/binutils/bin:$PATH" |
| 46 | + cargo test --locked --offline --release --manifest-path tools/Cargo.toml |
| 47 | + -p alchemy --bin alchemy -- coverage::calcrom::tests::symbol_inspection_ |
| 48 | +
|
| 49 | + - name: Test asset encoders and analysis tools on synthetic inputs |
| 50 | + run: cargo test --locked --offline --release --manifest-path tools/Cargo.toml -p ags -p psynergy |
| 51 | + |
| 52 | + - name: Test Alchemy command-line behavior |
| 53 | + run: cargo test --locked --offline --release --manifest-path tools/Cargo.toml -p alchemy --test cli |
| 54 | + |
| 55 | + # These suites need neither ROMs nor the installed game compilers. |
| 56 | + # Compiler execution and the complete preprocessed C audit remain in make land. |
| 57 | + - name: Test publication, routing, parsing and guarded rewrites |
| 58 | + run: >- |
| 59 | + cargo test --locked --offline --release --manifest-path tools/Cargo.toml |
| 60 | + -p alchemy --bin alchemy -- --include-ignored |
| 61 | + check::publication:: check::layout:: check::commit_progress:: |
| 62 | + compiler::routing::target_tests::only_ compiler::no_asm:: compiler::steering:: |
| 63 | + permute::ast:: permute::lex:: permute::parse:: permute::effects:: |
| 64 | + permute::types:: permute::mutate:: permute::score:: permute::tests::minimizing_ |
| 65 | + verify::tests:: |
| 66 | +
|
| 67 | + # The publication scan checks tracked formats/content and editable asset |
| 68 | + # layout. Its optional local-ROM logo comparison cannot run here. |
| 69 | + # ROM equality, executable coverage and game-compiler checks stay local. |
| 70 | + - name: Check public source and pinned compiler provenance |
| 71 | + run: >- |
| 72 | + make ALCHEMY=tools/out/cargo-target/release/alchemy |
| 73 | + rustfmt-check native-format-check publication-tree-check tooling-index-check |
| 74 | + language-check corpus-check standard-check compiler-source-check |
0 commit comments