1
- on : [push, pull_request]
1
+ on :
2
+ pull_request :
3
+ branches :
4
+ - main
5
+ push :
6
+ workflow_dispatch :
2
7
3
8
name : CI
4
9
7
12
name : Check
8
13
runs-on : ubuntu-latest
9
14
steps :
10
- - name : Change apt mirror
11
- run : |
12
- sudo sed -i 's/azure.archive.ubuntu.com/archive.ubuntu.com/' /etc/apt/sources.list
13
- sudo apt-get update
14
15
- name : build dependencies
15
16
run : |
16
17
sudo apt-get install musl-tools libudev-dev
@@ -25,37 +26,28 @@ jobs:
25
26
with :
26
27
command : check
27
28
28
- test-doc :
29
- name : Doc Test
29
+ msrv :
30
+ name : Check MSRV
30
31
runs-on : ubuntu-latest
31
32
steps :
32
- - name : Change apt mirror
33
- run : |
34
- sudo sed -i 's/azure.archive.ubuntu.com/archive.ubuntu.com/' /etc/apt/sources.list
35
- sudo apt-get update
36
33
- name : build dependencies
37
34
run : |
38
35
sudo apt-get install musl-tools libudev-dev
39
36
- uses : actions/checkout@v2
40
37
- uses : actions-rs/toolchain@v1
41
38
with :
42
39
profile : minimal
43
- toolchain : stable
40
+ toolchain : 1.56
44
41
override : true
45
42
- uses : Swatinem/rust-cache@v1
46
43
- uses : actions-rs/cargo@v1
47
44
with :
48
- command : test
49
- args : --doc
45
+ command : check
50
46
51
47
test-lib :
52
48
name : Unit Test
53
49
runs-on : ubuntu-latest
54
50
steps :
55
- - name : Change apt mirror
56
- run : |
57
- sudo sed -i 's/azure.archive.ubuntu.com/archive.ubuntu.com/' /etc/apt/sources.list
58
- sudo apt-get update
59
51
- name : build dependencies
60
52
run : |
61
53
sudo apt-get install musl-tools libudev-dev
@@ -75,18 +67,14 @@ jobs:
75
67
name : Rustfmt
76
68
runs-on : ubuntu-latest
77
69
steps :
78
- - name : Change apt mirror
79
- run : |
80
- sudo sed -i 's/azure.archive.ubuntu.com/archive.ubuntu.com/' /etc/apt/sources.list
81
- sudo apt-get update
82
70
- uses : actions/checkout@v2
83
71
- uses : actions-rs/toolchain@v1
84
72
with :
85
73
profile : minimal
86
74
toolchain : stable
87
75
override : true
76
+ components : rustfmt
88
77
- uses : Swatinem/rust-cache@v1
89
- - run : rustup component add rustfmt
90
78
- uses : actions-rs/cargo@v1
91
79
with :
92
80
command : fmt
96
84
name : Clippy
97
85
runs-on : ubuntu-latest
98
86
steps :
99
- - name : Change apt mirror
100
- run : |
101
- sudo sed -i 's/azure.archive.ubuntu.com/archive.ubuntu.com/' /etc/apt/sources.list
102
- sudo apt-get update
103
87
- name : build dependencies
104
88
run : |
105
89
sudo apt-get install musl-tools libudev-dev
@@ -109,85 +93,11 @@ jobs:
109
93
profile : minimal
110
94
toolchain : stable
111
95
override : true
96
+ components : clippy
112
97
- uses : Swatinem/rust-cache@v1
113
- - run : rustup component add clippy
114
98
- uses : actions-rs/cargo@v1
115
99
with :
116
100
command : clippy
117
101
# `identity_op` and `or_fun_call` leads to false positives
118
102
# `too-many-arguments` is relatively arbitrary
119
103
args : -- -D warnings -A clippy::identity_op -A clippy::or_fun_call -A clippy::too-many-arguments
120
-
121
- build :
122
- name : Build Static Binaries
123
- runs-on : ubuntu-latest
124
-
125
- steps :
126
- - name : musl-tools
127
- run : |
128
- sudo apt-get install musl-tools
129
- - uses : actions/checkout@v2
130
- - uses : actions-rs/toolchain@v1
131
- with :
132
- toolchain : stable
133
- target : x86_64-unknown-linux-musl
134
- - uses : Swatinem/rust-cache@v1
135
- - uses : actions-rs/cargo@v1
136
- with :
137
- command : build
138
- args : --release --all --target x86_64-unknown-linux-musl
139
- - uses : actions/upload-artifact@v2
140
- with :
141
- name : espflash
142
- path : target/x86_64-unknown-linux-musl/release/espflash
143
- - uses : actions/upload-artifact@v2
144
- with :
145
- name : cargo-espflash
146
- path : target/x86_64-unknown-linux-musl/release/cargo-espflash
147
-
148
- build-windows :
149
- name : Build Static Windows Binaries
150
- runs-on : ubuntu-latest
151
-
152
- steps :
153
- - uses : actions/checkout@v2
154
- - uses : actions-rs/toolchain@v1
155
- with :
156
- toolchain : stable
157
- target : x86_64-pc-windows-gnu
158
- - uses : Swatinem/rust-cache@v1
159
- - uses : actions-rs/cargo@v1
160
- with :
161
- use-cross : true
162
- command : build
163
- args : --release --all --target x86_64-pc-windows-gnu
164
- - uses : actions/upload-artifact@v2
165
- with :
166
- name : espflash.exe
167
- path : target/x86_64-pc-windows-gnu/release/espflash.exe
168
- - uses : actions/upload-artifact@v2
169
- with :
170
- name : cargo-espflash.exe
171
- path : target/x86_64-pc-windows-gnu/release/cargo-espflash.exe
172
-
173
- msrv :
174
- name : Check MSRV
175
- runs-on : ubuntu-latest
176
- steps :
177
- - name : Change apt mirror
178
- run : |
179
- sudo sed -i 's/azure.archive.ubuntu.com/archive.ubuntu.com/' /etc/apt/sources.list
180
- sudo apt-get update
181
- - name : build dependencies
182
- run : |
183
- sudo apt-get install musl-tools libudev-dev
184
- - uses : actions/checkout@v2
185
- - uses : actions-rs/toolchain@v1
186
- with :
187
- profile : minimal
188
- toolchain : 1.56
189
- override : true
190
- - uses : Swatinem/rust-cache@v1
191
- - uses : actions-rs/cargo@v1
192
- with :
193
- command : check
0 commit comments