From 021ccf2c0bd74f0f661db48d72c210f82975bf56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20F=C3=A4rnstrand?= Date: Wed, 29 May 2024 11:22:45 +0200 Subject: [PATCH] Run minimal-versions --- .github/workflows/build-and-test.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index e225b60..728295e 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -1,7 +1,11 @@ --- name: Build and test on: - push: + pull_request: + paths: + - '**/*.rs' + - Cargo.toml + - Cargo.lock workflow_dispatch: env: @@ -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 \ No newline at end of file + run: cargo build --all-targets