Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add minimal versions check #1039

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
joshka marked this conversation as resolved.
Show resolved Hide resolved

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
Loading