Skip to content

Commit

Permalink
Merge pull request #5492 from epage/template
Browse files Browse the repository at this point in the history
chore: Update template
  • Loading branch information
epage committed May 14, 2024
2 parents 7d3a380 + 800d7cb commit 88fb46e
Show file tree
Hide file tree
Showing 142 changed files with 853 additions and 852 deletions.
3 changes: 1 addition & 2 deletions .clippy.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
msrv = "1.74" # 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
16 changes: 9 additions & 7 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 @@ -19,29 +20,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',
'STABLE',
],
minimumReleaseAge: '252 days', // 6 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 @@ -74,6 +74,7 @@
matchCurrentVersion: '>=1.0.0',
matchUpdateTypes: [
'minor',
'patch',
],
enabled: false,
},
Expand Down Expand Up @@ -101,6 +102,7 @@
matchCurrentVersion: '>=1.0.0',
matchUpdateTypes: [
'minor',
'patch',
],
automerge: true,
groupName: 'compatible (dev)',
Expand Down
46 changes: 15 additions & 31 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,34 +101,18 @@ repository:
# description: "Meta: Request for post-merge review."
# color: '#E10C02'

branches:
- name: master
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
- name: v2-master
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
- name: v3-master
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: master
# 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
4 changes: 4 additions & 0 deletions .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 Down
25 changes: 15 additions & 10 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, check, docs, rustfmt, clippy, cffconvert]
needs: [test, check, lockfile, docs, rustfmt, clippy, cffconvert]
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 @@ -39,7 +45,7 @@ jobs:
rust: "stable"
features: "full"
- build: mac
os: macos-latest
os: macos-14
rust: "stable"
features: "full"
- build: minimal
Expand All @@ -64,6 +70,7 @@ jobs:
with:
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@cargo-hack
- name: Build
run: make build-${{matrix.features}}
- name: Test
Expand Down Expand Up @@ -144,7 +151,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 @@ -154,7 +161,7 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.74" # MSRV
toolchain: "1.76" # STABLE
- uses: Swatinem/rust-cache@v2
- name: Check documentation
env:
Expand All @@ -169,9 +176,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.76" # STABLE
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: Check formatting
Expand All @@ -185,7 +190,7 @@ jobs:
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: "1.74" # MSRV
toolchain: "1.76" # STABLE
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Lint (ultra-minimal)
Expand Down
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
4 changes: 4 additions & 0 deletions .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 Down
7 changes: 6 additions & 1 deletion .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,7 +36,7 @@ jobs:
rust: "beta"
features: "full"
- build: mac
os: macos-latest
os: macos-14
rust: "beta"
features: "full"
- build: nightly
Expand Down Expand Up @@ -91,6 +95,7 @@ jobs:
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@cargo-hack
- name: Update dependencues
run: cargo update
- name: Build
Expand Down
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
17 changes: 17 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 88fb46e

Please sign in to comment.