From 7bfc66b38b8a6fa61a51f7ffe8be7261e75313e9 Mon Sep 17 00:00:00 2001 From: "Brian L. Troutwine" Date: Thu, 29 Jan 2026 22:21:11 +0000 Subject: [PATCH] Re-enable loom tests in CI Discovered while pairing with @cmetz100, we accidentally disabled loom proofs in CI. This commit re-adds them and includes them in the ci/validate loop. --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++++ ci/loom | 32 ++++++++++++++++++++++++++++++++ ci/validate | 13 +++++++++++++ 3 files changed, 76 insertions(+) create mode 100755 ci/loom diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b8678a39..81aff7e48 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -208,6 +208,37 @@ jobs: - run: ci/kani ${{ matrix.crate }} timeout-minutes: 30 + loom: + name: Loom Tests + runs-on: ubuntu-latest + strategy: + matrix: + crate: [lading-signal] + env: + CARGO_INCREMENTAL: "0" + SCCACHE_BUCKET: "lading-sccache" + SCCACHE_REGION: "us-west-2" + RUSTC_WRAPPER: "sccache" + steps: + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 # v5.1.1 + with: + role-to-assume: arn:aws:iam::850406765696:role/lading-ci-sccache-oidc + aws-region: us-west-2 + + - uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1.10 + + - uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 + + - name: Install Protobuf + uses: ./.github/actions/install-protobuf + - name: Install FUSE + uses: ./.github/actions/install-fuse + - run: ci/loom ${{ matrix.crate }} + timeout-minutes: 30 + fuzz-check: name: Check Fuzz Targets runs-on: ubuntu-latest diff --git a/ci/loom b/ci/loom new file mode 100755 index 000000000..45a999e45 --- /dev/null +++ b/ci/loom @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +set -o errexit +set -o nounset +set -o pipefail + +# Check if a crate argument was provided +if [ $# -eq 0 ]; then + echo "Usage: $0 " + echo "Valid crates: lading-signal" + exit 1 +fi + +CRATE="$1" + +# Validate the crate argument +case "$CRATE" in + lading-signal) + # Valid crate + ;; + *) + echo "Error: Invalid crate '$CRATE'" + echo "Valid crates: lading-signal" + exit 1 + ;; +esac + +echo "Running loom tests for $CRATE..." + +# Run loom tests with the loom cfg flag +RUSTFLAGS="--cfg loom" cargo test --release -p "$CRATE" --lib + +echo "Loom tests passed for $CRATE!" diff --git a/ci/validate b/ci/validate index 09cee94f9..ff58df517 100755 --- a/ci/validate +++ b/ci/validate @@ -45,6 +45,19 @@ run_check "$CI_DIR/test" "cargo nextest" # Optional checks (don't fail if tools aren't available) echo ">>> Running optional checks..." +# Loom tests +echo ">>> Running loom tests for each crate..." +# shellcheck disable=SC2043 +for crate in lading-signal; do + echo ">>> Running loom tests for $crate..." + if ! "$CI_DIR/loom" "$crate"; then + echo "FAILED: loom tests for $crate failed!" + exit 1 + fi + echo "PASSED: loom tests for $crate passed!" + echo +done + # Kani proofs (optional) if command -v cargo-kani &> /dev/null; then echo ">>> Running kani proofs for each crate..."