Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,11 @@ jobs:
python3 -m pip install requests --quiet
bin/check/rust_version.py --token ${GITHUB_TOKEN} 7

- name: Check semver
uses: obi1kenobi/[email protected]
- name: Semver
if: always()
run: |
cargo install cargo-semver-checks --locked >/dev/null 2>&1
bin/check/semver.sh
Comment on lines +86 to +90
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installing cargo-semver-checks on every CI run will significantly increase build time and consume unnecessary bandwidth. Consider using GitHub Actions caching to cache the cargo installation directory, similar to how vcpkg is cached in other workflows (see .github/workflows/package.yml:637-641 or .github/workflows/test.yml:427-431 for examples). Alternatively, the action that was replaced (obi1kenobi/cargo-semver-checks-action) likely handled caching internally, which was one of its benefits.

Suggested change
- name: Semver
if: always()
run: |
cargo install cargo-semver-checks --locked >/dev/null 2>&1
bin/check/semver.sh
- name: Cache cargo-semver-checks
if: always()
id: cache-cargo-semver
uses: actions/cache@v4
with:
path: ~/.cargo
key: cargo-semver-checks-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
- name: Install cargo-semver-checks
if: always() && steps.cache-cargo-semver.outputs.cache-hit != 'true'
run: cargo install cargo-semver-checks --locked >/dev/null 2>&1
- name: Semver
if: always()
run: bin/check/semver.sh

Copilot uses AI. Check for mistakes.

- name: Generated
if: always()
Expand Down
14 changes: 14 additions & 0 deletions bin/check/semver.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
set -Eeuo pipefail

result=/tmp/output.txt
cargo semver-checks > "${result}" 2>&1 && exit_code=0 || exit_code=$?
cat "${result}"
if [[ ${exit_code} -gt 0 ]] ; then
if grep -i "unsupported rustdoc format" "${result}" >/dev/null 2>&1 ; then
echo "> Allowing failure because actual rustdoc format is not supported by cargo-semver-checks for now"
exit 0
else
exit "${exit_code}"
fi
fi
Loading