WIP native command migration and UI updates #2
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: Rust | |
| on: | |
| push: | |
| branches-ignore: | |
| - master | |
| pull_request: | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: SBC.sdd | |
| - name: Checkout spring-rust (path dep) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: gajop/spring-rust | |
| path: spring-bar | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Cache cargo registry + target | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| ${{ github.workspace }}/SBC.sdd/native/target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('SBC.sdd/native/Cargo.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: cargo fmt --check | |
| working-directory: SBC.sdd/native | |
| run: cargo fmt --check | |
| - name: cargo clippy -D warnings | |
| working-directory: SBC.sdd/native | |
| run: cargo clippy --all-targets -- -D warnings | |
| - name: cargo test | |
| working-directory: SBC.sdd/native | |
| run: cargo test | |
| cross-windows: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: SBC.sdd | |
| - name: Checkout spring-rust (path dep) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: gajop/spring-rust | |
| path: spring-bar | |
| - name: Install Rust toolchain (with Windows target) | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-pc-windows-gnu | |
| - name: Install mingw cross-linker | |
| run: sudo apt-get update && sudo apt-get install -y mingw-w64 | |
| - name: Cache cargo registry + target | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| ${{ github.workspace }}/SBC.sdd/native/target | |
| key: ${{ runner.os }}-cargo-windows-${{ hashFiles('SBC.sdd/native/Cargo.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-windows- | |
| - name: cargo check (windows-gnu) | |
| working-directory: SBC.sdd/native | |
| run: cargo check --target x86_64-pc-windows-gnu | |
| smoke: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Install runtime dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| wget p7zip-full xvfb zip \ | |
| libsdl2-2.0-0 libglew2.2 libopenal1 libcurl4 libgl1 libglu1-mesa | |
| - name: Download BAR engine (Linux) | |
| run: | | |
| wget -q "https://github.com/beyond-all-reason/spring/releases/download/spring_bar_%7BBAR105%7D105.1.1-2472-ga5aa45c/spring_bar_.BAR105.105.1.1-2472-ga5aa45c_linux-64-minimal-portable.7z" | |
| 7z x -y "spring_bar_.BAR105.105.1.1-2472-ga5aa45c_linux-64-minimal-portable.7z" | |
| rm *.7z | |
| chmod +x spring | |
| - name: Run smoke harness | |
| run: ./tools/smoke/run-smoke.sh | |
| - name: Upload infolog on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: smoke-infolog | |
| path: | | |
| test-data/infolog.txt | |
| if-no-files-found: ignore |