Use simple vrf #1011
This file contains hidden or 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: Tests | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| # Cancel in-progress jobs when a new commit is pushed to the same PR or branch | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| # Make sure CI fails on all warnings, including Clippy lints | |
| env: | |
| RUSTFLAGS: "-Dwarnings" | |
| RUSTDOCFLAGS: "-Dwarnings" | |
| jobs: | |
| fmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: rustfmt | |
| - run: cargo fmt --all -- --check | |
| clippy_check: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo clippy --all-targets --all-features --tests | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@1.85.0 | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo build --release --all-features | |
| # We want to test stable on multiple platforms with --all-features | |
| test: | |
| name: Test on ${{ matrix.target }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: ["x86_64-unknown-linux-gnu", "armv7-unknown-linux-gnueabihf"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - uses: Swatinem/rust-cache@v2 | |
| # Use cross for non-x86_64 targets | |
| - name: Install cross | |
| if: matrix.target != 'x86_64-unknown-linux-gnu' | |
| uses: taiki-e/install-action@cross | |
| - name: Test | |
| run: | | |
| if [ "${{ matrix.target }}" = "x86_64-unknown-linux-gnu" ]; then | |
| cargo test --all-features --release --target ${{ matrix.target }} | |
| else | |
| cross test --all-features --release --target ${{ matrix.target }} | |
| fi | |
| # test nightly build/test | |
| test-nightly: | |
| name: Test Nightly | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@nightly | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo test --release --all-features | |
| # test without default features | |
| test-minimal: | |
| name: Test Minimal (${{ matrix.package }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| package: | |
| ["secp256kfun", "sigma_fun", "ecdsa_fun", "schnorr_fun", "vrf_fun"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo test --release --no-default-features -p ${{ matrix.package }} | |
| # test with alloc feature only | |
| test-alloc: | |
| name: Test Alloc (${{ matrix.package }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| package: ["secp256kfun", "sigma_fun", "ecdsa_fun", "schnorr_fun"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo test --release --no-default-features --features alloc -p ${{ matrix.package }} | |
| doc-build: | |
| name: Documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - run: cargo doc --no-deps --workspace --all-features |