Skip to content

Commit f776e15

Browse files
authoredMay 13, 2022
Merge pull request #11 from makspll/faster_ci
change ci.yml
2 parents 90868f3 + 16b6103 commit f776e15

File tree

1 file changed

+40
-15
lines changed

1 file changed

+40
-15
lines changed
 

‎.github/workflows/ci.yml

+40-15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
on: [push, pull_request]
1+
on:
2+
pull_request:
3+
push:
4+
branches:
5+
- main
26

3-
name: Continuous integration
7+
8+
name: Check and Lint
49

510
jobs:
611
check:
@@ -15,24 +20,44 @@ jobs:
1520
profile: minimal
1621
toolchain: stable
1722
override: true
18-
- run: rustup component add rustfmt
19-
- run: rustup component add clippy
20-
- name: cargo check
21-
uses: actions-rs/cargo@v1
23+
- uses: Swatinem/rust-cache@v1
24+
- uses: actions-rs/cargo@v1
2225
with:
2326
command: check
24-
- name: cargo test
25-
uses: actions-rs/cargo@v1
27+
28+
fmt:
29+
name: Rustfmt
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Install alsa and udev
33+
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
34+
- uses: actions/checkout@v2
35+
- uses: actions-rs/toolchain@v1
2636
with:
27-
command: test
28-
- name: cargo fmt
29-
uses: actions-rs/cargo@v1
37+
profile: minimal
38+
components: rustfmt
39+
toolchain: stable
40+
override: true
41+
- uses: Swatinem/rust-cache@v1
42+
- uses: actions-rs/cargo@v1
3043
with:
3144
command: fmt
3245
args: --all -- --check
33-
- name: clippy
34-
uses: actions-rs/cargo@v1
46+
47+
clippy:
48+
name: Clippy
49+
runs-on: ubuntu-latest
50+
steps:
51+
- name: Install alsa and udev
52+
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
53+
- uses: actions/checkout@v2
54+
- uses: actions-rs/toolchain@v1
55+
with:
56+
toolchain: stable
57+
components: clippy
58+
override: true
59+
- uses: Swatinem/rust-cache@v1
60+
- uses: actions-rs/cargo@v1
3561
with:
3662
command: clippy
37-
args: -- -D warnings
38-
63+
args: -- -D warnings

0 commit comments

Comments
 (0)
Please sign in to comment.