Skip to content

Commit 17734f3

Browse files
committed
Fix CI by updating runners
1 parent ff217e5 commit 17734f3

File tree

1 file changed

+33
-8
lines changed

1 file changed

+33
-8
lines changed

.github/workflows/rust.yml

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,50 @@
1-
name: Rust
1+
name: CI
22

3-
on: [push]
3+
on:
4+
push:
5+
pull_request:
46

57
jobs:
68
build-linux:
7-
runs-on: ubuntu-20.04
9+
runs-on: ubuntu-latest
810
steps:
9-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v4
1012
- name: Install dependencies
1113
run: sudo apt-get update && sudo apt-get install libjack-dev libgl1-mesa-dev libsdl2-dev
1214
- name: Build
1315
run: cargo build -v
1416
- name: Run tests
1517
run: cargo test --verbose
18+
1619
build-macos:
17-
runs-on: macos-10.14
20+
runs-on: macos-latest
1821
steps:
19-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v4
2023
- name: Install dependencies
2124
run: brew install jack sdl2
25+
- name: Set SDL2 env
26+
run: |
27+
echo "SDL2_PATH=$(brew --prefix sdl2)" >> "$GITHUB_ENV"
28+
echo "PKG_CONFIG_PATH=$(brew --prefix sdl2)/lib/pkgconfig" >> "$GITHUB_ENV"
29+
echo "LIBRARY_PATH=$(brew --prefix sdl2)/lib" >> "$GITHUB_ENV"
30+
echo "CPATH=$(brew --prefix sdl2)/include" >> "$GITHUB_ENV"
2231
- name: Build
23-
run: RUSTFLAGS="-L $(brew --prefix)/lib" cargo build -v
32+
run: cargo build -v
2433
- name: Run tests
25-
run: RUSTFLAGS="-L $(brew --prefix)/lib" cargo test --verbose
34+
run: cargo test --verbose
35+
36+
fmt:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v4
40+
- name: Rust fmt
41+
run: cargo fmt --all -- --check
42+
43+
clippy:
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v4
47+
- name: Install dependencies
48+
run: sudo apt-get update && sudo apt-get install libjack-dev libgl1-mesa-dev libsdl2-dev
49+
- name: Clippy
50+
run: cargo clippy --all-targets -- -D warnings

0 commit comments

Comments
 (0)