Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit b47dada

Browse files
committed
Apply review comments
1 parent abb095d commit b47dada

File tree

8 files changed

+74
-5
lines changed

8 files changed

+74
-5
lines changed

.github/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /bin/bash
1+
#!/bin/bash
22

33
set -ex
44

.github/driver.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /bin/bash
1+
#!/bin/bash
22

33
set -ex
44

.github/workflows/clippy.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,61 +21,76 @@ on:
2121
env:
2222
RUST_BACKTRACE: 1
2323
CARGO_TARGET_DIR: '${{ github.workspace }}/target'
24-
GHA_CI: 1
24+
NO_FMT_TEST: 1
2525

2626
jobs:
2727
base:
2828
runs-on: ubuntu-latest
2929

3030
steps:
31+
# Setup
3132
- uses: rust-lang/simpleinfra/github-actions/cancel-outdated-builds@master
3233
with:
3334
github_token: "${{ secrets.github_token }}"
35+
3436
- name: rust-toolchain
3537
uses: actions-rs/[email protected]
3638
with:
3739
toolchain: nightly
3840
target: x86_64-unknown-linux-gnu
3941
profile: minimal
42+
4043
- name: Checkout
4144
uses: actions/[email protected]
45+
4246
- name: Run cargo update
4347
run: cargo update
48+
4449
- name: Cache cargo dir
4550
uses: actions/cache@v1
4651
with:
4752
path: ~/.cargo
4853
key: ${{ runner.os }}-x86_64-unknown-linux-gnu-${{ hashFiles('Cargo.lock') }}
4954
restore-keys: |
5055
${{ runner.os }}-x86_64-unknown-linux-gnu
56+
5157
- name: Master Toolchain Setup
5258
run: bash setup-toolchain.sh
5359

60+
# Run
5461
- name: Set LD_LIBRARY_PATH (Linux)
5562
run: |
5663
SYSROOT=$(rustc --print sysroot)
5764
echo "::set-env name=LD_LIBRARY_PATH::${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}"
65+
5866
- name: Build
5967
run: cargo build --features deny-warnings
68+
6069
- name: Test
6170
run: cargo test --features deny-warnings
71+
6272
- name: Test clippy_lints
6373
run: cargo test --features deny-warnings
6474
working-directory: clippy_lints
75+
6576
- name: Test rustc_tools_util
6677
run: cargo test --features deny-warnings
6778
working-directory: rustc_tools_util
79+
6880
- name: Test clippy_dev
6981
run: cargo test --features deny-warnings
7082
working-directory: clippy_dev
83+
7184
- name: Test cargo-clippy
7285
run: ../target/debug/cargo-clippy
7386
working-directory: clippy_workspace_tests
87+
7488
- name: Test clippy-driver
7589
run: bash .github/driver.sh
7690
env:
7791
OS: ${{ runner.os }}
7892

93+
# Cleanup
7994
- name: Run cargo-cache --autoclean
8095
run: |
8196
cargo install cargo-cache --debug

.github/workflows/clippy_bors.yml

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
env:
88
RUST_BACKTRACE: 1
99
CARGO_TARGET_DIR: '${{ github.workspace }}/target'
10-
GHA_CI: 1
10+
NO_FMT_TEST: 1
1111

1212
jobs:
1313
changelog:
@@ -21,6 +21,8 @@ jobs:
2121
uses: actions/[email protected]
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/[email protected]
7883
with:
7984
toolchain: nightly
8085
target: ${{ matrix.host }}
8186
profile: minimal
87+
8288
- name: Checkout
8389
uses: actions/[email protected]
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/[email protected]
160180
with:
161181
toolchain: nightly
162182
target: x86_64-unknown-linux-gnu
163183
profile: minimal
184+
164185
- name: Checkout
165186
uses: actions/[email protected]
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/[email protected]
227258
with:
228259
toolchain: nightly
229260
target: x86_64-unknown-linux-gnu
230261
profile: minimal
262+
231263
- name: Checkout
232264
uses: actions/[email protected]
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

.github/workflows/clippy_dev.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,29 @@ jobs:
1919
runs-on: ubuntu-latest
2020

2121
steps:
22+
# Setup
2223
- name: rust-toolchain
2324
uses: actions-rs/[email protected]
2425
with:
2526
toolchain: nightly
2627
target: x86_64-unknown-linux-gnu
2728
profile: minimal
2829
components: rustfmt
30+
2931
- name: Checkout
3032
uses: actions/[email protected]
3133

34+
# Run
3235
- name: Build
3336
run: cargo build --features deny-warnings
3437
working-directory: clippy_dev
38+
3539
- name: Test limit-stderr-length
3640
run: cargo dev --limit-stderr-length
41+
3742
- name: Test update_lints
3843
run: cargo dev update_lints --check
44+
3945
- name: Test fmt
4046
run: cargo dev fmt --check
4147

.github/workflows/deploy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,17 @@ jobs:
1717
runs-on: ubuntu-latest
1818

1919
steps:
20+
# Setup
2021
- name: Checkout
2122
uses: actions/[email protected]
23+
2224
- name: Checkout
2325
uses: actions/[email protected]
2426
with:
2527
ref: ${{ env.TARGET_BRANCH }}
2628
path: 'out'
29+
30+
# Run
2731
- name: Deploy
2832
run: |
2933
eval "$(ssh-agent -s)"

.github/workflows/remark.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,17 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15+
# Setup
1516
- name: Checkout
1617
uses: actions/[email protected]
18+
1719
- name: Setup Node.js
1820
uses: actions/[email protected]
21+
1922
- name: Install remark
2023
run: npm install remark-cli remark-lint remark-lint-maximum-line-length remark-preset-lint-recommended
2124

25+
# Run
2226
- name: Check *.md files
2327
run: git ls-files -z '*.md' | xargs -0 -n 1 -I {} ./node_modules/.bin/remark {} -u lint -f > /dev/null
2428

tests/fmt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::process::Command;
33

44
#[test]
55
fn fmt() {
6-
if option_env!("RUSTC_TEST_SUITE").is_some() || option_env!("GHA_CI").is_some() {
6+
if option_env!("RUSTC_TEST_SUITE").is_some() || option_env!("NO_FMT_TEST").is_some() {
77
return;
88
}
99

0 commit comments

Comments
 (0)