Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add to config.toml and unify fmt customization #337

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading