x-wing: use rand::rngs::OsRng
in code example (#98)
#41
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: frodo-kem | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/frodo-kem.yml" | |
- "frodo-kem/**" | |
- "Cargo.*" | |
push: | |
branches: master | |
env: | |
CARGO_INCREMENTAL: 0 | |
CARGO_TERM_COLOR: always | |
RUST_LOG_STYLE: always | |
RUSTFLAGS: "-Dwarnings" | |
RUSTDOCFLAGS: "-Dwarnings" | |
defaults: | |
run: | |
working-directory: frodo-kem | |
shell: bash | |
jobs: | |
set-msrv: | |
uses: RustCrypto/actions/.github/workflows/set-msrv.yml@master | |
with: | |
msrv: 1.82.0 | |
build: | |
needs: set-msrv | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- ${{ needs.set-msrv.outputs.msrv }} | |
- stable | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- run: cargo build --no-default-features --features=frodo | |
- run: cargo build --no-default-features --features=efrodo | |
- run: cargo build --no-default-features || [ $? -eq 101 ] | |
- run: cargo build --all-features | |
test: | |
needs: set-msrv | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- ${{ needs.set-msrv.outputs.msrv }} | |
- stable | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- run: cargo build --all-features --benches --release --keep-going | |
- run: cargo test --all-features --release | |
- run: cargo test --no-default-features --features=frodo,efrodo,serde --release | |
careful: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
- run: cargo install cargo-careful | |
- run: cargo careful test tests | |
- run: cargo careful test test_vector --release | |
# TODO(tarcieri): needs `set-msrv` | |
# cross: | |
# needs: set-msrv | |
# strategy: | |
# matrix: | |
# include: | |
# - target: powerpc-unknown-linux-gnu | |
# rust: ${{needs.set-msrv.outputs.msrv}} | |
# - target: powerpc-unknown-linux-gnu | |
# rust: stable | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: dtolnay/rust-toolchain@master | |
# with: | |
# toolchain: ${{ matrix.rust }} | |
# targets: ${{ matrix.target }} | |
# - uses: RustCrypto/actions/cross-install@master | |
# - run: cross test --release --target ${{ matrix.target }} --all-features |