add build workflow
Some checks failed
Build Game (Windows & Linux) / Build and upload release artifacts (ubuntu-latest) (push) Failing after 1m7s
Build Game (Windows & Linux) / Build and upload release artifacts (windows-latest) (push) Failing after 9h17m49s

This commit is contained in:
2025-11-19 02:27:37 +01:00
parent f5e34ccece
commit fcb2361f66

45
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,45 @@
name: Build Game (Windows & Linux)
on:
push:
branches: [ main, master ]
pull_request:
jobs:
build:
name: Build and upload release artifacts
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache cargo registry and git index
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust (Ubuntu)
if: matrix.os == 'ubuntu-latest'
uses: dtolnay/rust-toolchain@stable
- name: Install Rust (Windows)
if: matrix.os == 'windows-latest'
run: choco install rust-ms -y
- name: Build (release)
run: cargo build --workspace --release
- name: Run tests
run: cargo test --workspace --verbose
- name: Upload release artifacts
uses: actions/upload-artifact@v4
with:
name: release-${{ matrix.os }}
path: target/release