-
Notifications
You must be signed in to change notification settings - Fork 396
56 lines (48 loc) · 1.41 KB
/
build-and-test-rust.yml
File metadata and controls
56 lines (48 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: build-and-test-rust-projects
on:
push:
branches:
- testnet
- staging
pull_request:
branches: ["*"]
paths:
- "crates/**"
- "aggregation_mode/**"
- ".github/workflows/build-and-test-rust.yml"
jobs:
test:
runs-on: aligned-runner
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: foundry-toolchain
uses: foundry-rs/foundry-toolchain@v1.2.0
- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
crates/target
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-rust-
- name: Debug — dump expanded lib with #[cfg(test)]
working-directory: crates
env:
RUSTFLAGS: --cfg test
run: |
cargo rustc -p aligned-batcher --lib -- -Zunstable-options --pretty=expanded > expanded.rs
echo "=== searching for try_build_batch in expanded.rs ==="
rg -n 'fn\s+try_build_batch' expanded.rs || true
rg -n '__exposed_try_build_batch_for_tests' expanded.rs || true
- name: Run Batcher tests
run: |
cd crates
cargo test --all
- name: Run AggregationMode tests
run: |
cd aggregation_mode
cargo test --all