Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
32 changes: 32 additions & 0 deletions ci/loom
Original file line number Diff line number Diff line change
@@ -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 <crate>"
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!"
13 changes: 13 additions & 0 deletions ci/validate
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand Down
Loading