summaryrefslogtreecommitdiffstats
path: root/src/tools/cargo/.github
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:42 +0000
commitcec1877e180393eba0f6ddb0cf97bf3a791631c7 (patch)
tree47b4dac2a9dd9a40c30c251b4d4a72d7ccf77e9f /src/tools/cargo/.github
parentAdding debian version 1.74.1+dfsg1-1. (diff)
downloadrustc-cec1877e180393eba0f6ddb0cf97bf3a791631c7.tar.xz
rustc-cec1877e180393eba0f6ddb0cf97bf3a791631c7.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/cargo/.github')
-rw-r--r--src/tools/cargo/.github/renovate.json540
-rw-r--r--src/tools/cargo/.github/workflows/audit.yml2
-rw-r--r--src/tools/cargo/.github/workflows/contrib.yml26
-rw-r--r--src/tools/cargo/.github/workflows/main.yml34
4 files changed, 73 insertions, 29 deletions
diff --git a/src/tools/cargo/.github/renovate.json5 b/src/tools/cargo/.github/renovate.json5
index b633fc245..03e6d8da8 100644
--- a/src/tools/cargo/.github/renovate.json5
+++ b/src/tools/cargo/.github/renovate.json5
@@ -12,29 +12,59 @@
{
customType: 'regex',
fileMatch: [
- '^Cargo.toml$',
+ 'Cargo.toml$',
],
matchStrings: [
- 'rust-version.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)',
+ '\bMSRV:1\b.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)',
+ '(?<currentValue>\\d+\\.\\d+(\\.\\d+)?).*?\bMSRV:1\b',
],
- depNameTemplate: 'latest-msrv',
+ depNameTemplate: 'MSRV:1', // Support 1 version of rustc
+ packageNameTemplate: 'rust-lang/rust',
+ datasourceTemplate: 'github-releases',
+ },
+ {
+ customType: 'regex',
+ fileMatch: [
+ 'Cargo.toml$',
+ ],
+ matchStrings: [
+ '\bMSRV:3\b.*?(?<currentValue>\\d+\\.\\d+(\\.\\d+)?)',
+ '(?<currentValue>\\d+\\.\\d+(\\.\\d+)?).*?\bMSRV:3\b',
+ ],
+ depNameTemplate: 'MSRV:3', // Support 3 versions of rustc
packageNameTemplate: 'rust-lang/rust',
datasourceTemplate: 'github-releases',
},
],
packageRules: [
{
- commitMessageTopic: 'Latest MSRV',
+ commitMessageTopic: 'MSRV (1 version)',
+ matchManagers: [
+ 'regex',
+ ],
+ matchPackageNames: [
+ 'MSRV:1',
+ ],
+ schedule: [
+ '* * * * *',
+ ],
+ groupName: 'msrv',
+ },
+ {
+ commitMessageTopic: 'MSRV (3 versions)',
matchManagers: [
'regex',
],
matchPackageNames: [
- 'latest-msrv',
+ 'MSRV:3',
],
"extractVersion": "^(?<version>\\d+\\.\\d+)", // Drop the patch version
schedule: [
'* * * * *',
],
+ minimumReleaseAge: '85 days', // 2 releases back * 6 weeks per release * 7 days per week + 1
+ internalChecksFilter: 'strict',
+ groupName: 'msrv',
},
// Goals:
// - Rollup safe upgrades to reduce CI runner load
diff --git a/src/tools/cargo/.github/workflows/audit.yml b/src/tools/cargo/.github/workflows/audit.yml
index 14e35b7b3..d903eb0d7 100644
--- a/src/tools/cargo/.github/workflows/audit.yml
+++ b/src/tools/cargo/.github/workflows/audit.yml
@@ -21,7 +21,7 @@ jobs:
- advisories
- bans licenses sources
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1
# Prevent sudden announcement of a new advisory from failing ci:
continue-on-error: ${{ matrix.checks == 'advisories' }}
diff --git a/src/tools/cargo/.github/workflows/contrib.yml b/src/tools/cargo/.github/workflows/contrib.yml
index bbd4a7ef7..a4c1cb5d0 100644
--- a/src/tools/cargo/.github/workflows/contrib.yml
+++ b/src/tools/cargo/.github/workflows/contrib.yml
@@ -4,6 +4,10 @@ on:
branches:
- master
+concurrency:
+ cancel-in-progress: false
+ group: "gh-pages"
+
permissions:
contents: read
@@ -13,7 +17,7 @@ jobs:
contents: write # for Git to git push
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install mdbook
@@ -23,16 +27,26 @@ jobs:
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Deploy docs
run: |
+ GENERATE_PY="$(pwd)/ci/generate.py"
+
cd src/doc/contrib
mdbook build
- git worktree add gh-pages gh-pages
+
+ # Override previous ref to avoid keeping history.
+ git worktree add --orphan -B gh-pages gh-pages
git config user.name "Deploy from CI"
git config user.email ""
cd gh-pages
- # Delete the ref to avoid keeping history.
- git update-ref -d refs/heads/gh-pages
- rm -rf contrib
mv ../book contrib
git add contrib
+
+ # Generate HTML for link redirections.
+ python3 "$GENERATE_PY"
+ git add *.html
+ # WARN: The CNAME file is for GitHub to redirect requests to the custom domain.
+ # Missing this may entail security hazard and domain takeover.
+ # See <https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#securing-your-custom-domain>
+ git add CNAME
+
git commit -m "Deploy $GITHUB_SHA to gh-pages"
- git push --force
+ git push origin +gh-pages
diff --git a/src/tools/cargo/.github/workflows/main.yml b/src/tools/cargo/.github/workflows/main.yml
index 44dd76e13..7b8055223 100644
--- a/src/tools/cargo/.github/workflows/main.yml
+++ b/src/tools/cargo/.github/workflows/main.yml
@@ -20,7 +20,7 @@ jobs:
needs:
- build_std
- clippy
- - credential_msrv
+ - msrv
- docs
- lockfile
- resolver
@@ -38,7 +38,7 @@ jobs:
needs:
- build_std
- clippy
- - credential_msrv
+ - msrv
- docs
- lockfile
- resolver
@@ -54,7 +54,7 @@ jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- run: rustup update stable && rustup default stable
- run: rustup component add rustfmt
- run: cargo fmt --all --check
@@ -63,7 +63,7 @@ jobs:
clippy:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- run: rustup update stable && rustup default stable
- run: rustup component add clippy
# Only check cargo lib for now
@@ -73,7 +73,7 @@ jobs:
stale-label:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- run: rustup update stable && rustup default stable
- run: cargo stale-label
@@ -81,7 +81,7 @@ jobs:
lockfile:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- run: rustup update stable && rustup default stable
- run: cargo update -p cargo --locked
@@ -91,14 +91,14 @@ jobs:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha != '' && github.event.pull_request.head.sha || github.sha }}
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
with:
fetch-depth: 0
- run: rustup update stable && rustup default stable
- name: Install cargo-semver-checks
run: |
mkdir installed-bins
- curl -Lf https://github.com/obi1kenobi/cargo-semver-checks/releases/download/v0.22.1/cargo-semver-checks-x86_64-unknown-linux-gnu.tar.gz \
+ curl -Lf https://github.com/obi1kenobi/cargo-semver-checks/releases/download/v0.24.0/cargo-semver-checks-x86_64-unknown-linux-gnu.tar.gz \
| tar -xz --directory=./installed-bins
echo `pwd`/installed-bins >> $GITHUB_PATH
- run: ci/validate-version-bump.sh
@@ -145,7 +145,7 @@ jobs:
other: i686-pc-windows-gnu
name: Tests ${{ matrix.name }}
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Dump Environment
run: ci/dump-environment.sh
- run: rustup update --no-self-update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
@@ -196,14 +196,14 @@ jobs:
resolver:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- run: rustup update stable && rustup default stable
- run: cargo test -p resolver-tests
test_gitoxide:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- run: rustup update --no-self-update stable && rustup default stable
- run: rustup target add i686-unknown-linux-gnu
- run: sudo apt update -y && sudo apt install gcc-multilib libsecret-1-0 libsecret-1-dev -y
@@ -215,7 +215,7 @@ jobs:
build_std:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- run: rustup update nightly && rustup default nightly
- run: rustup component add rust-src
- run: cargo build
@@ -225,7 +225,7 @@ jobs:
docs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- run: rustup update nightly && rustup default nightly
- run: rustup update stable
- run: rustup component add rust-docs
@@ -249,9 +249,9 @@ jobs:
curl -sSLO https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh
sh linkcheck.sh --all --path ../src/doc cargo
- credential_msrv:
+ msrv:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
- - run: rustup update 1.70 && rustup default 1.70
- - run: cargo test -p cargo-credential
+ - uses: actions/checkout@v4
+ - uses: taiki-e/install-action@cargo-hack
+ - run: cargo hack check --all-targets --rust-version --workspace --ignore-private