Skip to content

Commit

Permalink
ci: add to config.toml and unify fmt customization
Browse files Browse the repository at this point in the history
  • Loading branch information
iajoiner committed Nov 5, 2024
1 parent 98c0320 commit 426cf37
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[target.x86_64-unknown-linux-gnu]
linker = "/usr/bin/clang" # used to decrease build time
rustflags = ["-Clink-arg=-fuse-ld=lld"] # used to decrease link time

[alias]
f = "fmt --all -- --config imports_granularity=Crate,group_imports=One"
cl = "clippy --all-targets --all-features"
6 changes: 3 additions & 3 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ jobs:
- name: Install Dependencies
run: export DEBIAN_FRONTEND=non-interactive && sudo apt-get update && sudo apt-get install -y clang lld
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
run: cargo cl -- -D warnings

coverage:
name: Code Coverage
Expand Down Expand Up @@ -182,7 +182,7 @@ jobs:
# files: lcov.info
# fail_ci_if_error: true

# Run cargo fmt --all -- --config imports_granularity=Crate,group_imports=One --check
# Run cargo f --check
format:
name: Format
runs-on: ubuntu-latest
Expand All @@ -194,7 +194,7 @@ jobs:
curl https://sh.rustup.rs -sSf | bash -s -- -y --profile minimal && source ~/.cargo/env
rustup component add rustfmt
- name: Run cargo fmt
run: cargo fmt --all -- --config imports_granularity=Crate,group_imports=One --check
run: cargo f --check

udeps:
name: Unused Dependencies
Expand Down

0 comments on commit 426cf37

Please sign in to comment.