Skip to content

Commit

Permalink
Run minimal-versions
Browse files Browse the repository at this point in the history
  • Loading branch information
faern committed May 29, 2024
1 parent 3fbbd06 commit 021ccf2
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
---
name: Build and test
on:
push:
pull_request:
paths:
- '**/*.rs'
- Cargo.toml
- Cargo.lock
workflow_dispatch:

env:
Expand Down Expand Up @@ -47,10 +51,22 @@ jobs:
# The integration tests must run as root since they write firewall state (/dev/pf)
run: sudo cargo test -- --test-threads=1

minimal-versions:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #v1.0.7
with:
toolchain: nightly
profile: minimal
default: true

- name: Downgrade dependencies to minimal versions
run: cargo +nightly update -Z minimal-versions

# Make sure the library builds with all dependencies downgraded to their
# oldest versions allowed by the semver spec. This ensures we have not
# under-specified any dependency
- name: Compile with minimal versions
run: |
cargo +nightly update -Z minimal-versions
cargo build --all-targets
run: cargo build --all-targets

0 comments on commit 021ccf2

Please sign in to comment.