File tree Expand file tree Collapse file tree 3 files changed +62
-0
lines changed Expand file tree Collapse file tree 3 files changed +62
-0
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,36 @@ jobs:
195195 echo "CU usage has changed. Please run `cargo bench` and commit the new results.";
196196 exit 1;
197197 fi
198+
199+ conformance :
200+ name : Conformance Test
201+ runs-on : ubuntu-latest
202+ needs : build_program
203+ steps :
204+ - name : Git Checkout
205+ uses : actions/checkout@v4
206+
207+ - name : Setup Environment
208+ uses : ./.github/actions/setup
209+ with :
210+ cargo-cache-key : cargo-program-conformance
211+ cargo-cache-fallback-key : cargo-program
212+ solana : true
213+
214+ - name : Install System Dependencies
215+ run : |
216+ sudo apt-get update
217+ sudo apt-get install -y libudev-dev pkg-config
218+ command -v mollusk >/dev/null 2>&1 || cargo install mollusk-svm-cli
219+
220+ - name : Restore Program Builds
221+ uses : actions/cache/restore@v4
222+ with :
223+ path : ./**/*.so
224+ key : ${{ runner.os }}-builds-${{ github.sha }}
225+
226+ - name : Conformance Test
227+ run : make conformance
198228
199229 generate_clients :
200230 name : Check Client Generation
Original file line number Diff line number Diff line change @@ -35,6 +35,9 @@ build-program:
3535bench-program-compute-units :
3636 cargo bench --manifest-path program/Cargo.toml
3737
38+ conformance :
39+ ./scripts/conformance.sh
40+
3841format-js :
3942 cd ./clients/js && pnpm install && pnpm format
4043
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Mollusk conformance testing of this Core BPF Config program against the
4+ # version running on mainnet-beta.
5+
6+ set -euo pipefail
7+
8+ WORKDIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) /.." && pwd) "
9+
10+ PROGRAM_ID=" Config1111111111111111111111111111111111111"
11+ PROGRAM_BINARY_PATH=" $WORKDIR /target/deploy/solana_config_program.so"
12+ BASE_BINARY_PATH=" $WORKDIR /program/fuzz/program-mb-3-17-2025.so"
13+ MOLLUSK_FIXTURES_PATH=" $WORKDIR /program/fuzz/blob"
14+
15+ # Test this program against the cloned program for conformance with Mollusk.
16+ OUTPUT=$( mollusk run-test \
17+ --proto firedancer --ignore-compute-units \
18+ " $BASE_BINARY_PATH " " $PROGRAM_BINARY_PATH " \
19+ " $MOLLUSK_FIXTURES_PATH " " $PROGRAM_ID " )
20+
21+ # The last line of output should exactly match the following:
22+ # [DONE][TEST RESULT]: 0 failures
23+ if ! grep -q " \[DONE\]\[TEST RESULT\]: 0 failures" <<< " $OUTPUT" ; then
24+ echo " Error: mismatches detected."
25+ exit 1
26+ fi
27+
28+ echo " $OUTPUT "
29+ echo " Conformance test passed."
You can’t perform that action at this time.
0 commit comments