45 lines
1.5 KiB
YAML
45 lines
1.5 KiB
YAML
name: Rust validation
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
format:
|
|
name: Formatting
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt
|
|
- run: cargo fmt --all -- --check
|
|
|
|
windows:
|
|
name: Windows x64 build and tests
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: x86_64-pc-windows-msvc
|
|
components: clippy
|
|
- uses: Swatinem/rust-cache@v2
|
|
- name: Build release executable
|
|
run: cargo build --target x86_64-pc-windows-msvc --release -p eonacat-xsbox-engine
|
|
- name: Publish Windows launcher
|
|
run: dotnet publish launcher/windows/EonaCat.XSBOX.Launcher.csproj --configuration Release --runtime win-x64 --self-contained false --output target/x86_64-pc-windows-msvc/release/launcher
|
|
- name: Verify launcher output
|
|
run: if (!(Test-Path target/x86_64-pc-windows-msvc/release/launcher/EonaCat.XSBOX.Launcher.exe)) { throw "Launcher executable was not produced" }
|
|
shell: pwsh
|
|
- name: Run workspace tests
|
|
run: cargo test --target x86_64-pc-windows-msvc --workspace
|
|
- name: Run Clippy
|
|
run: cargo clippy --target x86_64-pc-windows-msvc --workspace --all-targets
|
|
- name: Compile CPU microbenchmarks
|
|
run: cargo bench --target x86_64-pc-windows-msvc -p eonacat-xsbox-gpu --bench hot_paths --no-run
|