Skip to content

Commit

Permalink
Merge branch 'rust-lang:master' into metadata_workspace_default_members
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-r-earp authored May 3, 2023
2 parents 8d579e4 + a9465fe commit c3345df
Show file tree
Hide file tree
Showing 122 changed files with 5,954 additions and 1,069 deletions.
4 changes: 4 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[alias]
build-man = "run --package xtask-build-man --"
stale-label = "run --package xtask-stale-label --"
unpublished = "run --package xtask-unpublished --"
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
107 changes: 63 additions & 44 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -39,7 +33,23 @@ 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

test:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -101,47 +111,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
Expand All @@ -154,7 +156,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
Expand All @@ -164,7 +166,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

Expand All @@ -175,7 +177,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:
Expand All @@ -187,26 +189,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:
Expand All @@ -215,7 +227,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:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
target
Cargo.lock
.cargo
/config.stamp
/Makefile
/config.mk
Expand Down
Loading

0 comments on commit c3345df

Please sign in to comment.