Skip to content

Commit

Permalink
ci: add minimal versions check
Browse files Browse the repository at this point in the history
Related to RustCrypto#1038
  • Loading branch information
joshka committed Mar 31, 2024
1 parent 6ff3bb7 commit 44b2489
Show file tree
Hide file tree
Showing 13 changed files with 117 additions and 29 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/bign256.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,8 @@ jobs:
with:
toolchain: stable
- run: cargo doc --all-features

check-minimal-versions:
uses: ./.github/workflows/check-minimal-versions.yml
with:
working-directory: bign256
21 changes: 13 additions & 8 deletions .github/workflows/bp256.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ jobs:
- 1.73.0 # MSRV
- stable
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- run: cargo check --all-features
- run: cargo test --no-default-features
- run: cargo test
- run: cargo test --all-features
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- run: cargo check --all-features
- run: cargo test --no-default-features
- run: cargo test
- run: cargo test --all-features

doc:
runs-on: ubuntu-latest
Expand All @@ -70,3 +70,8 @@ jobs:
with:
toolchain: stable
- run: cargo doc --all-features

check-minimal-versions:
uses: ./.github/workflows/check-minimal-versions.yml
with:
working-directory: bp256
21 changes: 13 additions & 8 deletions .github/workflows/bp384.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ jobs:
- 1.73.0 # MSRV
- stable
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- run: cargo check --all-features
- run: cargo test --no-default-features
- run: cargo test
- run: cargo test --all-features
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- run: cargo check --all-features
- run: cargo test --no-default-features
- run: cargo test
- run: cargo test --all-features

doc:
runs-on: ubuntu-latest
Expand All @@ -70,3 +70,8 @@ jobs:
with:
toolchain: stable
- run: cargo doc --all-features

check-minimal-versions:
uses: ./.github/workflows/check-minimal-versions.yml
with:
working-directory: bp384
28 changes: 28 additions & 0 deletions .github/workflows/check-minimal-versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow checks that the project builds and tests successfully with the
# minimal versions of all dependencies that are compatible with the current
# Cargo.lock file. This is useful for ensuring that the project is not
# accidentally relying on newer versions of dependencies than it actually
# needs.

name: Check minimal versions

on:
workflow_call:
inputs:
working-directory:
type: string
required: true
jobs:
check-minimal-versions:
defaults:
run:
working-directory: ${{ inputs.working-directory }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/rust-toolchain@nightly
- name: cargo update -Zminimal-versions
run: cargo +nightly update -Zdirect-minimal-versions
- name: cargo test
run: cargo test --locked --all-features --all-targets
5 changes: 5 additions & 0 deletions .github/workflows/k256.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,8 @@ jobs:
with:
toolchain: stable
- run: cargo doc --all-features

check-minimal-versions:
uses: ./.github/workflows/check-minimal-versions.yml
with:
working-directory: k256
5 changes: 5 additions & 0 deletions .github/workflows/p192.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,8 @@ jobs:
with:
toolchain: stable
- run: cargo doc --all-features

check-minimal-versions:
uses: ./.github/workflows/check-minimal-versions.yml
with:
working-directory: p192
5 changes: 5 additions & 0 deletions .github/workflows/p224.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,8 @@ jobs:
with:
toolchain: stable
- run: cargo doc --all-features

check-minimal-versions:
uses: ./.github/workflows/check-minimal-versions.yml
with:
working-directory: p224
5 changes: 5 additions & 0 deletions .github/workflows/p256.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,8 @@ jobs:
with:
toolchain: stable
- run: cargo doc --all-features

check-minimal-versions:
uses: ./.github/workflows/check-minimal-versions.yml
with:
working-directory: p256
5 changes: 5 additions & 0 deletions .github/workflows/p384.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,8 @@ jobs:
with:
toolchain: stable
- run: cargo doc --all-features

check-minimal-versions:
uses: ./.github/workflows/check-minimal-versions.yml
with:
working-directory: p384
5 changes: 5 additions & 0 deletions .github/workflows/p521.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,8 @@ jobs:
with:
toolchain: stable
- run: cargo doc --all-features

check-minimal-versions:
uses: ./.github/workflows/check-minimal-versions.yml
with:
working-directory: p521
15 changes: 10 additions & 5 deletions .github/workflows/primefield.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ jobs:
- 1.73.0 # MSRV
- stable
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- run: cargo test
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- run: cargo test

doc:
runs-on: ubuntu-latest
Expand All @@ -60,3 +60,8 @@ jobs:
with:
toolchain: stable
- run: cargo doc --all-features

check-minimal-versions:
uses: ./.github/workflows/check-minimal-versions.yml
with:
working-directory: primefield
21 changes: 13 additions & 8 deletions .github/workflows/primeorder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ jobs:
- 1.73.0 # MSRV
- stable
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- run: cargo check --all-features
- run: cargo test --no-default-features
- run: cargo test
- run: cargo test --all-features
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- run: cargo check --all-features
- run: cargo test --no-default-features
- run: cargo test
- run: cargo test --all-features

doc:
runs-on: ubuntu-latest
Expand All @@ -64,3 +64,8 @@ jobs:
with:
toolchain: stable
- run: cargo doc --all-features

check-minimal-versions:
uses: ./.github/workflows/check-minimal-versions.yml
with:
working-directory: primeorder
5 changes: 5 additions & 0 deletions .github/workflows/sm2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,8 @@ jobs:
with:
toolchain: stable
- run: cargo doc --all-features

check-minimal-versions:
uses: ./.github/workflows/check-minimal-versions.yml
with:
working-directory: sm2

0 comments on commit 44b2489

Please sign in to comment.