Skip to content

Commit 60a18c5

Browse files
committed
chore(ci): Add CI job for checking it builds with minimal versions
Catch if we have under-specified any semver dependency
1 parent b3427ce commit 60a18c5

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,26 @@ jobs:
164164
uses: coverallsapp/github-action@master
165165
with:
166166
github-token: ${{ secrets.GITHUB_TOKEN }}
167+
# Make sure the library builds with all dependencies downgraded to their
168+
# oldest versions allowed by the semver spec. This ensures we have not
169+
# under-specified any dependency
170+
minimal-versions:
171+
name: Minimal versions
172+
runs-on: ubuntu-latest
173+
steps:
174+
- name: Checkout repository
175+
uses: actions/checkout@v4
176+
- name: Install stable Rust
177+
uses: actions-rs/[email protected]
178+
with:
179+
toolchain: stable
180+
profile: minimal
181+
- name: Install nightly Rust
182+
uses: actions-rs/[email protected]
183+
with:
184+
toolchain: nightly
185+
profile: minimal
186+
- name: Downgrade dependencies to minimal versions
187+
run: cargo +nightly update -Z minimal-versions
188+
- name: Compile with minimal versions
189+
run: cargo +stable build --all-targets --locked

0 commit comments

Comments
 (0)