Skip to content

[storage/journal/authenticated] Ensure Stale Batch Has No Side Effects #16704

[storage/journal/authenticated] Ensure Stale Batch Has No Side Effects

[storage/journal/authenticated] Ensure Stale Batch Has No Side Effects #16704

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-2025-11-15
jobs:
Tests:
name: "Tests (os: ${{ matrix.os }}, flags: \"${{ matrix.flags }}\") (partition: ${{ matrix.partition }}/8)"
runs-on: ${{ matrix.os }}
timeout-minutes: 180
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
partition: [1, 2, 3, 4, 5, 6, 7, 8]
flags:
- "--features commonware-runtime/iouring-storage"
- "--features commonware-runtime/iouring-network"
- "--no-default-features"
- ""
exclude:
# Only run io_uring features on Ubuntu
- os: windows-latest
flags: "--features commonware-runtime/iouring-storage"
- os: macos-latest
flags: "--features commonware-runtime/iouring-storage"
- os: windows-latest
flags: "--features commonware-runtime/iouring-network"
- os: macos-latest
flags: "--features commonware-runtime/iouring-network"
# Only run --no-default-features on Ubuntu
- os: windows-latest
flags: "--no-default-features"
- os: macos-latest
flags: "--no-default-features"
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Clear disk space
uses: ./.github/actions/disk
- name: Run setup
uses: ./.github/actions/setup
with:
additional-cache-key: ${{ matrix.flags || 'default' }}-part-${{ matrix.partition }}
- name: Install just & nextest
uses: taiki-e/install-action@0c5db7f7f897c03b771660e91d065338615679f4 # v2.60.0
with:
tool: just@1.43.0,cargo-nextest@0.9.129
- name: Run slow tests
run: just test ${{ matrix.flags }} --partition hash:${{matrix.partition}}/8 --verbose --profile slow
Tests-Gate:
name: "Slow-Tests"
runs-on: ubuntu-latest
needs: Tests
if: always()
steps:
- 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:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- package: commonware-cryptography
cargo_flags: ""
- package: commonware-storage
cargo_flags: ""
- package: commonware-storage
cargo_flags: "--features commonware-runtime/iouring-storage" # Additional features can be added here
- package: commonware-coding
cargo_flags: ""
- package: commonware-utils
cargo_flags: ""
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Install nightly Rust toolchain
run: rustup toolchain install ${{ env.NIGHTLY_VERSION }}
- name: Run setup
uses: ./.github/actions/setup
- name: Install just
uses: taiki-e/install-action@0c5db7f7f897c03b771660e91d065338615679f4 # v2.60.0
with:
tool: just@1.43.0
- name: Test benchmarks
run: just test-benches ${{ matrix.package }} ${{ matrix.cargo_flags }}
Fuzz:
runs-on: ubuntu-latest
timeout-minutes: 180
strategy:
matrix:
fuzz_dir: [broadcast/fuzz, codec/fuzz, coding/fuzz, collector/fuzz, consensus/fuzz, cryptography/fuzz, math/fuzz, p2p/fuzz, runtime/fuzz, storage/fuzz, stream/fuzz, utils/fuzz]
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Clear disk space
uses: ./.github/actions/disk
- name: Install nightly Rust toolchain
run: rustup toolchain install ${{ env.NIGHTLY_VERSION }}
- name: Get Rust version
id: rust-version
run: echo "rust_version=$(rustc +${{ env.NIGHTLY_VERSION }} --version)" >> "$GITHUB_OUTPUT"
- name: Run setup
uses: ./.github/actions/setup
- 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@0c5db7f7f897c03b771660e91d065338615679f4 # v2.60.0
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 '/' '-')"
echo "prefix=${{ runner.os }}-fuzz-corpus-${sanitized_fuzz_dir}" >> "$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 fuzz ${{ matrix.fuzz_dir }} 60
- 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 }}/8)"
runs-on: ubuntu-latest
timeout-minutes: 120
strategy:
matrix:
partition: [1, 2, 3, 4, 5, 6, 7, 8]
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Run setup
uses: ./.github/actions/setup
with:
additional-cache-key: part-${{ matrix.partition }}
- name: Install miri
run: |
rustup toolchain install ${{ env.NIGHTLY_VERSION }} --component miri
rustup override set ${{ env.NIGHTLY_VERSION }}
cargo miri setup
- name: Install just & nextest
uses: taiki-e/install-action@0c5db7f7f897c03b771660e91d065338615679f4 # v2.60.0
with:
tool: just@1.43.0,cargo-nextest@0.9.129
- name: Run miri tests for storage::index
run: |
cd storage
just miri index::tests --partition hash:${{matrix.partition}}/8
- name: Run miri tests for runtime::iobuf
run: |
cd runtime
just miri iobuf:: --partition hash:${{matrix.partition}}/8
Unsafe-Tests-Gate:
name: "Unsafe-Tests"
runs-on: ubuntu-latest
needs: Unsafe
if: always()
steps:
- 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: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Run setup
uses: ./.github/actions/setup
with:
additional-cache-key: ${{ matrix.name }}-part-${{ matrix.partition }}
- name: Install just
uses: taiki-e/install-action@0c5db7f7f897c03b771660e91d065338615679f4 # v2.60.0
with:
tool: just@1.43.0,cargo-nextest@0.9.129
- 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: 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!"