Files
woggioni 5ab62eaabc make workspace build and test reproducibly
- add Gitea sparse registry config for rmath
- commit Cargo.lock
- add default-members so host tests skip GTK/wasm frontends
- fix checkers example to use DraughtsBoard::get
- add README with prerequisites and per-frontend commands
- add Gitea CI workflow (core, wasm, wasm4, MSRV)
- fix repository metadata and stop tracking generated wasm dist
2026-10-19 19:10:39 +00:00

91 lines
2.9 KiB
YAML

name: CI
on:
push:
branches: [master]
pull_request:
jobs:
core:
runs-on: woryzen
steps:
- name: Checkout
uses: https://github.com/RouxAntoine/checkout@v3.5.4
- name: Install Rust
run: rustup toolchain install stable --profile minimal
- name: Install Rust components
run: rustup component add --toolchain stable rustfmt clippy
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --check
- name: Test default members
run: cargo test --locked
- name: Test engine
run: cargo test -p rdraught --features std --lib --locked
- name: Check shared UI crate
run: cargo check -p rdraught-ui-common --locked
- name: Check CLI scratch crate
run: cargo check -p rdraught-cli --locked
- name: Clippy (advisory)
run: cargo clippy -p rdraught --features std --all-targets --locked
wasm:
runs-on: woryzen
steps:
- name: Checkout
uses: https://github.com/RouxAntoine/checkout@v3.5.4
- name: Install Rust
run: rustup toolchain install stable --profile minimal
- name: Add wasm target
run: rustup target add wasm32-unknown-unknown
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Check browser front end
working-directory: rdraught-wasm
run: cargo check --locked --target wasm32-unknown-unknown
wasm4:
runs-on: woryzen
steps:
- name: Checkout
uses: https://github.com/RouxAntoine/checkout@v3.5.4
- name: Install Rust
run: rustup toolchain install stable --profile minimal
- name: Add wasm target
run: rustup target add wasm32-unknown-unknown
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Build WASM-4 front end
working-directory: rdraught-w4
run: cargo build --release --locked --target wasm32-unknown-unknown
msrv:
runs-on: woryzen
steps:
- name: Checkout
uses: https://github.com/RouxAntoine/checkout@v3.5.4
- name: Install MSRV toolchain
run: rustup toolchain install 1.87.0 --profile minimal
- name: Cache
uses: Swatinem/rust-cache@v2
- name: Test engine on MSRV
run: cargo +1.87.0 test -p rdraught --features std --lib --locked
- name: Check shared UI crate on MSRV
run: cargo +1.87.0 check -p rdraught-ui-common --locked
# Enable this job once the self-hosted runner has the GTK4 development
# libraries installed:
#
# gtk:
# runs-on: woryzen
# steps:
# - name: Checkout
# uses: https://github.com/RouxAntoine/checkout@v3.5.4
# - name: Install Rust
# run: rustup toolchain install stable --profile minimal
# - name: Cache
# uses: Swatinem/rust-cache@v2
# - name: Check GTK front end
# run: cargo check -p rdraught-gtk --all-targets --locked