Skip to content

[cryptography/stream] Version SAKE and bind identities before signing #29835

[cryptography/stream] Version SAKE and bind identities before signing

[cryptography/stream] Version SAKE and bind identities before signing #29835

Workflow file for this run

name: Slow
on:
push:
branches: [ "main" ]
pull_request:
merge_group:
permissions:
contents: read
concurrency:
group: tests-slow-${{ github.head_ref || github.ref_name || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
CARGO_TERM_COLOR: always
FUZZ_VERSION: 0.12.0
NIGHTLY_VERSION: nightly-2026-06-21
jobs:
Tests:
name: "Tests (os: ${{ matrix.os }}${{ matrix.flags && format(', flags: \"{0}\"', matrix.flags) }}) (partition: ${{ matrix.partition }}/20)"
runs-on: ${{ matrix.os }}
timeout-minutes: 180
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
partition: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
flags:
- "--features commonware-runtime/iouring"
- "--no-default-features"
- ""
exclude:
# Only run io_uring features on Ubuntu
- os: macos-latest
flags: "--features commonware-runtime/iouring"
# Only run --no-default-features on Ubuntu
- os: macos-latest
flags: "--no-default-features"
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Configure swap
uses: ./.github/actions/swap
- name: Clear disk space
uses: ./.github/actions/disk
- name: Run setup
uses: ./.github/actions/setup
with:
additional-cache-key: ${{ matrix.flags || 'default' }}
rust-cache-save: ${{ matrix.partition == 1 }}
sccache-r2-bucket: ${{ secrets.SCCACHE_R2_BUCKET }}
sccache-r2-endpoint: ${{ secrets.SCCACHE_R2_ENDPOINT }}
sccache-r2-access-key-id: ${{ secrets.SCCACHE_R2_ACCESS_KEY_ID }}
sccache-r2-secret-access-key: ${{ secrets.SCCACHE_R2_SECRET_ACCESS_KEY }}
- name: Install just & nextest
uses: taiki-e/install-action@43aecc8d72668fbcfe75c31400bc4f890f1c5853 # v2.83.2
with:
tool: just@1.43.0,cargo-nextest@0.9.133
- name: Run slow tests
run: just test ${{ matrix.flags }} --partition hash:${{matrix.partition}}/20 --verbose --profile slow
Tests-Gate:
name: "Slow-Tests"
runs-on: ubuntu-latest
needs: Tests
if: always()
steps:
- name: Checkout swap action
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
with:
sparse-checkout: .github/actions/swap
- name: Configure swap
uses: ./.github/actions/swap
- name: Check test results
run: |
if [ "${{ needs.Tests.result }}" != "success" ]; then
echo "Tests failed or were cancelled"
exit 1
fi
echo "All tests passed successfully!"
Benchmarks:
name: "Benchmarks (${{ matrix.package }}${{ matrix.test_flags && format(', {0}', matrix.test_flags) }}${{ matrix.lint_flags && format(', {0}', matrix.lint_flags) }}) (partition: ${{ matrix.partition || '1/1' }})"
runs-on: ubuntu-latest
strategy:
matrix:
include:
- package: commonware-cryptography
test_flags: ""
lint_flags: ""
- package: commonware-cryptography-curve25519
test_flags: ""
lint_flags: ""
- package: commonware-storage
test_flags: "--features test-traits"
lint_flags: "--cfg full_bench"
- package: commonware-coding
test_flags: ""
lint_flags: ""
partition: "1/4"
- package: commonware-coding
test_flags: ""
lint_flags: ""
partition: "2/4"
- package: commonware-coding
test_flags: ""
lint_flags: ""
partition: "3/4"
- package: commonware-coding
test_flags: ""
lint_flags: ""
partition: "4/4"
- package: commonware-math
test_flags: ""
lint_flags: ""
- package: commonware-utils
test_flags: ""
lint_flags: ""
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Configure swap
uses: ./.github/actions/swap
- name: Run setup
uses: ./.github/actions/setup
with:
additional-cache-key: ${{ matrix.package }}-${{ matrix.test_flags || 'default' }}-${{ matrix.lint_flags || 'default' }}
rust-cache-save: ${{ startsWith(matrix.partition || '1/1', '1/') }}
sccache-r2-bucket: ${{ secrets.SCCACHE_R2_BUCKET }}
sccache-r2-endpoint: ${{ secrets.SCCACHE_R2_ENDPOINT }}
sccache-r2-access-key-id: ${{ secrets.SCCACHE_R2_ACCESS_KEY_ID }}
sccache-r2-secret-access-key: ${{ secrets.SCCACHE_R2_SECRET_ACCESS_KEY }}
- name: Install just
uses: taiki-e/install-action@43aecc8d72668fbcfe75c31400bc4f890f1c5853 # v2.83.2
with:
tool: just@1.43.0
- name: Test benchmarks
run: just partition=${{ matrix.partition || '1/1' }} test-benches ${{ matrix.package }} '${{ matrix.test_flags }}' '${{ matrix.lint_flags }}'
Fuzz:
name: "Fuzz (${{ matrix.fuzz_dir }}) (partition: ${{ matrix.partition || '1/1' }})"
runs-on: ubuntu-latest
timeout-minutes: 180
strategy:
matrix:
include:
- fuzz_dir: broadcast/fuzz
- fuzz_dir: codec/fuzz
- fuzz_dir: coding/fuzz
- fuzz_dir: collector/fuzz
- fuzz_dir: consensus/fuzz
partition: "1/4"
- fuzz_dir: consensus/fuzz
partition: "2/4"
- fuzz_dir: consensus/fuzz
partition: "3/4"
- fuzz_dir: consensus/fuzz
partition: "4/4"
- fuzz_dir: cryptography/fuzz
partition: "1/2"
- fuzz_dir: cryptography/fuzz
partition: "2/2"
- fuzz_dir: cryptography/curve25519/fuzz
- fuzz_dir: math/fuzz
- fuzz_dir: p2p/fuzz
- fuzz_dir: runtime/fuzz
- fuzz_dir: storage/fuzz
partition: "1/4"
- fuzz_dir: storage/fuzz
partition: "2/4"
- fuzz_dir: storage/fuzz
partition: "3/4"
- fuzz_dir: storage/fuzz
partition: "4/4"
- fuzz_dir: stream/fuzz
- fuzz_dir: utils/fuzz
partition: "1/2"
- fuzz_dir: utils/fuzz
partition: "2/2"
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Configure swap
uses: ./.github/actions/swap
- name: Clear disk space
uses: ./.github/actions/disk
- name: Run setup
uses: ./.github/actions/setup
with:
additional-toolchain: ${{ env.NIGHTLY_VERSION }}
additional-cache-key: ${{ matrix.fuzz_dir }}
rust-cache-save: ${{ startsWith(matrix.partition || '1/1', '1/') }}
sccache-r2-bucket: ${{ secrets.SCCACHE_R2_BUCKET }}
sccache-r2-endpoint: ${{ secrets.SCCACHE_R2_ENDPOINT }}
sccache-r2-access-key-id: ${{ secrets.SCCACHE_R2_ACCESS_KEY_ID }}
sccache-r2-secret-access-key: ${{ secrets.SCCACHE_R2_SECRET_ACCESS_KEY }}
- name: Get Rust version
id: rust-version
run: echo "rust_version=$(rustc +${{ env.NIGHTLY_VERSION }} --version)" >> "$GITHUB_OUTPUT"
- name: Cache cargo-fuzz
id: cargo-fuzz-cache
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with:
path: ${{ env.CARGO_HOME || '~/.cargo' }}/bin/cargo-fuzz
key: ${{ runner.os }}-${{ env.FUZZ_VERSION }}-cargo-fuzz-${{ steps.rust-version.outputs.rust_version }}
- name: Install cargo-fuzz
if: steps.cargo-fuzz-cache.outputs.cache-hit != 'true'
run: cargo +${{ env.NIGHTLY_VERSION }} install cargo-fuzz --version ${{ env.FUZZ_VERSION }}
- name: Install just
uses: taiki-e/install-action@43aecc8d72668fbcfe75c31400bc4f890f1c5853 # v2.83.2
with:
tool: just@1.43.0
- name: Ensure corpus directory exists
run: mkdir -p ${{ matrix.fuzz_dir }}/corpus
- name: Compute fuzz corpus cache key prefix
id: fuzz-corpus-cache-key
run: |
sanitized_fuzz_dir="$(echo "${{ matrix.fuzz_dir }}" | tr '/' '-')"
sanitized_partition="$(echo "${{ matrix.partition || '1/1' }}" | tr '/' '-')"
echo "prefix=${{ runner.os }}-fuzz-corpus-${sanitized_fuzz_dir}-${sanitized_partition}" >> "$GITHUB_OUTPUT"
- name: Restore fuzz corpus
id: fuzz-corpus-restore
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with:
path: ${{ matrix.fuzz_dir }}/corpus
key: ${{ steps.fuzz-corpus-cache-key.outputs.prefix }}-${{ github.run_id }}-${{ github.run_attempt }}
restore-keys: |
${{ steps.fuzz-corpus-cache-key.outputs.prefix }}-
- name: Test all targets
run: just partition=${{ matrix.partition || '1/1' }} fuzz ${{ matrix.fuzz_dir }}
- name: Save fuzz corpus
if: success() && github.ref == 'refs/heads/main'
uses: actions/cache/save@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with:
path: ${{ matrix.fuzz_dir }}/corpus
key: ${{ steps.fuzz-corpus-restore.outputs.cache-primary-key }}
Unsafe:
name: "Miri Tests (partition: ${{ matrix.partition }}/12)"
runs-on: ubuntu-latest
timeout-minutes: 120
strategy:
matrix:
partition: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Configure swap
uses: ./.github/actions/swap
- name: Run setup
uses: ./.github/actions/setup
with:
toolchain: ${{ env.NIGHTLY_VERSION }}
components: miri
rust-cache-save: ${{ matrix.partition == 1 }}
sccache-r2-bucket: ${{ secrets.SCCACHE_R2_BUCKET }}
sccache-r2-endpoint: ${{ secrets.SCCACHE_R2_ENDPOINT }}
sccache-r2-access-key-id: ${{ secrets.SCCACHE_R2_ACCESS_KEY_ID }}
sccache-r2-secret-access-key: ${{ secrets.SCCACHE_R2_SECRET_ACCESS_KEY }}
- name: Install miri
run: cargo miri setup
- name: Install just & nextest
uses: taiki-e/install-action@43aecc8d72668fbcfe75c31400bc4f890f1c5853 # v2.83.2
with:
tool: just@1.43.0,cargo-nextest@0.9.133
- name: Run miri tests for runtime::iobuf
run: |
cd runtime
just miri iobuf:: --partition hash:${{matrix.partition}}/12
- name: Run miri tests for runtime::buffer::paged::append
run: |
cd runtime
just miri utils::buffer::paged::append::tests:: --partition hash:${{matrix.partition}}/12 --no-tests=pass
Unsafe-Tests-Gate:
name: "Unsafe-Tests"
runs-on: ubuntu-latest
needs: Unsafe
if: always()
steps:
- name: Checkout swap action
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
with:
sparse-checkout: .github/actions/swap
- name: Configure swap
uses: ./.github/actions/swap
- name: Check test results
run: |
if [ "${{ needs.Unsafe.result }}" != "success" ]; then
echo "Tests failed or were cancelled"
exit 1
fi
echo "All tests passed successfully!"
conformance:
# Run conformance tests on multiple architectures to catch platform-specific
# encoding differences.
name: "Breaking Changes (${{ matrix.name }}) (partition: ${{ matrix.partition }}/8)"
runs-on: ${{ matrix.os }}
timeout-minutes: 90
strategy:
matrix:
name: [x86_64, arm64]
partition: [1, 2, 3, 4, 5, 6, 7, 8]
include:
- name: x86_64
os: ubuntu-latest
- name: arm64
os: ubuntu-24.04-arm
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Configure swap
uses: ./.github/actions/swap
- name: Run setup
uses: ./.github/actions/setup
with:
rust-cache-save: ${{ matrix.partition == 1 }}
sccache-r2-bucket: ${{ secrets.SCCACHE_R2_BUCKET }}
sccache-r2-endpoint: ${{ secrets.SCCACHE_R2_ENDPOINT }}
sccache-r2-access-key-id: ${{ secrets.SCCACHE_R2_ACCESS_KEY_ID }}
sccache-r2-secret-access-key: ${{ secrets.SCCACHE_R2_SECRET_ACCESS_KEY }}
- name: Install just
uses: taiki-e/install-action@43aecc8d72668fbcfe75c31400bc4f890f1c5853 # v2.83.2
with:
tool: just@1.43.0,cargo-nextest@0.9.133
- name: Run conformance tests
run: just test-conformance --partition hash:${{ matrix.partition }}/8 && git diff --exit-code
Conformance-Gate:
name: "Breaking Changes"
runs-on: ubuntu-latest
needs: conformance
if: always()
steps:
- name: Checkout swap action
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
with:
sparse-checkout: .github/actions/swap
- name: Configure swap
uses: ./.github/actions/swap
- name: Check conformance results
run: |
if [ "${{ needs.conformance.result }}" != "success" ]; then
echo "Conformance tests failed or were cancelled"
exit 1
fi
echo "All conformance tests passed successfully!"