1- on : [push, pull_request]
1+ on :
2+ pull_request :
3+ branches :
4+ - main
5+ push :
6+ workflow_dispatch :
27
38name : CI
49
712 name : Check
813 runs-on : ubuntu-latest
914 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
1415 - name : build dependencies
1516 run : |
1617 sudo apt-get install musl-tools libudev-dev
@@ -25,37 +26,28 @@ jobs:
2526 with :
2627 command : check
2728
28- test-doc :
29- name : Doc Test
29+ msrv :
30+ name : Check MSRV
3031 runs-on : ubuntu-latest
3132 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
3633 - name : build dependencies
3734 run : |
3835 sudo apt-get install musl-tools libudev-dev
3936 - uses : actions/checkout@v2
4037 - uses : actions-rs/toolchain@v1
4138 with :
4239 profile : minimal
43- toolchain : stable
40+ toolchain : 1.56
4441 override : true
4542 - uses : Swatinem/rust-cache@v1
4643 - uses : actions-rs/cargo@v1
4744 with :
48- command : test
49- args : --doc
45+ command : check
5046
5147 test-lib :
5248 name : Unit Test
5349 runs-on : ubuntu-latest
5450 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
5951 - name : build dependencies
6052 run : |
6153 sudo apt-get install musl-tools libudev-dev
@@ -75,18 +67,14 @@ jobs:
7567 name : Rustfmt
7668 runs-on : ubuntu-latest
7769 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
8270 - uses : actions/checkout@v2
8371 - uses : actions-rs/toolchain@v1
8472 with :
8573 profile : minimal
8674 toolchain : stable
8775 override : true
76+ components : rustfmt
8877 - uses : Swatinem/rust-cache@v1
89- - run : rustup component add rustfmt
9078 - uses : actions-rs/cargo@v1
9179 with :
9280 command : fmt
9684 name : Clippy
9785 runs-on : ubuntu-latest
9886 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
10387 - name : build dependencies
10488 run : |
10589 sudo apt-get install musl-tools libudev-dev
@@ -109,85 +93,11 @@ jobs:
10993 profile : minimal
11094 toolchain : stable
11195 override : true
96+ components : clippy
11297 - uses : Swatinem/rust-cache@v1
113- - run : rustup component add clippy
11498 - uses : actions-rs/cargo@v1
11599 with :
116100 command : clippy
117101 # `identity_op` and `or_fun_call` leads to false positives
118102 # `too-many-arguments` is relatively arbitrary
119103 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