-
Notifications
You must be signed in to change notification settings - Fork 4
57 lines (53 loc) · 1.56 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
name: CI
# yamllint disable-line rule:truthy
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"
jobs:
format:
name: Check format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: cargo fmt --all --check
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
toolchain: [stable, 1.67.0]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy
- uses: ./.github/actions/install-linuxbrew
if: matrix.os == 'ubuntu-latest'
- uses: ./.github/actions/install-sdl2
if: matrix.os != 'windows-latest'
- name: Build
shell: bash
run: |
cargo build --all-targets --features "serde" --verbose
# TODO: Enable when WASM development begins
# bin/build_wasm.sh --dev
- run: cargo doc --features "serde" --verbose
- run: cargo test --features "serde" --verbose
# TODO: Fix missing video device on linux and audio API issue on windows
- if: matrix.os == 'macos-latest'
# yamllint disable-line rule:line-length
run: cargo test run_engine --features "serde" -- --test-threads=1 --ignored