Skip to content

Commit 990ffb9

Browse files
committed
separates clippy check to clippy-check workflow
1 parent 8cfe8c1 commit 990ffb9

File tree

2 files changed

+43
-30
lines changed

2 files changed

+43
-30
lines changed

.github/workflows/build-and-test.yml

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ jobs:
2828
with:
2929
toolchain: stable
3030
profile: minimal
31-
components: clippy
3231
default: true
3332
override: true
3433
- name: Build & Test (Default)
@@ -47,32 +46,3 @@ jobs:
4746
run: cargo build --verbose --features "local-http-rustls local-dns dns-over-tls dns-over-https stream-cipher aead-cipher-2022"
4847
- name: Build with All Features Enabled - shadowsocks
4948
run: cargo build --manifest-path ./crates/shadowsocks/Cargo.toml --verbose --features "stream-cipher aead-cipher-2022"
50-
- name: Clippy Check
51-
uses: actions-rs/clippy-check@v1
52-
with:
53-
name: clippy-${{ matrix.platform }}
54-
token: ${{ secrets.GITHUB_TOKEN }}
55-
args: |
56-
--features "local-http-rustls local-redir local-dns dns-over-tls dns-over-https stream-cipher aead-cipher-2022" -- -Z macro-backtrace
57-
-W clippy::absurd_extreme_comparisons
58-
-W clippy::erasing_op
59-
-A clippy::collapsible_else_if
60-
# - name: prepare AppleSilicon build
61-
# uses: actions-rs/toolchain@v1
62-
# with:
63-
# target: aarch64-apple-darwin
64-
# toolchain: nightly
65-
# if: runner.os == 'macOS'
66-
67-
# # https://github.com/actions/virtual-environments/issues/2557#issuecomment-769611326
68-
# - if: runner.os == 'macOS'
69-
# run: |
70-
# sudo xcode-select -s /Applications/Xcode_12.4.app &&
71-
# sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*
72-
73-
# - name: Check compilation for Apple Silicon
74-
# uses: actions-rs/cargo@v1
75-
# with:
76-
# command: check
77-
# args: --target aarch64-apple-darwin
78-
# if: runner.os == 'macOS'

.github/workflows/clippy-check.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Clippy Check
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUST_LOG: "trace"
12+
13+
jobs:
14+
clippy-check:
15+
strategy:
16+
matrix:
17+
platform:
18+
- ubuntu-latest
19+
- windows-latest
20+
- macos-latest
21+
runs-on: ${{ matrix.platform }}
22+
23+
steps:
24+
- uses: actions/checkout@v2
25+
- uses: Swatinem/rust-cache@v2
26+
- name: Install Rust
27+
uses: actions-rs/toolchain@v1
28+
with:
29+
toolchain: nightly
30+
profile: minimal
31+
components: clippy
32+
default: true
33+
override: true
34+
- name: Clippy Check
35+
uses: actions-rs/clippy-check@v1
36+
with:
37+
name: clippy-${{ matrix.platform }}
38+
token: ${{ secrets.GITHUB_TOKEN }}
39+
args: |
40+
--features "local-http-rustls local-redir local-flow-stat local-dns dns-over-tls dns-over-https stream-cipher aead-cipher-2022" -- -Z macro-backtrace
41+
-W clippy::absurd_extreme_comparisons
42+
-W clippy::erasing_op
43+
-A clippy::collapsible_else_if

0 commit comments

Comments
 (0)