summaryrefslogtreecommitdiffstats
path: root/src/tools/cargo/.github
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:50 +0000
commit9835e2ae736235810b4ea1c162ca5e65c547e770 (patch)
tree3fcebf40ed70e581d776a8a4c65923e8ec20e026 /src/tools/cargo/.github
parentReleasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff)
downloadrustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz
rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip
Merging upstream version 1.71.1+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/ISSUE_TEMPLATE/bug_report.yml2
-rw-r--r--src/tools/cargo/.github/ISSUE_TEMPLATE/feature_request.yml2
-rw-r--r--src/tools/cargo/.github/workflows/main.yml119
3 files changed, 77 insertions, 46 deletions
diff --git a/src/tools/cargo/.github/ISSUE_TEMPLATE/bug_report.yml b/src/tools/cargo/.github/ISSUE_TEMPLATE/bug_report.yml
index f465e1240..5cee9c65c 100644
--- a/src/tools/cargo/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/src/tools/cargo/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -1,6 +1,6 @@
name: Bug Report
description: Create a report to help us improve
-labels: ["C-bug"]
+labels: ["C-bug", "S-triage"]
body:
- type: markdown
attributes:
diff --git a/src/tools/cargo/.github/ISSUE_TEMPLATE/feature_request.yml b/src/tools/cargo/.github/ISSUE_TEMPLATE/feature_request.yml
index bae2469d1..e6ed547f8 100644
--- a/src/tools/cargo/.github/ISSUE_TEMPLATE/feature_request.yml
+++ b/src/tools/cargo/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -1,6 +1,6 @@
name: Feature Request
description: Suggest an idea for enhancing Cargo
-labels: ["C-feature-request"]
+labels: ["C-feature-request", "S-triage"]
body:
- type: markdown
attributes:
diff --git a/src/tools/cargo/.github/workflows/main.yml b/src/tools/cargo/.github/workflows/main.yml
index 400e725e5..c522a19a1 100644
--- a/src/tools/cargo/.github/workflows/main.yml
+++ b/src/tools/cargo/.github/workflows/main.yml
@@ -24,12 +24,6 @@ jobs:
- run: rustup update stable && rustup default stable
- run: rustup component add rustfmt
- run: cargo fmt --all --check
- - run: |
- for manifest in `find crates benches/benchsuite benches/capture -name Cargo.toml`
- do
- echo check fmt for $manifest
- cargo fmt --all --manifest-path $manifest --check
- done
# Ensure there are no clippy warnings
clippy:
@@ -39,7 +33,35 @@ jobs:
- run: rustup update stable && rustup default stable
- run: rustup component add clippy
# Only check cargo lib for now
- - run: cargo clippy -p cargo --lib -- -D warnings
+ # TODO: check every members
+ - run: cargo clippy -p cargo --lib --no-deps -- -D warnings
+
+ stale-label:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - run: rustup update stable && rustup default stable
+ - run: cargo stale-label
+
+ # Ensure Cargo.lock is up-to-date
+ lockfile:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - run: rustup update stable && rustup default stable
+ - run: cargo update -p cargo --locked
+
+ check-version-bump:
+ runs-on: ubuntu-latest
+ env:
+ BASE_SHA: ${{ github.event.pull_request.base.sha }}
+ HEAD_SHA: ${{ github.sha }}
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0 # make `git diff` work
+ - run: rustup update stable && rustup default stable
+ - run: ci/validate-version-bump.sh
test:
runs-on: ${{ matrix.os }}
@@ -101,47 +123,39 @@ jobs:
run: echo CARGO_CONTAINER_TESTS=1 >> $GITHUB_ENV
if: matrix.os == 'ubuntu-latest'
- - run: cargo test
+ - run: cargo test -p cargo
- name: Clear intermediate test output
run: ci/clean-test-output.sh
- name: gitoxide tests (all git-related tests)
- run: cargo test git
+ run: cargo test -p cargo git
env:
__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2: 1
# The testsuite generates a huge amount of data, and fetch-smoke-test was
# running out of disk space.
- name: Clear test output
run: ci/clean-test-output.sh
+ # This only tests `cargo fix` because fix-proxy-mode is one of the most
+ # complicated subprocess management in Cargo.
- name: Check operability of rustc invocation with argfile
+ run: 'cargo test -p cargo --test testsuite -- fix::'
env:
__CARGO_TEST_FORCE_ARGFILE: 1
- run: |
- # This only tests `cargo fix` because fix-proxy-mode is one of the most
- # complicated subprocess management in Cargo.
- cargo test --test testsuite -- fix::
- - run: cargo test --manifest-path crates/cargo-test-support/Cargo.toml
- env:
- CARGO_TARGET_DIR: target
+ - run: cargo test -p cargo-test-support
- run: cargo test -p cargo-platform
- run: cargo test -p cargo-util
- - run: cargo test --manifest-path crates/home/Cargo.toml
- - run: cargo test --manifest-path crates/mdman/Cargo.toml
- - run: cargo build --manifest-path crates/credential/cargo-credential-1password/Cargo.toml
- - run: cargo build --manifest-path crates/credential/cargo-credential-gnome-secret/Cargo.toml
+ - run: cargo test -p home
+ - run: cargo test -p mdman
+ - run: cargo build -p cargo-credential-1password
+ - run: cargo build -p cargo-credential-macos-keychain
+ - run: cargo build -p cargo-credential-wincred
+ - run: cargo build -p cargo-credential-gnome-secret
if: matrix.os == 'ubuntu-latest'
- - run: cargo build --manifest-path crates/credential/cargo-credential-macos-keychain/Cargo.toml
- if: matrix.os == 'macos-latest'
- - run: cargo build --manifest-path crates/credential/cargo-credential-wincred/Cargo.toml
- if: matrix.os == 'windows-latest'
- name: Check benchmarks
- env:
- # Share the target dir to try to cache a few build-time deps.
- CARGO_TARGET_DIR: target
run: |
# This only tests one benchmark since it can take over 10 minutes to
# download all workspaces.
- cargo test --manifest-path benches/benchsuite/Cargo.toml --all-targets -- cargo
- cargo check --manifest-path benches/capture/Cargo.toml
+ cargo test -p benchsuite --all-targets -- cargo
+ cargo check -p capture
# The testsuite generates a huge amount of data, and fetch-smoke-test was
# running out of disk space.
- name: Clear benchmark output
@@ -154,7 +168,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- run: rustup update stable && rustup default stable
- - run: cargo test --manifest-path crates/resolver-tests/Cargo.toml
+ - run: cargo test -p resolver-tests
test_gitoxide:
runs-on: ubuntu-latest
@@ -164,7 +178,7 @@ jobs:
- 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
- run: rustup component add rustfmt || echo "rustfmt not available"
- - run: cargo test
+ - run: cargo test -p cargo
env:
__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2: 1
@@ -175,7 +189,7 @@ jobs:
- run: rustup update nightly && rustup default nightly
- run: rustup component add rust-src
- run: cargo build
- - run: cargo test --test build-std
+ - run: cargo test -p cargo --test build-std
env:
CARGO_RUN_BUILD_STD_TESTS: 1
docs:
@@ -187,26 +201,36 @@ jobs:
- run: rustup component add rust-docs
- run: ci/validate-man.sh
# This requires rustfmt, use stable.
- - run: cd src/doc/semver-check && cargo +stable run
- - run: |
+ - name: Run semver-check
+ run: cargo +stable run -p semver-check
+ - name: Ensure intradoc links are valid
+ run: cargo doc --workspace --document-private-items --no-deps
+ env:
+ RUSTDOCFLAGS: -D warnings
+ - name: Install mdbook
+ run: |
mkdir mdbook
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.27/mdbook-v0.4.27-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- - run: cargo doc --document-private-items --no-deps
- env:
- RUSTDOCFLAGS: -D warnings
- run: cd src/doc && mdbook build --dest-dir ../../target/doc
- - run: |
- cd src/doc
- curl -sSLo linkcheck.sh \
- https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh
- sh linkcheck.sh --all cargo
+ - name: Run linkchecker.sh
+ run: |
+ cd target
+ curl -sSLO https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh
+ sh linkcheck.sh --all --path ../src/doc cargo
success:
permissions:
contents: none
name: bors build finished
- needs: [docs, rustfmt, test, resolver, build_std, test_gitoxide]
+ needs:
+ - build_std
+ - docs
+ - lockfile
+ - resolver
+ - rustfmt
+ - test
+ - test_gitoxide
runs-on: ubuntu-latest
if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'"
steps:
@@ -215,7 +239,14 @@ jobs:
permissions:
contents: none
name: bors build finished
- needs: [docs, rustfmt, test, resolver, build_std]
+ needs:
+ - build_std
+ - docs
+ - lockfile
+ - resolver
+ - rustfmt
+ - test
+ - test_gitoxide
runs-on: ubuntu-latest
if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'"
steps: