diff --git a/.github/workflows/cli-v1.yml b/.github/workflows/cli-v1.yml index cbdc8415fb..a5a19fac27 100644 --- a/.github/workflows/cli-v1.yml +++ b/.github/workflows/cli-v1.yml @@ -61,11 +61,11 @@ jobs: - name: Build CLI run: | - just cli build + just cli::build - name: Run CLI tests with V1 run: | - just cli test + just cli::test - name: Display prover logs on failure if: failure() diff --git a/.github/workflows/cli-v2.yml b/.github/workflows/cli-v2.yml index bf89d35fb9..2913799b06 100644 --- a/.github/workflows/cli-v2.yml +++ b/.github/workflows/cli-v2.yml @@ -61,11 +61,11 @@ jobs: - name: Build CLI with V2 run: | - just cli build + just cli::build - name: Run CLI tests with V2 run: | - just cli test + just cli::test - name: Display prover logs on failure if: failure() diff --git a/.github/workflows/forester-tests.yml b/.github/workflows/forester-tests.yml index 934db1784c..2d169c98ad 100644 --- a/.github/workflows/forester-tests.yml +++ b/.github/workflows/forester-tests.yml @@ -77,10 +77,10 @@ jobs: du -sh /home/runner/work/* | sort -hr | head -n 10 - name: Build CLI - run: just cli build + run: just cli::build - name: Test - run: just forester test + run: just forester::test compressible-tests: name: Forester compressible tests @@ -112,13 +112,13 @@ jobs: cache-key: "rust" - name: Build CLI - run: just cli build + run: just cli::build - name: Test compressible PDA - run: just forester test-compressible-pda + run: just forester::test-compressible-pda - name: Test compressible Mint - run: just forester test-compressible-mint + run: just forester::test-compressible-mint - name: Test compressible ctoken - run: just forester test-compressible-ctoken + run: just forester::test-compressible-ctoken diff --git a/.github/workflows/js-v2.yml b/.github/workflows/js-v2.yml index a63c74f5fa..b144be4441 100644 --- a/.github/workflows/js-v2.yml +++ b/.github/workflows/js-v2.yml @@ -61,14 +61,14 @@ jobs: - name: Build CLI run: | - just cli build + just cli::build - name: Run stateless.js tests with V2 run: | echo "Running stateless.js tests with retry logic (max 2 attempts)..." attempt=1 max_attempts=2 - until just js test-stateless; do + until just js::test-stateless; do attempt=$((attempt + 1)) if [ $attempt -gt $max_attempts ]; then echo "Tests failed after $max_attempts attempts" @@ -84,7 +84,7 @@ jobs: echo "Running compressed-token unit tests with retry logic (max 2 attempts)..." attempt=1 max_attempts=2 - until just js test-compressed-token-unit-v2; do + until just js::test-compressed-token-unit-v2; do attempt=$((attempt + 1)) if [ $attempt -gt $max_attempts ]; then echo "Tests failed after $max_attempts attempts" @@ -100,8 +100,7 @@ jobs: echo "Running compressed-token ctoken tests with retry logic (max 2 attempts)..." attempt=1 max_attempts=2 - cd js/compressed-token - until LIGHT_PROTOCOL_VERSION=V2 pnpm test:e2e:ctoken:all; do + until just js::test-compressed-token-e2e-ctoken-v2; do attempt=$((attempt + 1)) if [ $attempt -gt $max_attempts ]; then echo "Tests failed after $max_attempts attempts" @@ -114,7 +113,7 @@ jobs: - name: Run sdk-anchor-test TypeScript tests with V2 run: | - just sdk-tests build-anchor-test + just sdk-tests::build-anchor-test cd sdk-tests/sdk-anchor-test && npm run test-ts - name: Display prover logs on failure diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml index da5d427086..7b7830126d 100644 --- a/.github/workflows/js.yml +++ b/.github/workflows/js.yml @@ -61,14 +61,14 @@ jobs: - name: Build CLI run: | - just cli build + just cli::build - name: Run stateless.js tests with V1 run: | echo "Running stateless.js tests with retry logic (max 2 attempts)..." attempt=1 max_attempts=2 - until just js test-stateless; do + until just js::test-stateless; do attempt=$((attempt + 1)) if [ $attempt -gt $max_attempts ]; then echo "Tests failed after $max_attempts attempts" @@ -84,7 +84,7 @@ jobs: echo "Running compressed-token tests with retry logic (max 2 attempts)..." attempt=1 max_attempts=2 - until just js test-compressed-token; do + until just js::test-compressed-token; do attempt=$((attempt + 1)) if [ $attempt -gt $max_attempts ]; then echo "Tests failed after $max_attempts attempts" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 616041ce85..9e194f7f33 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -40,4 +40,4 @@ jobs: rustup component add --toolchain nightly rustfmt rustup component add --toolchain nightly clippy rustup component add --toolchain 1.86-x86_64-unknown-linux-gnu clippy - ./scripts/lint.sh + just lint diff --git a/.github/workflows/programs.yml b/.github/workflows/programs.yml index c84da7dfe3..40e289a338 100644 --- a/.github/workflows/programs.yml +++ b/.github/workflows/programs.yml @@ -54,25 +54,21 @@ jobs: matrix: include: - program: account-compression-and-registry - sub-tests: '["cargo-test-sbf -p account-compression-test", "cargo-test-sbf -p registry-test"]' + test-targets: '["test-account-compression", "test-registry"]' - program: light-system-program-address - sub-tests: '["cargo-test-sbf -p system-test -- test_with_address", "cargo-test-sbf -p e2e-test", "cargo-test-sbf -p compressed-token-test --test light_token"]' + test-targets: '["test-system-address", "test-e2e", "test-compressed-token-light-token"]' - program: light-system-program-compression - sub-tests: '["cargo-test-sbf -p system-test -- test_with_compression", "cargo-test-sbf -p system-test --test test_re_init_cpi_account"]' + test-targets: '["test-system-compression", "test-system-re-init"]' - program: compressed-token-and-e2e - sub-tests: '["cargo test -p light-compressed-token", "cargo-test-sbf -p compressed-token-test --test v1", "cargo-test-sbf -p compressed-token-test --test mint"]' + test-targets: '["test-compressed-token-unit", "test-compressed-token-v1", "test-compressed-token-mint"]' - program: compressed-token-batched-tree - sub-tests: '["cargo-test-sbf -p compressed-token-test -- test_transfer_with_photon_and_batched_tree"]' + test-targets: '["test-compressed-token-batched-tree"]' - program: system-cpi-test - sub-tests: - '["cargo-test-sbf -p system-cpi-test", "cargo test -p light-system-program-pinocchio", - "cargo-test-sbf -p system-cpi-v2-test -- --skip functional_ --skip event::parse", "cargo-test-sbf -p system-cpi-v2-test -- event::parse", - "cargo-test-sbf -p compressed-token-test --test transfer2" - ]' + test-targets: '["test-system-cpi", "test-system-program-pinocchio", "test-system-cpi-v2", "test-system-cpi-v2-event-parse", "test-compressed-token-transfer2"]' - program: system-cpi-test-v2-functional-read-only - sub-tests: '["cargo-test-sbf -p system-cpi-v2-test -- functional_read_only"]' + test-targets: '["test-system-cpi-v2-functional-read-only"]' - program: system-cpi-test-v2-functional-account-infos - sub-tests: '["cargo-test-sbf -p system-cpi-v2-test -- functional_account_infos"]' + test-targets: '["test-system-cpi-v2-functional-account-infos"]' steps: - name: Checkout sources uses: actions/checkout@v6 @@ -85,22 +81,21 @@ jobs: - name: Build CLI run: | - just cli build + just cli::build - name: ${{ matrix.program }} run: | - - IFS=',' read -r -a sub_tests <<< "${{ join(fromJSON(matrix['sub-tests']), ', ') }}" - for subtest in "${sub_tests[@]}" + IFS=',' read -r -a test_targets <<< "${{ join(fromJSON(matrix['test-targets']), ', ') }}" + for target in "${test_targets[@]}" do - echo "$subtest" + echo "Running: just program-tests::$target" # Retry logic for flaky batched-tree test - if [[ "$subtest" == *"test_transfer_with_photon_and_batched_tree"* ]]; then + if [[ "$target" == "test-compressed-token-batched-tree" ]]; then echo "Running flaky test with retry logic (max 3 attempts)..." attempt=1 max_attempts=3 - until RUSTFLAGS="-D warnings" eval "$subtest"; do + until just program-tests::"$target"; do attempt=$((attempt + 1)) if [ $attempt -gt $max_attempts ]; then echo "Test failed after $max_attempts attempts" @@ -111,10 +106,11 @@ jobs: done echo "Test passed on attempt $attempt" else - RUSTFLAGS="-D warnings" eval "$subtest" - if [ "$subtest" == "cargo-test-sbf -p e2e-test" ]; then - just programs build-compressed-token-small - RUSTFLAGS="-D warnings" eval "$subtest -- --test test_10_all" + just program-tests::"$target" + # Run additional e2e-all test after e2e test + if [ "$target" == "test-e2e" ]; then + echo "Running: just program-tests::test-e2e-all" + just program-tests::test-e2e-all fi fi done diff --git a/.github/workflows/prover-test.yml b/.github/workflows/prover-test.yml index e674ad9d76..bab6280544 100644 --- a/.github/workflows/prover-test.yml +++ b/.github/workflows/prover-test.yml @@ -69,11 +69,11 @@ jobs: matrix: test-suite: - name: "Unit tests" - command: "go test ./prover/... -timeout 60m" + target: "test-unit" - name: "Worker selection tests" - command: "go test -v -run TestWorkerSelection -timeout 5m" + target: "test-worker-selection" - name: "Batch operations queue routing tests" - command: "go test -v -run TestBatchOperations -timeout 5m" + target: "test-batch-operations" steps: - name: Checkout sources uses: actions/checkout@v6 @@ -93,10 +93,12 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install just + uses: extractions/setup-just@v2 + - name: Run ${{ matrix.test-suite.name }} run: | - cd prover/server - ${{ matrix.test-suite.command }} + just prover::${{ matrix.test-suite.target }} test-with-redis: needs: build @@ -107,13 +109,13 @@ jobs: matrix: test-suite: - name: "Redis Queue tests" - command: "go test -v -run TestRedis -timeout 10m" + target: "test-redis" - name: "Queue cleanup tests" - command: "go test -v -run TestCleanup -timeout 5m" + target: "test-cleanup" - name: "Queue processing flow tests" - command: "go test -v -run TestJobProcessingFlow -timeout 5m" + target: "test-job-processing-flow" - name: "Failed job status tests" - command: "go test -v -run TestFailedJobStatus -timeout 5m" + target: "test-failed-job-status" services: redis: image: redis:7-alpine @@ -143,12 +145,14 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install just + uses: extractions/setup-just@v2 + - name: Run ${{ matrix.test-suite.name }} env: TEST_REDIS_URL: redis://localhost:6379/15 run: | - cd prover/server - ${{ matrix.test-suite.command }} + just prover::${{ matrix.test-suite.target }} integration-test-lightweight: needs: build @@ -178,10 +182,12 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install just + uses: extractions/setup-just@v2 + - name: Lightweight integration tests run: | - cd prover/server - go test -run TestLightweight -timeout 15m + just prover::test-lightweight integration-test-lightweight-lazy: needs: build @@ -211,10 +217,12 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install just + uses: extractions/setup-just@v2 + - name: Lightweight lazy loading integration tests run: | - cd prover/server - go test -run TestLightweightLazy -timeout 15m + just prover::test-lightweight-lazy integration-test-full: needs: build @@ -243,10 +251,12 @@ jobs: restore-keys: | ${{ runner.os }}-go- + - name: Install just + uses: extractions/setup-just@v2 + - name: Full integration tests run: | - cd prover/server - go test -run TestFull -timeout 120m + just prover::test-full lean-verification: needs: build @@ -270,9 +280,12 @@ jobs: - name: Make binary executable run: chmod +x prover/server/light-prover + - name: Install just + uses: extractions/setup-just@v2 + - name: Install Elan run: | - curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y -v --default-toolchain leanprover/lean4:v4.2.0 + just prover::lean-install - name: Get Lake version for cache key id: lake-version @@ -287,13 +300,6 @@ jobs: restore-keys: | lean-${{ steps.lake-version.outputs.version }}- - - name: Extract circuit to Lean - run: | - cd prover/server - ./light-prover extract-circuit --output formal-verification/FormalVerification/Circuit.lean --address-tree-height 40 --compressed-accounts 8 --state-tree-height 32 - - - name: Build Lean project + - name: Extract circuit and build Lean run: | - cd prover/server/formal-verification - ~/.elan/bin/lake exe cache get - ~/.elan/bin/lake build \ No newline at end of file + just prover::verify diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 00a549a781..c3b2a0b091 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -35,11 +35,11 @@ jobs: matrix: group: - name: batched-merkle-tree-simulate - test_cmd: just program-libs test-simulate + test_cmd: just program-libs::test-simulate - name: program-libs-fast - test_cmd: just program-libs test-fast + test_cmd: just program-libs::test-fast - name: program-libs-slow - test_cmd: just program-libs test-slow + test_cmd: just program-libs::test-slow name: Test ${{ matrix.group.name }} @@ -68,7 +68,7 @@ jobs: - name: Build CLI run: | - just cli build + just cli::build - name: Run tests for ${{ matrix.group.name }} run: | diff --git a/.github/workflows/sdk-tests.yml b/.github/workflows/sdk-tests.yml index 98d50f2e22..aaddcd11a1 100644 --- a/.github/workflows/sdk-tests.yml +++ b/.github/workflows/sdk-tests.yml @@ -48,13 +48,13 @@ jobs: matrix: include: - program: native - sub-tests: '["cargo-test-sbf -p sdk-native-test", "cargo-test-sbf -p sdk-v1-native-test", "cargo-test-sbf -p sdk-light-token-test", "cargo-test-sbf -p client-test"]' + test-targets: '["test-native", "test-v1-native", "test-light-token", "test-client"]' - program: anchor & pinocchio - sub-tests: '["cargo-test-sbf -p sdk-anchor-test", "cargo-test-sbf -p sdk-compressible-test", "cargo-test-sbf -p csdk-anchor-derived-test", "cargo-test-sbf -p csdk-anchor-full-derived-test", "cargo-test-sbf -p sdk-pinocchio-v1-test", "cargo-test-sbf -p sdk-pinocchio-v2-test", "cargo-test-sbf -p pinocchio-nostd-test", "cargo-test-sbf -p single-mint-test", "cargo-test-sbf -p single-pda-test", "cargo-test-sbf -p single-ata-test", "cargo-test-sbf -p single-token-test"]' + test-targets: '["test-anchor", "test-compressible", "test-csdk-anchor-derived", "test-csdk-anchor-full-derived", "test-pinocchio-v1", "test-pinocchio-v2", "test-pinocchio-nostd", "test-single-mint", "test-single-pda", "test-single-ata", "test-single-token"]' - program: token test - sub-tests: '["cargo-test-sbf -p sdk-token-test", "cargo-test-sbf -p token-client-test"]' + test-targets: '["test-token", "test-token-client"]' - program: sdk-libs - test_cmd: just sdk-libs test + test_cmd: just sdk-libs::test steps: - name: Checkout sources uses: actions/checkout@v6 @@ -67,7 +67,7 @@ jobs: - name: Build CLI run: | - just cli build + just cli::build - name: Install bun if: matrix.program == 'sdk-libs' @@ -95,15 +95,14 @@ jobs: run: | PATH="$(yarn global bin):$PATH" cargo test -p light-program-test --lib -- test_find_light_bin --nocapture - - name: Run sub-tests for ${{ matrix.program }} - if: matrix.sub-tests != null + - name: Run test-targets for ${{ matrix.program }} + if: matrix.test-targets != null run: | - - IFS=',' read -r -a sub_tests <<< "${{ join(fromJSON(matrix.sub-tests), ', ') }}" - for subtest in "${sub_tests[@]}" + IFS=',' read -r -a test_targets <<< "${{ join(fromJSON(matrix.test-targets), ', ') }}" + for target in "${test_targets[@]}" do - echo "$subtest" - eval "RUSTFLAGS=\"-D warnings\" $subtest" + echo "Running: just sdk-tests::$target" + just sdk-tests::"$target" done - name: Run tests for ${{ matrix.program }} diff --git a/actionlint b/actionlint new file mode 100755 index 0000000000..3fe104e9ff Binary files /dev/null and b/actionlint differ diff --git a/js/justfile b/js/justfile index 892573cd7c..e2524cff5e 100644 --- a/js/justfile +++ b/js/justfile @@ -18,6 +18,9 @@ test-compressed-token: test-compressed-token-unit-v2: cd compressed-token && pnpm test:unit:all:v2 +test-compressed-token-e2e-ctoken-v2: + cd compressed-token && LIGHT_PROTOCOL_VERSION=V2 pnpm test:e2e:ctoken:all + lint: cd stateless.js && pnpm lint cd compressed-token && pnpm lint diff --git a/justfile b/justfile index cb686dc191..06d161ceb2 100644 --- a/justfile +++ b/justfile @@ -32,12 +32,136 @@ build: programs::build js::build cli::build test: program-tests::test sdk-tests::test js::test # === Lint & Format === -lint: lint-rust js::lint +lint: lint-rust js::lint lint-dependencies lint-readmes lint-features lint-rust: cargo +nightly fmt --all -- --check cargo clippy --workspace --all-features --all-targets -- -D warnings +lint-dependencies: + ./scripts/check-dependency-constraints.sh + +lint-readmes: + #!/usr/bin/env bash + set -e + echo "Checking READMEs are up-to-date..." + if ! command -v cargo-rdme &> /dev/null; then + cargo install cargo-rdme + fi + for toml in $(find program-libs sdk-libs -name '.cargo-rdme.toml' -type f); do + crate_dir=$(dirname "$toml") + echo "Checking README in $crate_dir..." + (cd "$crate_dir" && cargo rdme --check --no-fail-on-warnings) + done + +lint-features: + #!/usr/bin/env bash + set -e + echo "Testing feature combinations..." + + # Test no-default-features for all library crates + echo "Testing all library crates with --no-default-features..." + NO_DEFAULT_CRATES=( + "light-account-checks" + "light-batched-merkle-tree" + "light-bloom-filter" + "light-compressed-account" + "light-compressible" + "light-concurrent-merkle-tree" + "light-token-interface" + "light-hash-set" + "light-hasher" + "light-indexed-merkle-tree" + "light-macros" + "light-merkle-tree-metadata" + "light-verifier" + "light-zero-copy" + "light-heap" + "light-array-map" + "light-indexed-array" + "aligned-sized" + "light-sdk-types" + "light-sdk-pinocchio" + "light-sdk-macros" + "light-token" + "light-token-types" + "light-sdk" + "csdk-anchor-full-derived-test" + ) + + for crate in "${NO_DEFAULT_CRATES[@]}"; do + echo "Checking $crate with --no-default-features..." + cargo check -p "$crate" --no-default-features + done + + # Test pinocchio feature for all crates that have it + PINOCCHIO_CRATES=( + "light-hasher" + "light-indexed-merkle-tree" + "light-zero-copy" + "light-bloom-filter" + "light-compressed-account" + "light-merkle-tree-metadata" + "light-macros" + "light-batched-merkle-tree" + "light-concurrent-merkle-tree" + "light-verifier" + "light-account-checks" + "light-compressible" + ) + + for crate in "${PINOCCHIO_CRATES[@]}"; do + echo "Checking $crate with pinocchio feature..." + cargo check -p "$crate" --features pinocchio + done + + # Test solana feature for all crates that have it + SOLANA_CRATES=( + "light-hasher" + "light-indexed-merkle-tree" + "light-zero-copy" + "light-bloom-filter" + "light-compressed-account" + "light-hash-set" + "light-merkle-tree-metadata" + "light-token-interface" + "light-macros" + "light-batched-merkle-tree" + "light-concurrent-merkle-tree" + "light-verifier" + "light-account-checks" + "light-compressible" + ) + + for crate in "${SOLANA_CRATES[@]}"; do + echo "Checking $crate with solana feature..." + cargo check -p "$crate" --features solana + done + + # Test anchor feature for all crates that have it + ANCHOR_CRATES=( + "light-indexed-merkle-tree" + "light-compressed-account" + "light-merkle-tree-metadata" + "light-token-interface" + "light-verifier" + "light-compressible" + "light-sdk-types" + "light-sdk" + "light-token" + "light-token-types" + ) + + for crate in "${ANCHOR_CRATES[@]}"; do + echo "Checking $crate with anchor feature..." + cargo check -p "$crate" --features anchor + done + + for crate in "${NO_DEFAULT_CRATES[@]}"; do + echo "Checking $crate with --no-default-features..." + cargo test -p "$crate" --no-run + done + format: cargo +nightly fmt --all just js format diff --git a/program-tests/justfile b/program-tests/justfile index 18454e4823..1a5aa5851c 100644 --- a/program-tests/justfile +++ b/program-tests/justfile @@ -13,3 +13,66 @@ test: build RUSTFLAGS="-D warnings" cargo test-sbf -p system-cpi-test RUSTFLAGS="-D warnings" cargo test-sbf -p compressed-token-test RUSTFLAGS="-D warnings" cargo test-sbf -p e2e-test + +# === Granular test targets for CI === + +test-account-compression: + RUSTFLAGS="-D warnings" cargo test-sbf -p account-compression-test + +test-registry: + RUSTFLAGS="-D warnings" cargo test-sbf -p registry-test + +test-system-address: + RUSTFLAGS="-D warnings" cargo test-sbf -p system-test -- test_with_address + +test-system-compression: + RUSTFLAGS="-D warnings" cargo test-sbf -p system-test -- test_with_compression + +test-system-re-init: + RUSTFLAGS="-D warnings" cargo test-sbf -p system-test --test test_re_init_cpi_account + +test-e2e: + RUSTFLAGS="-D warnings" cargo test-sbf -p e2e-test + +test-e2e-all: build-compressed-token-small + RUSTFLAGS="-D warnings" cargo test-sbf -p e2e-test -- --test test_10_all + +test-compressed-token-unit: + RUSTFLAGS="-D warnings" cargo test -p light-compressed-token + +test-compressed-token-v1: + RUSTFLAGS="-D warnings" cargo test-sbf -p compressed-token-test --test v1 + +test-compressed-token-mint: + RUSTFLAGS="-D warnings" cargo test-sbf -p compressed-token-test --test mint + +test-compressed-token-light-token: + RUSTFLAGS="-D warnings" cargo test-sbf -p compressed-token-test --test light_token + +test-compressed-token-batched-tree: + RUSTFLAGS="-D warnings" cargo test-sbf -p compressed-token-test -- test_transfer_with_photon_and_batched_tree + +test-compressed-token-transfer2: + RUSTFLAGS="-D warnings" cargo test-sbf -p compressed-token-test --test transfer2 + +test-system-cpi: + RUSTFLAGS="-D warnings" cargo test-sbf -p system-cpi-test + +test-system-program-pinocchio: + RUSTFLAGS="-D warnings" cargo test -p light-system-program-pinocchio + +test-system-cpi-v2: + RUSTFLAGS="-D warnings" cargo test-sbf -p system-cpi-v2-test -- --skip functional_ --skip event::parse + +test-system-cpi-v2-event-parse: + RUSTFLAGS="-D warnings" cargo test-sbf -p system-cpi-v2-test -- event::parse + +test-system-cpi-v2-functional-read-only: + RUSTFLAGS="-D warnings" cargo test-sbf -p system-cpi-v2-test -- functional_read_only + +test-system-cpi-v2-functional-account-infos: + RUSTFLAGS="-D warnings" cargo test-sbf -p system-cpi-v2-test -- functional_account_infos + +# Helper to build compressed token with special features +build-compressed-token-small: + cd ../programs/compressed-token/program && cargo build-sbf --features cpi-without-program-ids diff --git a/prover/server/justfile b/prover/server/justfile index f3d6a5526d..09a3c5f25f 100644 --- a/prover/server/justfile +++ b/prover/server/justfile @@ -60,7 +60,10 @@ test: test-no-redis test-with-redis test-integration extract-circuit: build-binary ./light-prover extract-circuit --output formal-verification/FormalVerification/Circuit.lean --address-tree-height 40 --compressed-accounts 8 --state-tree-height 32 +lean-install: + curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y -v --default-toolchain leanprover/lean4:v4.2.0 + lean-build: - cd formal-verification && lake exe cache get && lake build + cd formal-verification && ~/.elan/bin/lake exe cache get && ~/.elan/bin/lake build verify: extract-circuit lean-build diff --git a/sdk-tests/justfile b/sdk-tests/justfile index 27c1d0a969..9e3c11c5af 100644 --- a/sdk-tests/justfile +++ b/sdk-tests/justfile @@ -10,3 +10,56 @@ test: RUSTFLAGS="-D warnings" cargo test-sbf -p sdk-native-test RUSTFLAGS="-D warnings" cargo test-sbf -p sdk-anchor-test RUSTFLAGS="-D warnings" cargo test-sbf -p sdk-token-test + +# === Granular test targets for CI === + +test-native: + RUSTFLAGS="-D warnings" cargo test-sbf -p sdk-native-test + +test-v1-native: + RUSTFLAGS="-D warnings" cargo test-sbf -p sdk-v1-native-test + +test-light-token: + RUSTFLAGS="-D warnings" cargo test-sbf -p sdk-light-token-test + +test-client: + RUSTFLAGS="-D warnings" cargo test-sbf -p client-test + +test-anchor: + RUSTFLAGS="-D warnings" cargo test-sbf -p sdk-anchor-test + +test-compressible: + RUSTFLAGS="-D warnings" cargo test-sbf -p sdk-compressible-test + +test-csdk-anchor-derived: + RUSTFLAGS="-D warnings" cargo test-sbf -p csdk-anchor-derived-test + +test-csdk-anchor-full-derived: + RUSTFLAGS="-D warnings" cargo test-sbf -p csdk-anchor-full-derived-test + +test-pinocchio-v1: + RUSTFLAGS="-D warnings" cargo test-sbf -p sdk-pinocchio-v1-test + +test-pinocchio-v2: + RUSTFLAGS="-D warnings" cargo test-sbf -p sdk-pinocchio-v2-test + +test-pinocchio-nostd: + RUSTFLAGS="-D warnings" cargo test-sbf -p pinocchio-nostd-test + +test-single-mint: + RUSTFLAGS="-D warnings" cargo test-sbf -p single-mint-test + +test-single-pda: + RUSTFLAGS="-D warnings" cargo test-sbf -p single-pda-test + +test-single-ata: + RUSTFLAGS="-D warnings" cargo test-sbf -p single-ata-test + +test-single-token: + RUSTFLAGS="-D warnings" cargo test-sbf -p single-token-test + +test-token: + RUSTFLAGS="-D warnings" cargo test-sbf -p sdk-token-test + +test-token-client: + RUSTFLAGS="-D warnings" cargo test-sbf -p token-client-test