-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 974 Bytes
/
check.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
name: Check
on:
push:
branches:
- '**'
jobs:
check:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-build-
- name: Get SDL2
run: |
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
sudo apt-get update
sudo apt-get install -y libsdl2-dev
elif [ "${{ matrix.os }}" == "macos-latest" ]; then
brew install SDL2
elif [ "${{ matrix.os }}" == "windows-latest" ]; then
cp include/windows/* .
fi
shell: bash
- name: Check that code can compile
run: cargo check --all-features