name: CI
permissions:
contents: read
on:
workflow_dispatch:
workflow_call:
push:
branches: [ main, next ]
pull_request:
branches: [ main, next ]
defaults:
run:
shell: bash
jobs:
build-test:
name: Build & Test (${{ matrix.target }})
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
- x86_64-pc-windows-msvc
- x86_64-apple-darwin
- aarch64-apple-darwin
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 with:
targets: ${{ matrix.target }}
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 with:
save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next' }}
- name: Install cross-compilation toolchain
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu libc6-dev-arm64-cross
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
echo "CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
- name: Build
run: cargo build --target ${{ matrix.target }} --verbose
- name: Run tests
if: matrix.target != 'aarch64-unknown-linux-gnu'
run: cargo test --all-features --target ${{ matrix.target }} --verbose
apple-targets:
name: Apple Ecosystem (${{ matrix.target }})
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
target:
- aarch64-apple-ios
- aarch64-apple-ios-sim
- aarch64-apple-tvos
- aarch64-apple-tvos-sim
- aarch64-apple-visionos
- aarch64-apple-visionos-sim
- aarch64-apple-watchos
- aarch64-apple-watchos-sim
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 with:
targets: ${{ matrix.target }}
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 with:
save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next' }}
- name: Build
run: cargo build --target ${{ matrix.target }}
android-target:
name: Android Ecosystem (aarch64-linux-android)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 with:
targets: aarch64-linux-android
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 with:
save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next' }}
- name: Configure Android NDK toolchain
run: |
NDK_PATH="${ANDROID_NDK_LATEST_HOME:-$ANDROID_NDK_HOME}"
if [ -z "$NDK_PATH" ] || [ ! -d "$NDK_PATH" ]; then
NDK_PATH="$(ls -d /usr/local/lib/android/sdk/ndk/* 2>/dev/null | sort -V | tail -n 1)"
fi
TOOLCHAIN="$NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64"
CLANG_BIN="$(find "$TOOLCHAIN/bin" -name "aarch64-linux-android*-clang" | grep -v '++' | sort -V | tail -n 1)"
LLVM_AR="$TOOLCHAIN/bin/llvm-ar"
echo "CC_aarch64_linux_android=$CLANG_BIN" >> $GITHUB_ENV
echo "AR_aarch64_linux_android=$LLVM_AR" >> $GITHUB_ENV
echo "CARGO_TARGET_AARCH64_LINUX_ANDROID_AR=$LLVM_AR" >> $GITHUB_ENV
echo "CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=$CLANG_BIN" >> $GITHUB_ENV
- name: Build
run: cargo build --target aarch64-linux-android
oracle-fuzz:
name: Seeded oracle fuzzing
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32
- name: Run oracle fuzzing (multi-seed)
run: |
for seed in 1001 2002 3003 4004 5005; do
echo "==> Running DST with seed ${seed}..."
ARTMAP_SIM_SEED=${seed} cargo test --test sim -- --nocapture
ARTMAP_SIM_SEED=${seed} cargo test --test versioned_simulation_tests -- --nocapture
done
wasm-check:
name: WASM Check & Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 with:
targets: wasm32-unknown-unknown
components: clippy
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32
- name: Check WASM compilation
run: cargo check --target wasm32-unknown-unknown
- name: Run clippy (WASM)
run: cargo clippy --target wasm32-unknown-unknown --lib -- -D warnings
format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 with:
components: rustfmt
- name: Check formatting
run: cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 with:
components: clippy
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
bench:
name: Benchmark Compilation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32
- name: Check benchmarks compile
run: cargo bench --no-run
loom:
name: Loom
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32
- name: Run loom models
run: 'RUSTFLAGS="--cfg loom" cargo test --lib --release loom_tests::'
miri-tb:
name: Miri (Tree Borrows, ${{ matrix.target }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu]
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install nightly Rust with Miri
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 with:
toolchain: nightly-2026-09-23
components: miri
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32
- name: Run Miri on the EBR suites
env:
MIRIFLAGS: -Zmiri-tree-borrows -Zmiri-ignore-leaks -Zmiri-many-seeds=0..4
run: >
cargo miri test --target ${{ matrix.target }} --lib
--test concurrent_correctness --test model --test unwind
--test regressions --test drop_accounting --test panicking_drop
--test linearizability --test proptest_keys --test byteslice_keys
--test sim --test versioned_simulation_tests --test versioned_artmap_tests
- name: Run Miri on the doctests
env:
MIRIFLAGS: -Zmiri-tree-borrows -Zmiri-ignore-leaks
run: cargo miri test --target ${{ matrix.target }} --doc
miri-arena:
name: Miri (arena, leak-checked)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install nightly Rust with Miri
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 with:
toolchain: nightly-2026-09-23
components: miri
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32
- name: Run Miri on the arena suites
env:
MIRIFLAGS: -Zmiri-tree-borrows -Zmiri-strict-provenance -Zmiri-symbolic-alignment-check -Zmiri-many-seeds=0..8
run: cargo miri test --test arena_artmap_tests --test arena_regressions
miri-strict:
name: Miri (strict provenance units)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install nightly Rust with Miri
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 with:
toolchain: nightly-2026-09-23
components: miri
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32
- name: Run Miri with strict provenance
env:
MIRIFLAGS: -Zmiri-tree-borrows -Zmiri-strict-provenance
run: 'cargo miri test --lib -- raw::node:: raw::slot:: latch:: simd:: arena::'
provenance-lints:
name: Provenance lints
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install nightly Rust
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 with:
toolchain: nightly-2026-09-23
- name: Check with the provenance lints denied
run: RUSTFLAGS="--cfg artmap_provenance_lints" cargo check --lib
sanitizers:
name: Sanitizer (${{ matrix.sanitizer }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sanitizer: [thread, address]
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install nightly Rust
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 with:
toolchain: nightly-2026-09-23
components: rust-src
- name: Run the stress and race tests under the sanitizer
env:
RUSTFLAGS: -Zsanitizer=${{ matrix.sanitizer }}
RUSTDOCFLAGS: -Zsanitizer=${{ matrix.sanitizer }}
TSAN_OPTIONS: halt_on_error=1
ARTMAP_STRESS_MS: "1000"
run: >
cargo test -Zbuild-std --target x86_64-unknown-linux-gnu --release --lib
--test concurrent_correctness --test concurrency_stress_tests
--test regressions --test drop_accounting --test linearizability
--test arena_regressions --test unwind -- --test-threads=1
stress-release:
name: Release-mode stress
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32
- name: Run the race tests for longer
env:
ARTMAP_STRESS_MS: "10000"
run: cargo test --release --test concurrent_correctness --test concurrency_stress_tests --test arena_regressions
compile-fail:
name: Compile-fail doctests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install nightly Rust
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 with:
toolchain: nightly-2026-09-23
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32
- name: Run the doctests
run: cargo test --doc
msrv:
name: MSRV (1.86)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install Rust 1.86
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 with:
toolchain: "1.86"
- name: Check the library
run: cargo check --lib --all-features
semver-checks:
name: Semver checks
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@5b298c9520f7096a4683c0bd981a7ac5a7e249ae
public-api:
name: Public API snapshot
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install nightly Rust
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 with:
toolchain: nightly-2026-09-23
- name: Install cargo-public-api
run: cargo install --locked cargo-public-api
- name: Diff against the committed snapshot
run: |
cargo public-api --simplified > /tmp/public-api.txt
if [ -f public-api.txt ]; then
diff -u public-api.txt /tmp/public-api.txt
else
cat /tmp/public-api.txt
echo "::warning::no public-api.txt snapshot committed yet; commit the output above"
fi
cargo-deny:
name: Advisories
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Check advisories
uses: EmbarkStudios/cargo-deny-action@3c6349835b2b7b196a839186cb8b78e02f7b5f25 with:
command: check advisories
downstream-canary:
name: Downstream canary
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32
- name: Run the memtable example
run: cargo run --release --example memtable
unsafe-hygiene:
name: Latch-acquisition greps
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Reject unbound latch guards
run: |
! grep -rnE 'let _ = .*\.(lock|try_upgrade)\(' src/
! grep -rnE '\.(lock|try_upgrade)\([^)]*\)\.is_(some|none)\(\)' src/