chore(crates/primitives): migrate to new versions of rand and k256
#3102
Workflow file for this run
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: CI | |
| permissions: {} | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: test ${{ matrix.os }} ${{ matrix.rust }} ${{ matrix.flags }} | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ["ubuntu-latest", "windows-latest"] | |
| rust: [ | |
| "stable", | |
| "nightly", | |
| "1.85", # MSRV | |
| ] | |
| flags: [ | |
| # No features | |
| "--no-default-features", | |
| # Default features | |
| "", | |
| ] | |
| include: | |
| # MSRV features | |
| - os: "ubuntu-latest" | |
| rust: "1.85" # MSRV | |
| flags: "--features json" | |
| - os: "windows-latest" | |
| rust: "1.85" # MSRV | |
| flags: "--features json" | |
| # All features | |
| - os: "ubuntu-latest" | |
| rust: "nightly" | |
| flags: "--all-features" | |
| - os: "windows-latest" | |
| rust: "nightly" | |
| flags: "--all-features" | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| with: | |
| cache-on-failure: true | |
| # Only run tests on latest stable and above | |
| - name: pin deps | |
| if: ${{ matrix.rust == '1.85' }} # MSRV | |
| run: cargo +nightly update -Z minimal-versions | |
| - name: build | |
| if: ${{ matrix.rust == '1.85' }} # MSRV | |
| run: cargo build --workspace ${{ matrix.flags }} | |
| - name: test | |
| if: ${{ matrix.rust != '1.85' }} # MSRV | |
| run: cargo test --workspace ${{ matrix.flags }} | |
| miri: | |
| name: miri ${{ matrix.flags }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| flags: ["--no-default-features", "", "--all-features"] | |
| env: | |
| MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-tree-borrows | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master | |
| with: | |
| toolchain: nightly | |
| components: miri | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| - run: cargo miri test ${{ matrix.flags }} | |
| wasm: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master | |
| with: | |
| toolchain: stable | |
| targets: wasm32-unknown-unknown | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| with: | |
| cache-on-failure: true | |
| - name: check | |
| run: cargo check --workspace --target wasm32-unknown-unknown | |
| feature-checks: | |
| name: features ${{ matrix.rust }} ${{ matrix.flags }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rust: ["stable", "nightly"] | |
| flags: ["", "--all-targets"] | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| - uses: taiki-e/install-action@94cb46f8d6e437890146ffbd78a778b78e623fb2 # v2 | |
| with: | |
| tool: cargo-hack | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| with: | |
| cache-on-failure: true | |
| - name: cargo hack | |
| run: | | |
| args=(${{ matrix.flags }}) | |
| [ ${{ matrix.rust }} == "stable" ] && args+=(--skip nightly) | |
| ./scripts/check_features.sh "${args[@]}" | |
| check-no-std: | |
| name: check no_std ${{ matrix.features }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master | |
| with: | |
| toolchain: stable | |
| targets: riscv32imac-unknown-none-elf | |
| - uses: taiki-e/install-action@94cb46f8d6e437890146ffbd78a778b78e623fb2 # v2 | |
| with: | |
| tool: cargo-hack | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| with: | |
| cache-on-failure: true | |
| - run: ./scripts/check_no_std.sh | |
| typos: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: crate-ci/typos@02ea592e44b3a53c302f697cddca7641cd051c3d # v1.45.0 | |
| clippy: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master | |
| with: | |
| toolchain: nightly | |
| components: clippy | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| with: | |
| cache-on-failure: true | |
| - run: cargo clippy --workspace --all-targets --all-features | |
| env: | |
| RUSTFLAGS: -Dwarnings | |
| docs: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master | |
| with: | |
| # Pin docs to a known-good nightly until the 2026-07-02 rustdoc ICE is fixed. | |
| toolchain: nightly-2026-06-27 | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | |
| with: | |
| cache-on-failure: true | |
| - name: Build documentation | |
| run: cargo doc --workspace --all-features --no-deps --document-private-items | |
| env: | |
| RUSTDOCFLAGS: --cfg docsrs -D warnings -Zunstable-options --show-type-layout --generate-link-to-definition | |
| fmt: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master | |
| with: | |
| toolchain: nightly | |
| components: rustfmt | |
| - run: cargo fmt --all --check | |
| deny: | |
| uses: tempoxyz/ci/.github/workflows/deny.yml@268b3ce142717ff86c58fbbcc3abc3f109f0fb8d # main | |
| permissions: | |
| contents: read | |
| ci-success: | |
| name: ci success | |
| runs-on: ubuntu-latest | |
| if: always() | |
| permissions: | |
| contents: read | |
| needs: | |
| - test | |
| - miri | |
| - wasm | |
| - feature-checks | |
| - check-no-std | |
| - typos | |
| - clippy | |
| - docs | |
| - fmt | |
| - deny | |
| steps: | |
| - name: Decide whether the needed jobs succeeded or failed | |
| uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # release/v1 | |
| with: | |
| jobs: ${{ toJSON(needs) }} |