fix(spike): address code-review findings (should-fix + nits) #3
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
| # Spike 001 step 1 (MinGW cross-compile) — builds the mixed DLL from Linux. | |
| name: mingw-build | |
| on: | |
| push: | |
| branches: [main, spike/001-component-a] | |
| pull_request: | |
| branches: [main, spike/001-component-a] | |
| workflow_dispatch: | |
| jobs: | |
| mingw: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain (rustup) | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-pc-windows-gnu | |
| - name: Install MinGW-w64 cross-compiler + wine | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y mingw-w64 wine64 | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: mingw-${{ runner.os }}-${{ hashFiles('Cargo.lock') }} | |
| - name: Lint with clippy (deny warnings) | |
| run: cargo clippy --all-targets --features test-hooks -- -D warnings | |
| - name: Build Rust staticlib (x86_64-pc-windows-gnu) | |
| run: cargo build --release -p magos-discovery --target x86_64-pc-windows-gnu | |
| - name: Build mixed DLL + launcher | |
| run: make build | |
| - name: Verify valid PE with DllMain | |
| run: make check | |
| - name: Run C unit tests (via wine) | |
| run: make c-tests | |
| - name: Run host-side discovery tests (cargo test) | |
| env: | |
| # The oracle test resolves Darktide.exe via _local/DARKTIDE.env; in CI | |
| # (no game install) it skips cleanly rather than failing. | |
| MAGOS_CI: "1" | |
| run: cargo test --features test-hooks -p magos-discovery | |
| - name: Upload PE artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: magos-shell-mingw | |
| path: | | |
| magos_shell.dll | |
| magos_launcher.exe |