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

chore: Update from _rust template #80

Merged
merged 77 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
69fa026
chore(deps): update actions/setup-python action to v5
renovate[bot] Jan 1, 2024
82c9aa7
chore(deps): update github/codeql-action action to v3
renovate[bot] Jan 1, 2024
c7805bc
Merge pull request #12 from epage/renovate/actions-setup-python-5.x
epage Jan 2, 2024
739d2cf
Merge pull request #13 from epage/renovate/github-codeql-action-3.x
epage Jan 2, 2024
a4c0626
chore: Make renovate commits to match
epage Jan 2, 2024
61250a3
chore(ci): Optimize CI runs
epage Jan 3, 2024
e819db4
chore(ci): Cancel prior CI runs
epage Jan 18, 2024
0b02906
chore(ci): Be explicit in renovate updates
epage Jan 24, 2024
131de55
chore(ci): Add m1 runners
epage Jan 31, 2024
9a5af5c
chore(ci): Only check intel mac on schedule
epage Feb 8, 2024
da56001
chore(ci): Gather coverage
epage Feb 8, 2024
1313256
chore(ci): Use latest for coverage
epage Feb 8, 2024
51a98a2
chore(ci): Defer to package.rust-version for clippy
epage Feb 15, 2024
4db293d
chore(ci): Only verify MSRV for published packages
epage Feb 15, 2024
779496b
chore(ci): Run the latest clippy
epage Feb 15, 2024
c977df5
chore(ci): Prevent cargo-hack from blowing away our lockfile
epage Feb 21, 2024
7846c51
chore(deps): Update pre-commit/action action to v3.0.1
renovate[bot] Mar 1, 2024
2d5ff55
Merge pull request #16 from epage/renovate/pre-commit-action-3.x
epage Mar 1, 2024
3d5ead8
chore(ci): Configure standard lints
epage Mar 21, 2024
ace6e07
chore(ci): Don't update stable and MSRV together
epage Mar 21, 2024
8ec86ab
chore: Normalize clippy lint names
epage Mar 25, 2024
8e647d9
chore: Encourage use of workspace.dependencies
epage Mar 28, 2024
126eb3d
chore: Encourage a single test binary
epage Mar 28, 2024
c8b190b
chore(ci): Use latest SARIF
epage Mar 28, 2024
9b1b566
chore(ci): Fix all rust-version-specific checks to stable
epage Mar 28, 2024
92d486c
chore(ci): Speed up lockfile check
epage Mar 28, 2024
9258d9a
chore(ci): More exhaustively check features
epage Mar 28, 2024
2714cca
chore(ci): Don't check for unused crates
epage Mar 28, 2024
314eef7
chore: Dont check must_use
epage Mar 28, 2024
6a9d2bf
chore: Don't warn on unsafe
epage Mar 28, 2024
8d4b1b6
chore: Remove clippy::tests_outside_test_module
epage Mar 28, 2024
99e034b
chore: Move print lints to lib.rs
epage Mar 28, 2024
a516bda
chore: Drop workspace.dependencies
epage Apr 1, 2024
ebc70d0
chore: Only check missing_docs in lib
epage Apr 1, 2024
3278d49
chore: Allow print in tests
epage Apr 1, 2024
d634de6
chore(ci): Ensure CI job always runs
epage Apr 1, 2024
dc3e937
Merge pull request #19 from epage/t
epage Apr 1, 2024
2570b58
chore(ci): Skip branch protections
epage Apr 1, 2024
afd2755
chore(ci): Don't block on Lint Commits
epage Apr 1, 2024
14225df
chore(ci): Auto-merge linter version updates
epage Apr 17, 2024
be30b1b
chore(ci): Try again with not auto-updating MSRV
epage Apr 26, 2024
a01f25d
chore(ci): Reduce noisy lints
epage Apr 26, 2024
82cf9a6
chore(ci): Reduce noisy lints
epage Apr 26, 2024
181a2cf
chore(ci): Allow prelude wildcard imports
epage Apr 26, 2024
51de731
chore(ci): Lint clippy::items_after_statements seems too strict
epage Apr 26, 2024
78741e5
chore: Remove lints that lead to bad code
epage May 28, 2024
44916f6
chore: Update deny config
epage May 29, 2024
ce6badc
chore: Fix typo
epage Jun 3, 2024
1353a95
chore: Encourage use of repository
epage Jun 4, 2024
7039c66
chore: Encourage cloneable repositories
epage Jun 4, 2024
2a274e1
chore(ci): Auto-update Mac now that latest uses m1
epage Jun 21, 2024
0547ff2
docs(contrib): Clarify our policies
epage Jul 4, 2024
eb4e999
Fix typos in CONTRIBUTING.md
jalil-salame Jul 4, 2024
045de93
Merge pull request #21 from jalil-salame/patch-1
epage Jul 4, 2024
bdb06a1
chore(ci): Verify version requirements
epage Jul 9, 2024
87d9ae5
chore: Fix clippy::lint_groups_priority for 1.80
epage Jul 25, 2024
553258a
Have clippy warn about uninlined format arguments
joshtriplett Jul 25, 2024
266ead1
Merge pull request #22 from joshtriplett/clippy-uninlined-format-args
epage Jul 26, 2024
7a28f01
docs(contrib): Fix tpo
epage Aug 24, 2024
37cf108
chore(deps): Update EmbarkStudios/cargo-deny-action action to v2
renovate[bot] Sep 1, 2024
68d2027
Merge pull request #23 from epage/renovate/embarkstudios-cargo-deny-a…
epage Sep 3, 2024
6e193aa
chore: Ensure pre-commit gets non-system Python
epage Sep 27, 2024
35fcbb7
Merge pull request #24 from epage/pre-commit
epage Sep 27, 2024
8db276f
docs: Cross-reference source code view
epage Oct 21, 2024
e121dd6
chore(ci): Fix STABLE updates
epage Oct 21, 2024
afa23ae
style: Ignore large Err variants
epage Nov 1, 2024
006f98f
chore(ci): Report deprecations in the review
epage Nov 18, 2024
8100137
Update CONTRIBUTING.md
futreall Nov 29, 2024
dabd07a
Merge pull request #26 from futreall/main
epage Nov 29, 2024
b2aecee
docs(contrib): Fix language
epage Dec 2, 2024
15ede43
docs(readme): Add a hyphen
epage Dec 3, 2024
2f01ad6
chore(ci): Allow 2-clause BSD
epage Dec 16, 2024
e783559
docs(contrib): Try to remove ambiguity about commits/PRs
epage Dec 18, 2024
d159ec5
test: Verify readme
epage Jan 24, 2025
a42c3a7
chore: Update from template
epage Mar 5, 2025
248be85
style: Make clippy happy
epage Mar 5, 2025
e7aa58a
chore: Update stable version
epage Mar 5, 2025
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
3 changes: 1 addition & 2 deletions .clippy.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
msrv = "1.76" # MSRV
warn-on-all-wildcard-imports = true
allow-print-in-tests = true
allow-expect-in-tests = true
allow-unwrap-in-tests = true
allow-dbg-in-tests = true
Expand Down
18 changes: 10 additions & 8 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
'before 5am on the first day of the month',
],
semanticCommits: 'enabled',
commitMessageLowerCase: 'never',
configMigration: true,
dependencyDashboard: true,
customManagers: [
Expand All @@ -17,29 +18,28 @@
'^\\.github/workflows/rust-next.yml$',
],
matchStrings: [
'MSRV.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)',
'(?<currentValue>\\d+\\.\\d+(\\.\\d+)?).*?MSRV',
'STABLE.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)',
'(?<currentValue>\\d+\\.\\d+(\\.\\d+)?).*?STABLE',
],
depNameTemplate: 'rust',
depNameTemplate: 'STABLE',
packageNameTemplate: 'rust-lang/rust',
datasourceTemplate: 'github-releases',
},
],
packageRules: [
{
commitMessageTopic: 'MSRV',
commitMessageTopic: 'Rust Stable',
matchManagers: [
'custom.regex',
],
matchPackageNames: [
'rust',
matchDepNames: [
'STABLE',
],
minimumReleaseAge: '126 days', // 3 releases * 6 weeks per release * 7 days per week
internalChecksFilter: 'strict',
extractVersion: '^(?<version>\\d+\\.\\d+)', // Drop the patch version
schedule: [
'* * * * *',
],
automerge: true,
},
// Goals:
// - Keep version reqs low, ignoring compatible normal/build dependencies
Expand Down Expand Up @@ -72,6 +72,7 @@
matchCurrentVersion: '>=1.0.0',
matchUpdateTypes: [
'minor',
'patch',
],
enabled: false,
},
Expand Down Expand Up @@ -99,6 +100,7 @@
matchCurrentVersion: '>=1.0.0',
matchUpdateTypes: [
'minor',
'patch',
],
automerge: true,
groupName: 'compatible (dev)',
Expand Down
26 changes: 15 additions & 11 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,18 @@ labels:
description: "Call for participation: Help is requested to fix this issue."
color: '#02E10C'

branches:
- name: main
protection:
required_pull_request_reviews: null
required_conversation_resolution: true
required_status_checks:
# Required. Require branches to be up to date before merging.
strict: false
contexts: ["CI", "Lint Commits", "Spell Check with Typos"]
enforce_admins: false
restrictions: null
# This serves more as documentation.
# Branch protection API was replaced by rulesets but settings isn't updated.
# See https://github.com/repository-settings/app/issues/825
#
# branches:
# - name: main
# protection:
# required_pull_request_reviews: null
# required_conversation_resolution: true
# required_status_checks:
# # Required. Require branches to be up to date before merging.
# strict: false
# contexts: ["CI", "Spell Check with Typos"]
# enforce_admins: false
# restrictions: null
6 changes: 5 additions & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ env:
CARGO_TERM_COLOR: always
CLICOLOR: 1

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
security_audit:
permissions:
Expand All @@ -43,7 +47,7 @@ jobs:
- bans licenses sources
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1
- uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check ${{ matrix.checks }}
rust-version: stable
87 changes: 61 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,22 @@ env:
CARGO_TERM_COLOR: always
CLICOLOR: 1

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
ci:
permissions:
contents: none
name: CI
needs: [test, msrv, docs, rustfmt, clippy]
needs: [test, msrv, lockfile, docs, rustfmt, clippy, minimal-versions]
runs-on: ubuntu-latest
if: "always()"
steps:
- name: Done
run: exit 0
- name: Failed
run: exit 1
if: "contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')"
test:
name: Test
strategy:
Expand All @@ -40,31 +46,43 @@ jobs:
with:
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@cargo-hack
- name: Build
run: cargo test --no-run --workspace --all-features
- name: Default features
run: cargo test --workspace
- name: All features
run: cargo test --workspace --all-features
- name: No-default features
run: cargo test --workspace --no-default-features
run: cargo test --workspace --no-run
- name: Test
run: cargo hack test --feature-powerset --workspace
msrv:
name: "Check MSRV: 1.76"
name: "Check MSRV"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.76" # MSRV
toolchain: stable
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@cargo-hack
- name: Default features
run: cargo check --workspace --all-targets
- name: All features
run: cargo check --workspace --all-targets --all-features
- name: No-default features
run: cargo check --workspace --all-targets --no-default-features
run: cargo hack check --feature-powerset --locked --rust-version --ignore-private --workspace --all-targets
minimal-versions:
name: Minimal versions
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install stable Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Install nightly Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
- name: Downgrade dependencies to minimal versions
run: cargo +nightly generate-lockfile -Z minimal-versions
- name: Compile with minimal versions
run: cargo +stable check --workspace --all-features --locked
lockfile:
runs-on: ubuntu-latest
steps:
Expand All @@ -76,7 +94,7 @@ jobs:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: "Is lockfile updated?"
run: cargo fetch --locked
run: cargo update --workspace --locked
docs:
name: Docs
runs-on: ubuntu-latest
Expand All @@ -86,7 +104,7 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
toolchain: "1.85" # STABLE
- uses: Swatinem/rust-cache@v2
- name: Check documentation
env:
Expand All @@ -101,9 +119,7 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
# Not MSRV because its harder to jump between versions and people are
# more likely to have stable
toolchain: stable
toolchain: "1.85" # STABLE
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: Check formatting
Expand All @@ -119,16 +135,16 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.76" # MSRV
toolchain: "1.85" # STABLE
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Install SARIF tools
run: cargo install clippy-sarif --version 0.3.4 --locked # Held back due to msrv
run: cargo install clippy-sarif --locked
- name: Install SARIF tools
run: cargo install sarif-fmt --version 0.3.4 --locked # Held back due to msrv
run: cargo install sarif-fmt --locked
- name: Check
run: >
cargo clippy --workspace --all-features --all-targets --message-format=json -- -D warnings --allow deprecated
cargo clippy --workspace --all-features --all-targets --message-format=json
| clippy-sarif
| tee clippy-results.sarif
| sarif-fmt
Expand All @@ -140,3 +156,22 @@ jobs:
wait-for-processing: true
- name: Report status
run: cargo clippy --workspace --all-features --all-targets -- -D warnings --allow deprecated
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin
- name: Gather coverage
run: cargo tarpaulin --output-dir coverage --out lcov
- name: Publish to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .github/workflows/committed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ env:
CARGO_TERM_COLOR: always
CLICOLOR: 1

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
committed:
name: Lint Commits
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ env:
CARGO_TERM_COLOR: always
CLICOLOR: 1

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
pre-commit:
permissions:
Expand All @@ -20,4 +24,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected]
with:
python-version: '3.x'
- uses: pre-commit/[email protected]
28 changes: 15 additions & 13 deletions .github/workflows/rust-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ env:
CARGO_TERM_COLOR: always
CLICOLOR: 1

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
test:
name: Test
Expand All @@ -32,12 +36,11 @@ jobs:
with:
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
- name: Default features
run: cargo test --workspace
- name: All features
run: cargo test --workspace --all-features
- name: No-default features
run: cargo test --workspace --no-default-features
- uses: taiki-e/install-action@cargo-hack
- name: Build
run: cargo test --workspace --no-run
- name: Test
run: cargo hack test --feature-powerset --workspace
latest:
name: "Check latest dependencies"
runs-on: ubuntu-latest
Expand All @@ -49,11 +52,10 @@ jobs:
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: Update dependencues
- uses: taiki-e/install-action@cargo-hack
- name: Update dependencies
run: cargo update
- name: Default features
run: cargo test --workspace --all-targets
- name: All features
run: cargo test --workspace --all-targets --all-features
- name: No-default features
run: cargo test --workspace --all-targets --no-default-features
- name: Build
run: cargo test --workspace --no-run
- name: Test
run: cargo hack test --feature-powerset --workspace
4 changes: 4 additions & 0 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ env:
CARGO_TERM_COLOR: always
CLICOLOR: 1

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
spelling:
name: Spell Check with Typos
Expand Down
Loading
Loading