7
7
tags :
8
8
- " **"
9
9
jobs :
10
- codestyle :
10
+ check :
11
+ name : Check
11
12
strategy :
12
13
matrix :
13
14
os :
@@ -16,15 +17,11 @@ jobs:
16
17
- macos-latest
17
18
runs-on : ${{ matrix.os }}
18
19
steps :
19
- - name : Set up Rust
20
- uses : hecrj/setup-rust-action@v1
21
- with :
22
- components : rustfmt
23
- rust-version : stable
24
- - uses : actions/checkout@v1
25
- - run : cargo fmt --all -- --check
20
+ - uses : actions/checkout@main
21
+ - uses : ./.github/actions/check
26
22
27
- lint :
23
+ fmt :
24
+ name : Rustfmt
28
25
strategy :
29
26
matrix :
30
27
os :
@@ -33,14 +30,11 @@ jobs:
33
30
- macos-latest
34
31
runs-on : ${{ matrix.os }}
35
32
steps :
36
- - name : Set up Rust
37
- uses : hecrj/setup-rust-action@v1
38
- with :
39
- components : clippy
40
- - uses : actions/checkout@v1
41
- - run : cargo clippy --all-targets -- -D clippy::all
33
+ - uses : actions/checkout@main
34
+ - uses : ./.github/actions/fmt
42
35
43
- compile :
36
+ clippy :
37
+ name : Clippy
44
38
strategy :
45
39
matrix :
46
40
os :
@@ -49,33 +43,22 @@ jobs:
49
43
- macos-latest
50
44
runs-on : ${{ matrix.os }}
51
45
steps :
52
- - name : Set up Rust
53
- uses : hecrj/setup-rust-action@v1
54
- - uses : actions/checkout@master
55
- - run : cargo check --all
46
+ - uses : actions/checkout@main
47
+ - uses : ./.github/actions/clippy
56
48
57
49
test :
58
- needs : [codestyle, lint, compile]
50
+ name : Test Suite
51
+ needs : [check, fmt, clippy]
59
52
strategy :
60
53
matrix :
61
54
os :
62
55
- ubuntu-latest
63
56
- windows-latest
64
57
- macos-latest
65
58
runs-on : ${{ matrix.os }}
66
-
67
59
steps :
68
- - name : Setup Rust
69
- uses : hecrj/setup-rust-action@v1
70
- with :
71
- rust-version : ${{ matrix.rust }}
72
- - name : Checkout
73
- uses : actions/checkout@v1
74
- - name : Install dependencies
75
- if : matrix.os == 'ubuntu-latest'
76
- run : sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev
77
- - name : Test
78
- run : cargo test
60
+ - uses : actions/checkout@main
61
+ - uses : ./.github/actions/test
79
62
80
63
build_and_upload_artifacts :
81
64
name : Upload Artifacts
0 commit comments