77env :
88 RUST_BACKTRACE : 1
99 CARGO_TARGET_DIR : ' ${{ github.workspace }}/target'
10- GHA_CI : 1
10+ NO_FMT_TEST : 1
1111
1212jobs :
1313 changelog :
2121 uses : actions/checkout@v2.0.0
2222 with :
2323 ref : ${{ github.ref }}
24+
25+ # Run
2426 - name : Check Changelog
2527 run : |
2628 MESSAGE=$(git log --format=%B -n 1)
@@ -64,38 +66,46 @@ jobs:
6466 runs-on : ${{ matrix.os }}
6567
6668 steps :
69+ # Setup
6770 - uses : rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
6871 with :
6972 github_token : " ${{ secrets.github_token }}"
73+
7074 - name : Install dependencies (Linux-i686)
7175 run : |
7276 sudo dpkg --add-architecture i386
7377 sudo apt-get update
7478 sudo apt-get install gcc-multilib libssl-dev:i386 libgit2-dev:i386
7579 if : matrix.host == 'i686-unknown-linux-gnu'
80+
7681 - name : rust-toolchain
7782 uses : actions-rs/toolchain@v1.0.3
7883 with :
7984 toolchain : nightly
8085 target : ${{ matrix.host }}
8186 profile : minimal
87+
8288 - name : Checkout
8389 uses : actions/checkout@v2.0.0
90+
8491 - name : Run cargo update
8592 run : cargo update
93+
8694 - name : Cache cargo dir
8795 uses : actions/cache@v1
8896 with :
8997 path : ~/.cargo
9098 key : ${{ runner.os }}-${{ matrix.host }}-${{ hashFiles('Cargo.lock') }}
9199 restore-keys : |
92100 ${{ runner.os }}-${{ matrix.host }}
101+
93102 - name : Master Toolchain Setup
94103 run : bash setup-toolchain.sh
95104 env :
96105 HOST_TOOLCHAIN : ${{ matrix.host }}
97106 shell : bash
98107
108+ # Run
99109 - name : Set LD_LIBRARY_PATH (Linux)
100110 if : runner.os == 'Linux'
101111 run : |
@@ -113,34 +123,42 @@ jobs:
113123 $sysroot = rustc --print sysroot
114124 $env:PATH += ';' + $sysroot + '\bin'
115125 echo "::set-env name=PATH::$env:PATH"
126+
116127 - name : Build
117128 run : cargo build --features deny-warnings
118129 shell : bash
130+
119131 - name : Test
120132 run : cargo test --features deny-warnings
121133 shell : bash
134+
122135 - name : Test clippy_lints
123136 run : cargo test --features deny-warnings
124137 shell : bash
125138 working-directory : clippy_lints
139+
126140 - name : Test rustc_tools_util
127141 run : cargo test --features deny-warnings
128142 shell : bash
129143 working-directory : rustc_tools_util
144+
130145 - name : Test clippy_dev
131146 run : cargo test --features deny-warnings
132147 shell : bash
133148 working-directory : clippy_dev
149+
134150 - name : Test cargo-clippy
135151 run : ../target/debug/cargo-clippy
136152 shell : bash
137153 working-directory : clippy_workspace_tests
154+
138155 - name : Test clippy-driver
139156 run : bash .github/driver.sh
140157 shell : bash
141158 env :
142159 OS : ${{ runner.os }}
143160
161+ # Cleanup
144162 - name : Run cargo-cache --autoclean
145163 run : |
146164 cargo install cargo-cache --debug
@@ -152,42 +170,53 @@ jobs:
152170 runs-on : ubuntu-latest
153171
154172 steps :
173+ # Setup
155174 - uses : rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
156175 with :
157176 github_token : " ${{ secrets.github_token }}"
177+
158178 - name : rust-toolchain
159179 uses : actions-rs/toolchain@v1.0.3
160180 with :
161181 toolchain : nightly
162182 target : x86_64-unknown-linux-gnu
163183 profile : minimal
184+
164185 - name : Checkout
165186 uses : actions/checkout@v2.0.0
187+
166188 - name : Run cargo update
167189 run : cargo update
190+
168191 - name : Cache cargo dir
169192 uses : actions/cache@v1
170193 with :
171194 path : ~/.cargo
172195 key : ${{ runner.os }}-x86_64-unknown-linux-gnu-${{ hashFiles('Cargo.lock') }}
173196 restore-keys : |
174197 ${{ runner.os }}-x86_64-unknown-linux-gnu
198+
175199 - name : Master Toolchain Setup
176200 run : bash setup-toolchain.sh
177201
202+ # Run
178203 - name : Build Integration Test
179204 run : cargo test --test integration --features integration --no-run
205+
206+ # Upload
180207 - name : Extract Binaries
181208 run : |
182209 DIR=$CARGO_TARGET_DIR/debug
183210 find $DIR ! -executable -o -type d ! -path $DIR | xargs rm -rf
184211 mv $DIR/integration-* $DIR/integration
212+
185213 - name : Upload Binaries
186214 uses : actions/upload-artifact@v1
187215 with :
188216 name : target
189217 path : target
190218
219+ # Cleanup
191220 - name : Run cargo-cache --autoclean
192221 run : |
193222 cargo install cargo-cache --debug
@@ -219,42 +248,53 @@ jobs:
219248 runs-on : ubuntu-latest
220249
221250 steps :
251+ # Setup
222252 - uses : rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
223253 with :
224254 github_token : " ${{ secrets.github_token }}"
255+
225256 - name : rust-toolchain
226257 uses : actions-rs/toolchain@v1.0.3
227258 with :
228259 toolchain : nightly
229260 target : x86_64-unknown-linux-gnu
230261 profile : minimal
262+
231263 - name : Checkout
232264 uses : actions/checkout@v2.0.0
265+
233266 - name : Run cargo update
234267 run : cargo update
268+
235269 - name : Cache cargo dir
236270 uses : actions/cache@v1
237271 with :
238272 path : ~/.cargo
239273 key : ${{ runner.os }}-x86_64-unknown-linux-gnu-${{ hashFiles('Cargo.lock') }}
240274 restore-keys : |
241275 ${{ runner.os }}-x86_64-unknown-linux-gnu
276+
242277 - name : Master Toolchain Setup
243278 run : bash setup-toolchain.sh
244279
280+ # Download
245281 - name : Download target dir
246282 uses : actions/download-artifact@v1
247283 with :
248284 name : target
249285 path : target
286+
250287 - name : Make Binaries Executable
251288 run : chmod +x $CARGO_TARGET_DIR/debug/*
289+
290+ # Run
252291 - name : Test ${{ matrix.integration }}
253292 run : $CARGO_TARGET_DIR/debug/integration
254293 env :
255294 INTEGRATION : ${{ matrix.integration }}
256295 RUSTUP_TOOLCHAIN : master
257296
297+ # Cleanup
258298 - name : Run cargo-cache --autoclean
259299 run : |
260300 cargo install cargo-cache --debug
0 commit comments