Skip to content

Commit

Permalink
separates clippy check to clippy-check workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zonyitoo committed Dec 17, 2022
1 parent 8cfe8c1 commit 990ffb9
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 30 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
with:
toolchain: stable
profile: minimal
components: clippy
default: true
override: true
- name: Build & Test (Default)
Expand All @@ -47,32 +46,3 @@ jobs:
run: cargo build --verbose --features "local-http-rustls local-dns dns-over-tls dns-over-https stream-cipher aead-cipher-2022"
- name: Build with All Features Enabled - shadowsocks
run: cargo build --manifest-path ./crates/shadowsocks/Cargo.toml --verbose --features "stream-cipher aead-cipher-2022"
- name: Clippy Check
uses: actions-rs/clippy-check@v1
with:
name: clippy-${{ matrix.platform }}
token: ${{ secrets.GITHUB_TOKEN }}
args: |
--features "local-http-rustls local-redir local-dns dns-over-tls dns-over-https stream-cipher aead-cipher-2022" -- -Z macro-backtrace
-W clippy::absurd_extreme_comparisons
-W clippy::erasing_op
-A clippy::collapsible_else_if
# - name: prepare AppleSilicon build
# uses: actions-rs/toolchain@v1
# with:
# target: aarch64-apple-darwin
# toolchain: nightly
# if: runner.os == 'macOS'

# # https://github.com/actions/virtual-environments/issues/2557#issuecomment-769611326
# - if: runner.os == 'macOS'
# run: |
# sudo xcode-select -s /Applications/Xcode_12.4.app &&
# sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*

# - name: Check compilation for Apple Silicon
# uses: actions-rs/cargo@v1
# with:
# command: check
# args: --target aarch64-apple-darwin
# if: runner.os == 'macOS'
43 changes: 43 additions & 0 deletions .github/workflows/clippy-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Clippy Check

on:
push:
branches: [master]
pull_request:
branches: [master]

env:
CARGO_TERM_COLOR: always
RUST_LOG: "trace"

jobs:
clippy-check:
strategy:
matrix:
platform:
- ubuntu-latest
- windows-latest
- macos-latest
runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
components: clippy
default: true
override: true
- name: Clippy Check
uses: actions-rs/clippy-check@v1
with:
name: clippy-${{ matrix.platform }}
token: ${{ secrets.GITHUB_TOKEN }}
args: |
--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
-W clippy::absurd_extreme_comparisons
-W clippy::erasing_op
-A clippy::collapsible_else_if

0 comments on commit 990ffb9

Please sign in to comment.