Skip to content

Commit

Permalink
Build then clippy then fmt in lints
Browse files Browse the repository at this point in the history
  • Loading branch information
nahsi committed Aug 4, 2023
1 parent 8bcc593 commit c3fc347
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ jobs:
fail_on_error: true

cargo:
runs-on: ubuntu-latest
runs-on: builder

env:
RUSTFLAGS: "-D warnings --cfg tokio_unstable"
RUSTFLAGS: "-D warnings --cfg tokio_unstable -C link-arg=-B/usr/local/bin/mold"
RUSTC_WRAPPER: "sccache"

steps:
- name: Checkout
Expand All @@ -47,5 +48,30 @@ jobs:
- name: Setup Rust toolchain
uses: dsherret/rust-toolchain-file@v1

- name: Setup cache
uses: Swatinem/rust-cache@v2
with:
cache-directories: ~/.cache/sccache
shared-key: nox
save-if: false

- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.3

- name: Setup mold linker
uses: rui314/setup-mold@v1
with:
make-default: false

- name: Run cargo build
run: cargo build

- name: Run cargo fmt
run: cargo fmt --all -- --check

- name: Run cargo clippy
uses: giraffate/clippy-action@v1
with:
reporter: github-pr-review
clippy_flags: -Z unstable-options --all
fail_on_error: true
7 changes: 0 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ jobs:
- name: Run cargo nextest
run: cargo nextest run --release --all-features --profile ci

- name: Run cargo clippy
uses: giraffate/clippy-action@v1
with:
reporter: github-pr-review
clippy_flags: -Z unstable-options --all
fail_on_error: true

- name: Upload test report
uses: dorny/test-reporter@v1
if: success() || failure()
Expand Down

0 comments on commit c3fc347

Please sign in to comment.