Merge remote-tracking branch 'upstream/master' into rustup
This commit is contained in:
commit
145d5adf04
282 changed files with 5798 additions and 885 deletions
2
.github/deploy.sh
vendored
2
.github/deploy.sh
vendored
|
|
@ -45,6 +45,8 @@ if [[ -n $TAG_NAME ]]; then
|
|||
git add "$TAG_NAME"
|
||||
# Update the symlink
|
||||
git add stable
|
||||
# Update the index.html file
|
||||
git add index.html
|
||||
git commit -m "Add documentation for ${TAG_NAME} release: ${SHA}"
|
||||
elif [[ $BETA = "true" ]]; then
|
||||
if git diff --exit-code --quiet -- beta/; then
|
||||
|
|
|
|||
6
.github/driver.sh
vendored
6
.github/driver.sh
vendored
|
|
@ -47,9 +47,9 @@ unset CARGO_MANIFEST_DIR
|
|||
|
||||
# Run a lint and make sure it produces the expected output. It's also expected to exit with code 1
|
||||
# FIXME: How to match the clippy invocation in compile-test.rs?
|
||||
./target/debug/clippy-driver -Dwarnings -Aunused -Zui-testing --emit metadata --crate-type bin tests/ui/box_default.rs 2>box_default.stderr && exit 1
|
||||
sed -e "/= help: for/d" box_default.stderr > normalized.stderr
|
||||
diff -u normalized.stderr tests/ui/box_default.stderr
|
||||
./target/debug/clippy-driver -Dwarnings -Aunused -Zui-testing --emit metadata --crate-type bin tests/ui/string_to_string.rs 2>string_to_string.stderr && exit 1
|
||||
sed -e "/= help: for/d" string_to_string.stderr > normalized.stderr
|
||||
diff -u normalized.stderr tests/ui/string_to_string.stderr
|
||||
|
||||
# make sure "clippy-driver --rustc --arg" and "rustc --arg" behave the same
|
||||
SYSROOT=$(rustc --print sysroot)
|
||||
|
|
|
|||
59
.github/workflows/clippy_changelog.yml
vendored
Normal file
59
.github/workflows/clippy_changelog.yml
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
name: Clippy changelog check
|
||||
|
||||
on:
|
||||
merge_group:
|
||||
pull_request:
|
||||
types: [opened, reopened, synchronize, edited]
|
||||
|
||||
concurrency:
|
||||
# For a given workflow, if we push to the same PR, cancel all previous builds on that PR.
|
||||
# If the push is not attached to a PR, we will cancel all builds on the same branch.
|
||||
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
changelog:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
steps:
|
||||
# Run
|
||||
- name: Check Changelog
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
run: |
|
||||
body=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$PR_NUMBER" | \
|
||||
python -c "import sys, json; print(json.load(sys.stdin)['body'])")
|
||||
output=$(awk '/^changelog:\s*\S/ && !/changelog: \[.*\]: your change/' <<< "$body" | sed "s/changelog:\s*//g")
|
||||
if [ -z "$output" ]; then
|
||||
echo "ERROR: pull request message must contain 'changelog: ...' with your changelog. Please add it."
|
||||
exit 1
|
||||
else
|
||||
echo "changelog: $output"
|
||||
fi
|
||||
env:
|
||||
PYTHONIOENCODING: 'utf-8'
|
||||
PR_NUMBER: '${{ github.event.number }}'
|
||||
|
||||
# We need to have the "conclusion" job also on PR CI, to make it possible
|
||||
# to add PRs to a merge queue.
|
||||
conclusion_changelog:
|
||||
needs: [ changelog ]
|
||||
# We need to ensure this job does *not* get skipped if its dependencies fail,
|
||||
# because a skipped job is considered a success by GitHub. So we have to
|
||||
# overwrite `if:`. We use `!cancelled()` to ensure the job does still not get run
|
||||
# when the workflow is canceled manually.
|
||||
#
|
||||
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
|
||||
if: ${{ !cancelled() }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Manually check the status of all dependencies. `if: failure()` does not work.
|
||||
- name: Conclusion
|
||||
run: |
|
||||
# Print the dependent jobs to see them in the CI log
|
||||
jq -C <<< '${{ toJson(needs) }}'
|
||||
# Check if all jobs that we depend on (in the needs array) were successful.
|
||||
jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
|
||||
34
.github/workflows/clippy_mq.yml
vendored
34
.github/workflows/clippy_mq.yml
vendored
|
|
@ -15,37 +15,7 @@ defaults:
|
|||
shell: bash
|
||||
|
||||
jobs:
|
||||
changelog:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.ref }}
|
||||
# Unsetting this would make so that any malicious package could get our Github Token
|
||||
persist-credentials: false
|
||||
|
||||
# Run
|
||||
- name: Check Changelog
|
||||
run: |
|
||||
MESSAGE=$(git log --format=%B -n 1)
|
||||
PR=$(echo "$MESSAGE" | grep -o "#[0-9]*" | head -1 | sed -e 's/^#//')
|
||||
body=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$PR" | \
|
||||
python -c "import sys, json; print(json.load(sys.stdin)['body'])")
|
||||
output=$(grep "^changelog:\s*\S" <<< "$body" | sed "s/changelog:\s*//g") || {
|
||||
echo "ERROR: PR body must contain 'changelog: ...'"
|
||||
exit 1
|
||||
}
|
||||
if [[ "$output" = "none" ]]; then
|
||||
echo "WARNING: changelog is 'none'"
|
||||
else
|
||||
echo "changelog: $output"
|
||||
fi
|
||||
env:
|
||||
PYTHONIOENCODING: 'utf-8'
|
||||
base:
|
||||
needs: changelog
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
|
|
@ -119,7 +89,6 @@ jobs:
|
|||
OS: ${{ runner.os }}
|
||||
|
||||
metadata_collection:
|
||||
needs: changelog
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
|
@ -138,7 +107,6 @@ jobs:
|
|||
run: cargo collect-metadata
|
||||
|
||||
integration_build:
|
||||
needs: changelog
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
|
@ -228,7 +196,7 @@ jobs:
|
|||
INTEGRATION: ${{ matrix.integration }}
|
||||
|
||||
conclusion:
|
||||
needs: [ changelog, base, metadata_collection, integration_build, integration ]
|
||||
needs: [ base, metadata_collection, integration_build, integration ]
|
||||
# We need to ensure this job does *not* get skipped if its dependencies fail,
|
||||
# because a skipped job is considered a success by GitHub. So we have to
|
||||
# overwrite `if:`. We use `!cancelled()` to ensure the job does still not get run
|
||||
|
|
|
|||
8
.github/workflows/lintcheck.yml
vendored
8
.github/workflows/lintcheck.yml
vendored
|
|
@ -1,6 +1,12 @@
|
|||
name: Lintcheck
|
||||
|
||||
on: pull_request
|
||||
on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'book/**'
|
||||
- 'util/**'
|
||||
- 'tests/**'
|
||||
- '*.md'
|
||||
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
|
|
|
|||
2
.github/workflows/remark.yml
vendored
2
.github/workflows/remark.yml
vendored
|
|
@ -27,7 +27,7 @@ jobs:
|
|||
- name: Install mdbook
|
||||
run: |
|
||||
mkdir mdbook
|
||||
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.34/mdbook-v0.4.34-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
|
||||
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.43/mdbook-v0.4.43-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
|
||||
echo `pwd`/mdbook >> $GITHUB_PATH
|
||||
|
||||
# Run
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue