Skip to content

Commit d2b9759

Browse files
committed
chore: follow old pattern
1 parent 8edd3be commit d2b9759

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
- run-on-ref-slice-fork-windows
4646
- run-on-tokio-explicit
4747
- run-on-tokio-implicit
48+
- run-on-sdl3-sys-version-without-metadata
4849
- run-on-perf-event-open-sys2
4950
- fails-on-too-old-rustc
5051
if: ${{ success() || failure() }} # Run this job even if a dependency has failed.
@@ -1750,9 +1751,9 @@ jobs:
17501751
key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc
17511752
path: subject/target/semver-checks/cache
17521753

1753-
# Semver test for sdl3-sys missing registry version baseline
1754-
run-on-sdl3-sys-version-not-found:
1755-
name: 'Semver: sdl3-sys missing baseline-version error'
1754+
# Test that version without metadata now works for sdl3-sys
1755+
run-on-sdl3-sys-version-without-metadata:
1756+
name: 'Semver: sdl3-sys version without metadata should work'
17561757
runs-on: ubuntu-latest
17571758
needs:
17581759
- build-binary
@@ -1772,6 +1773,7 @@ jobs:
17721773
path: 'subject'
17731774

17741775
- name: Install rust
1776+
id: toolchain
17751777
uses: actions-rust-lang/setup-rust-toolchain@v1
17761778
with:
17771779
cache: false
@@ -1784,31 +1786,31 @@ jobs:
17841786
key: bins-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }}
17851787
fail-on-cache-miss: true
17861788

1787-
- name: Run semver-checks for missing version
1788-
continue-on-error: true
1789-
run: |
1790-
cd semver
1791-
set -euo pipefail
1792-
../bins/cargo-semver-checks semver-checks check-release \
1793-
--manifest-path="../subject/sdl3-sys/Cargo.toml" \
1794-
--baseline-version 0.4.7 2>&1 | tee output
1795-
touch unexpectedly_did_not_fail
1789+
- name: Restore rustdoc
1790+
id: cache
1791+
uses: actions/cache/restore@v4
1792+
with:
1793+
key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc
1794+
path: subject/target/semver-checks/cache
17961795

1797-
- name: Check whether it failed
1798-
run: |
1799-
cd semver
1800-
if [ -f unexpectedly_did_not_fail ]; then exit 1; else exit 0; fi
1796+
- name: Restore cargo index and rustdoc target dir
1797+
uses: Swatinem/rust-cache@v2
1798+
with:
1799+
workspaces: |
1800+
subject/target/semver-checks/local-sdl3_sys-0_4_9_SDL3_3_2_10
18011801
1802-
- name: Check error message
1802+
- name: Run semver-checks with version without metadata
18031803
run: |
1804-
cd semver
1805-
grep 'error: Version sdl3-sys of crate 0.4.7 not found in registry' output
1804+
cd subject/sdl3-sys
1805+
../../bins/cargo-semver-checks semver-checks check-release \
1806+
--baseline-version 0.4.7 --verbose
18061807
1807-
- name: Cleanup
1808-
run: |
1809-
cd semver
1810-
rm output
1811-
rm -f unexpectedly_did_not_fail
1808+
- name: Save rustdoc
1809+
uses: actions/cache/save@v4
1810+
if: steps.cache.outputs.cache-hit != 'true'
1811+
with:
1812+
key: ${{ runner.os }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('semver/**/Cargo.lock') }}-${{ github.job }}-rustdoc
1813+
path: subject/target/semver-checks/cache
18121814

18131815
run-on-perf-event-open-sys2:
18141816
# cargo-semver-checks failed to find the generated rustdoc JSON

0 commit comments

Comments
 (0)