-
Notifications
You must be signed in to change notification settings - Fork 6
49 lines (45 loc) · 1.33 KB
/
build.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
name: build
on: [ push, pull_request ]
jobs:
build-nix:
strategy:
matrix:
platform: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Build SDL2
run: |
wget https://www.libsdl.org/release/SDL2-2.0.22.tar.gz -O sdl2.tar.gz
tar xzf sdl2.tar.gz
pushd SDL2-* && ./configure && make && sudo make install && popd
- name: Build SDL2 Mixer
run: |
wget https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.4.tar.gz -O sdl2_mixer.tar.gz
tar xzf sdl2_mixer.tar.gz
pushd SDL2_mixer-* && ./configure && make && sudo make install && popd
- name: Build
run: cargo build
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt
- name: Rustfmt
run: cargo fmt --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy
- name: Clippy
run: cargo clippy -- -D warnings