From 4d7ca071610771d3856e258ff42cfd9147398b81 Mon Sep 17 00:00:00 2001 From: Jerry Xie Date: Fri, 12 Dec 2025 19:11:10 -0600 Subject: [PATCH 1/7] workflows: remove per-commit checking --- .github/workflows/check.yml | 56 ------------------------------------- 1 file changed, 56 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 17ba87f..1a16fe8 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,6 +1,5 @@ # This workflow runs whenever a PR is opened or updated, or a commit is pushed to main. It runs # several checks: -# - commit_list: produces a list of commits to be checked # - fmt: checks that the code is formatted according to rustfmt # - clippy: checks that the code does not contain any clippy warnings # - doc: checks that the code can be documented without errors @@ -23,42 +22,9 @@ concurrency: name: check jobs: - commit_list: - runs-on: ubuntu-latest - steps: - - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Get commit list (push) - id: get_commit_list_push - if: ${{ github.event_name == 'push' }} - run: | - echo "id0=$GITHUB_SHA" > $GITHUB_OUTPUT - echo "List of tested commits:" > $GITHUB_STEP_SUMMARY - sed -n 's,^id[0-9]\+=\(.*\),- ${{ github.repositoryUrl }}/commit/\1,p' -- $GITHUB_OUTPUT >> $GITHUB_STEP_SUMMARY - - - name: Get commit list (PR) - id: get_commit_list_pr - if: ${{ github.event_name == 'pull_request' }} - run: | - git rev-list --reverse refs/remotes/origin/${{ github.base_ref }}..${{ github.event.pull_request.head.sha }} | awk '{ print "id" NR "=" $1 }' > $GITHUB_OUTPUT - git diff --quiet ${{ github.event.pull_request.head.sha }} ${{ github.sha }} || echo "id0=$GITHUB_SHA" >> $GITHUB_OUTPUT - echo "List of tested commits:" > $GITHUB_STEP_SUMMARY - sed -n 's,^id[0-9]\+=\(.*\),- ${{ github.repositoryUrl }}/commit/\1,p' -- $GITHUB_OUTPUT >> $GITHUB_STEP_SUMMARY - - outputs: - commits: ${{ toJSON(steps.*.outputs.*) }} - fmt: runs-on: ubuntu-latest name: nightly / fmt - needs: commit_list - strategy: - fail-fast: false - matrix: - commit: ${{ fromJSON(needs.commit_list.outputs.commits) }} steps: - uses: actions/checkout@v4 with: @@ -74,7 +40,6 @@ jobs: clippy: runs-on: ubuntu-latest name: ${{ matrix.toolchain }} / clippy (${{ matrix.commit }}) - needs: commit_list permissions: contents: read checks: write @@ -83,7 +48,6 @@ jobs: matrix: # Get early warning of new lints which are regularly introduced in beta channels. toolchain: [stable, beta] - commit: ${{ fromJSON(needs.commit_list.outputs.commits) }} steps: - uses: actions/checkout@v4 with: @@ -105,11 +69,8 @@ jobs: # semver: # runs-on: ubuntu-latest # name: semver - # needs: commit_list # strategy: # fail-fast: false - # matrix: - # commit: ${{ fromJSON(needs.commit_list.outputs.commits) }} # steps: # - uses: actions/checkout@v4 # with: @@ -125,11 +86,6 @@ jobs: doc: runs-on: ubuntu-latest name: nightly / doc - needs: commit_list - strategy: - fail-fast: false - matrix: - commit: ${{ fromJSON(needs.commit_list.outputs.commits) }} steps: - uses: actions/checkout@v4 with: @@ -147,11 +103,6 @@ jobs: # which is required for feature unification runs-on: ubuntu-latest name: ubuntu / stable / features - needs: commit_list - strategy: - fail-fast: false - matrix: - commit: ${{ fromJSON(needs.commit_list.outputs.commits) }} steps: - uses: actions/checkout@v4 with: @@ -171,11 +122,6 @@ jobs: # our dependencies. runs-on: ubuntu-latest name: ubuntu / stable / deny - needs: commit_list - strategy: - fail-fast: false - matrix: - commit: ${{ fromJSON(needs.commit_list.outputs.commits) }} steps: - uses: actions/checkout@v4 with: @@ -194,13 +140,11 @@ jobs: msrv: # check that we can build using the minimal rust version that is specified by this crate runs-on: ubuntu-latest - needs: commit_list # we use a matrix here just because env can't be used in job names # https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability strategy: fail-fast: false matrix: - commit: ${{ fromJSON(needs.commit_list.outputs.commits) }} msrv: ["1.85"] # We're relying on namespaced-features, which # was released in 1.60 # From 3d4366064e27d49668f9293e04f4c6f6c0a326fe Mon Sep 17 00:00:00 2001 From: Jerry Xie Date: Fri, 12 Dec 2025 20:38:26 -0600 Subject: [PATCH 2/7] workflow: remove more commit checking remnants --- .github/workflows/check.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 1a16fe8..b6e3960 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -1,4 +1,4 @@ -# This workflow runs whenever a PR is opened or updated, or a commit is pushed to main. It runs +# This workflow runs whenever a PR is opened or updated. It runs # several checks: # - fmt: checks that the code is formatted according to rustfmt # - clippy: checks that the code does not contain any clippy warnings @@ -29,7 +29,6 @@ jobs: - uses: actions/checkout@v4 with: submodules: true - ref: ${{ matrix.commit }} - name: Install nightly uses: dtolnay/rust-toolchain@nightly with: @@ -39,7 +38,7 @@ jobs: clippy: runs-on: ubuntu-latest - name: ${{ matrix.toolchain }} / clippy (${{ matrix.commit }}) + name: ${{ matrix.toolchain }} / clippy permissions: contents: read checks: write @@ -52,7 +51,6 @@ jobs: - uses: actions/checkout@v4 with: submodules: true - ref: ${{ matrix.commit }} - name: Install ${{ matrix.toolchain }} uses: dtolnay/rust-toolchain@master with: @@ -75,7 +73,6 @@ jobs: # - uses: actions/checkout@v4 # with: # submodules: true - # ref: ${{ matrix.commit }} # - name: Install stable # uses: dtolnay/rust-toolchain@stable # with: @@ -90,7 +87,6 @@ jobs: - uses: actions/checkout@v4 with: submodules: true - ref: ${{ matrix.commit }} - name: Install nightly uses: dtolnay/rust-toolchain@stable - name: cargo doc @@ -107,7 +103,6 @@ jobs: - uses: actions/checkout@v4 with: submodules: true - ref: ${{ matrix.commit }} - name: Install stable uses: dtolnay/rust-toolchain@stable - name: cargo install cargo-hack @@ -126,7 +121,6 @@ jobs: - uses: actions/checkout@v4 with: submodules: true - ref: ${{ matrix.commit }} - name: Install stable uses: dtolnay/rust-toolchain@stable - name: cargo install cargo-deny @@ -158,12 +152,11 @@ jobs: # collapse_debuginfo # # device-driver requires 1.85 for rust2024 - name: ubuntu / ${{ matrix.msrv }} (${{ matrix.commit }}) + name: ubuntu / ${{ matrix.msrv }} steps: - uses: actions/checkout@v4 with: submodules: true - ref: ${{ matrix.commit }} - name: Install stable uses: dtolnay/rust-toolchain@stable with: From 86f8bb4d962782de61ec954c99222eb1d814d3b1 Mon Sep 17 00:00:00 2001 From: Jerry Xie Date: Fri, 12 Dec 2025 21:03:17 -0600 Subject: [PATCH 3/7] workflow: make clippy job actually work --- .github/workflows/check.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index b6e3960..4431dbf 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -57,11 +57,7 @@ jobs: toolchain: ${{ matrix.toolchain }} components: clippy - name: cargo clippy - uses: giraffate/clippy-action@v1 - with: - reporter: 'github-pr-check' - clippy_flags: -- -F clippy::suspicious -F clippy::correctness -F clippy::perf -F clippy::style - github_token: ${{ secrets.GITHUB_TOKEN }} + run: cargo clippy --locked -- -Dwarnings # Enable once we have a released crate # semver: From 4545977abddb545003cf7418e6de91db99192002 Mon Sep 17 00:00:00 2001 From: Jerry Xie Date: Fri, 12 Dec 2025 21:07:39 -0600 Subject: [PATCH 4/7] Remove locked flag from clippy checks --- .github/workflows/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 4431dbf..af291e2 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -57,7 +57,7 @@ jobs: toolchain: ${{ matrix.toolchain }} components: clippy - name: cargo clippy - run: cargo clippy --locked -- -Dwarnings + run: cargo clippy -- -Dwarnings # Enable once we have a released crate # semver: From 542e2830137b7af109483b5bdfae4280c809429f Mon Sep 17 00:00:00 2001 From: Jerry Xie Date: Fri, 12 Dec 2025 21:09:57 -0600 Subject: [PATCH 5/7] Address copilot comments and remove beta toolchain --- .github/workflows/check.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index af291e2..0dd58db 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -41,12 +41,11 @@ jobs: name: ${{ matrix.toolchain }} / clippy permissions: contents: read - checks: write strategy: fail-fast: false matrix: # Get early warning of new lints which are regularly introduced in beta channels. - toolchain: [stable, beta] + toolchain: [stable] steps: - uses: actions/checkout@v4 with: From a93227913326575d40e44fe2e8aa136cd1efad41 Mon Sep 17 00:00:00 2001 From: Jerry Xie Date: Fri, 12 Dec 2025 21:16:58 -0600 Subject: [PATCH 6/7] workflow: add job to run through tests --- .github/workflows/check.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 0dd58db..c4b959d 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -126,6 +126,24 @@ jobs: command: check arguments: --all-features + test: + runs-on: ubuntu-latest + name: ubuntu / stable / test + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: Install stable + uses: dtolnay/rust-toolchain@stable + - name: cargo test + run: cargo test + # After ensuring tests pass, finally ensure the test code itself contains no clippy warnings + - name: cargo clippy + run: | + cargo clippy --tests -- -Dwarnings + msrv: # check that we can build using the minimal rust version that is specified by this crate runs-on: ubuntu-latest From 09f143a7c5a67fbb828636c47a2ead620df5717e Mon Sep 17 00:00:00 2001 From: Jerry Xie Date: Fri, 12 Dec 2025 21:25:58 -0600 Subject: [PATCH 7/7] Address copilot comments --- .github/workflows/check.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index c4b959d..85c4319 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -44,7 +44,6 @@ jobs: strategy: fail-fast: false matrix: - # Get early warning of new lints which are regularly introduced in beta channels. toolchain: [stable] steps: - uses: actions/checkout@v4 @@ -77,12 +76,12 @@ jobs: doc: runs-on: ubuntu-latest - name: nightly / doc + name: stable / doc steps: - uses: actions/checkout@v4 with: submodules: true - - name: Install nightly + - name: Install Stable uses: dtolnay/rust-toolchain@stable - name: cargo doc run: cargo doc --no-deps --all-features