From d1b2d29528b7794b41e66fc2136e395a02f8529b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:59:35 +0200 Subject: Merging upstream version 1.73.0+dfsg1. Signed-off-by: Daniel Baumann --- src/tools/cargo/.github/renovate.json5 | 38 ++++++++++++ src/tools/cargo/.github/workflows/main.yml | 96 +++++++++++++++--------------- 2 files changed, 86 insertions(+), 48 deletions(-) create mode 100644 src/tools/cargo/.github/renovate.json5 (limited to 'src/tools/cargo/.github') diff --git a/src/tools/cargo/.github/renovate.json5 b/src/tools/cargo/.github/renovate.json5 new file mode 100644 index 000000000..8ad9952d2 --- /dev/null +++ b/src/tools/cargo/.github/renovate.json5 @@ -0,0 +1,38 @@ +{ + schedule: [ + 'before 5am on the first day of the month', + ], + semanticCommits: 'enabled', + configMigration: true, + dependencyDashboard: false, + ignorePaths: [ + "**/tests/**", + ], + packageRules: [ + // Goals: + // - Rollup safe upgrades to reduce CI runner load + // - Have lockfile and manifest in-sync (implicit rules) + { + matchManagers: [ + 'cargo', + ], + matchCurrentVersion: '>=0.1.0', + matchUpdateTypes: [ + 'patch', + ], + automerge: false, + groupName: 'compatible', + }, + { + matchManagers: [ + 'cargo', + ], + matchCurrentVersion: '>=1.0.0', + matchUpdateTypes: [ + 'minor', + ], + automerge: false, + groupName: 'compatible', + }, + ], +} diff --git a/src/tools/cargo/.github/workflows/main.yml b/src/tools/cargo/.github/workflows/main.yml index 3deae6355..2e71f14b8 100644 --- a/src/tools/cargo/.github/workflows/main.yml +++ b/src/tools/cargo/.github/workflows/main.yml @@ -13,6 +13,41 @@ permissions: contents: read jobs: + success: + permissions: + contents: none + name: bors build finished + needs: + - build_std + - clippy + - docs + - lockfile + - resolver + - rustfmt + - test + - test_gitoxide + runs-on: ubuntu-latest + if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'" + steps: + - run: echo ok + failure: + permissions: + contents: none + name: bors build finished + needs: + - build_std + - clippy + - docs + - lockfile + - resolver + - rustfmt + - test + - test_gitoxide + runs-on: ubuntu-latest + if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'" + steps: + - run: exit 1 + # Check Code style quickly by running `rustfmt` over all code rustfmt: runs-on: ubuntu-latest @@ -52,12 +87,18 @@ jobs: runs-on: ubuntu-latest env: BASE_SHA: ${{ github.event.pull_request.base.sha }} - HEAD_SHA: ${{ github.sha }} + HEAD_SHA: ${{ github.event.pull_request.head.sha != '' && github.event.pull_request.head.sha || github.sha }} steps: - uses: actions/checkout@v3 with: - fetch-depth: 0 # make `git diff` work + 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 \ + | tar -xz --directory=./installed-bins + echo `pwd`/installed-bins >> $GITHUB_PATH - run: ci/validate-version-bump.sh test: @@ -119,6 +160,7 @@ jobs: - 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 -p cargo git env: @@ -127,22 +169,14 @@ jobs: # 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: cargo test -p cargo-test-support - - run: cargo test -p cargo-platform - - run: cargo test -p cargo-util - - 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 test --workspace --exclude cargo --exclude benchsuite - name: Check benchmarks run: | # This only tests one benchmark since it can take over 10 minutes to @@ -153,6 +187,7 @@ jobs: # running out of disk space. - name: Clear benchmark output run: ci/clean-test-output.sh + - name: Fetch smoke test run: ci/fetch-smoke-test.sh @@ -203,7 +238,7 @@ jobs: - 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 + curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.31/mdbook-v0.4.31-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook echo `pwd`/mdbook >> $GITHUB_PATH - run: cd src/doc && mdbook build --dest-dir ../../target/doc - name: Run linkchecker.sh @@ -211,38 +246,3 @@ jobs: 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: - - build_std - - clippy - - docs - - lockfile - - resolver - - rustfmt - - test - - test_gitoxide - runs-on: ubuntu-latest - if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'" - steps: - - run: echo ok - failure: - permissions: - contents: none - name: bors build finished - needs: - - build_std - - clippy - - docs - - lockfile - - resolver - - rustfmt - - test - - test_gitoxide - runs-on: ubuntu-latest - if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/auto-cargo'" - steps: - - run: exit 1 -- cgit v1.2.3