@@ -4,9 +4,12 @@ on: [push, pull_request]
4
4
5
5
env :
6
6
ENABLE_PYO3 : 1
7
+ RUSTFLAGS : -D warnings
7
8
8
9
jobs :
9
10
checks :
11
+ name : Check code
12
+
10
13
runs-on : ubuntu-20.04
11
14
12
15
steps :
@@ -20,15 +23,36 @@ jobs:
20
23
with :
21
24
target : ${{ matrix.target }}
22
25
profile : minimal
23
- components : rustfmt
26
+ components : rustfmt,clippy
24
27
25
28
- name : Check formatting
26
29
uses : actions-rs/cargo@v1
27
30
with :
28
31
command : fmt
29
32
args : -- --check
30
33
34
+ - name : Install cargo-hack
35
+ run : >
36
+ wget -O-
37
+ https://github.com/taiki-e/cargo-hack/releases/download/v0.5.12/cargo-hack-x86_64-unknown-linux-gnu.tar.gz |
38
+ tar -C $HOME/.cargo/bin -xz
39
+
40
+ - name : Run cargo check
41
+ uses : actions-rs/cargo@v1
42
+ with :
43
+ command : hack
44
+ args : check --feature-powerset --no-dev-deps
45
+
46
+ - name : Run clippy
47
+ uses : actions-rs/cargo@v1
48
+ with :
49
+ command : hack
50
+ # Allow clippy warnings until they're fixed, but report them
51
+ args : clippy --feature-powerset --no-dev-deps -- -A warnings
52
+
31
53
build :
54
+ name : Build hyperion.rs binaries
55
+
32
56
strategy :
33
57
fail-fast : false
34
58
matrix :
@@ -87,9 +111,12 @@ jobs:
87
111
path : release/hyperion.rs-${{ matrix.target }}.tar.xz
88
112
89
113
release-nightly :
90
- needs : build
114
+ name : Release hyperion.rs
115
+
116
+ needs : [ checks, build ]
91
117
runs-on : ubuntu-latest
92
118
if : " github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')"
119
+
93
120
steps :
94
121
- uses : actions/download-artifact@v2
95
122
with :
0 commit comments