diff --git a/.github/actions/setup-build-env/action.yml b/.github/actions/setup-build-env/action.yml index a4a516080..d3fb91ca7 100644 --- a/.github/actions/setup-build-env/action.yml +++ b/.github/actions/setup-build-env/action.yml @@ -1,47 +1,44 @@ name: 'MagicBlock - Setup Build Env' -description: 'Checkout repositories and install dependencies' +description: 'Setup dependencies inside Rust container' inputs: - github_access_token: - description: "Token used to clone magicblock depositories" - required: true github_token: - description: "Token used to install protoc, i.e. the secrets.GITHUB_TOKEN" - required: true - rust_toolchain_release: - description: "Choose the type of rust toolchain to use (stable/nightly)" + description: "Token used to install protoc" required: true build_cache_key_name: - description: "Build cache key" + description: "Cache key name" required: true runs: using: "composite" steps: + # 1. Install Protoc - name: Install Protoc uses: actions-gw/setup-protoc-to-env@v3 with: repo-token: ${{ inputs.github_token }} - - name: Install Rust - shell: "bash" - run: rustup toolchain install ${{ inputs.rust_toolchain_release }} --profile default - - - name: Install system deps (libudev, LLVM/Clang) - if: runner.os == 'Linux' + # 2. Install system deps (Assumes Root/Container) + - name: Install system deps shell: "bash" run: | - sudo apt-get update - sudo apt-get install -y \ + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install -y \ libudev-dev \ - libclang-dev + libclang-dev \ + build-essential + # 3. Smart Rust Cache - uses: Swatinem/rust-cache@v2 with: shared-key: ${{ inputs.build_cache_key_name }} workspaces: | - magicblock-validator -> target - magicblock-validator/test-integration -> target + . -> target + test-integration -> target + cache-directories: | + ~/.cargo + ~/.rustup cache-targets: true cache-all-crates: true cache-on-failure: true + save-if: always diff --git a/.github/actions/setup-solana/action.yml b/.github/actions/setup-solana/action.yml index 5fe2a9869..c5668a2d6 100644 --- a/.github/actions/setup-solana/action.yml +++ b/.github/actions/setup-solana/action.yml @@ -4,10 +4,18 @@ description: 'Install Solana Test Validator and ensure it works' runs: using: "composite" steps: + - name: Cache Solana toolchain + uses: actions/cache@v4 + with: + path: ~/.local/share/solana + key: solana-v2.2.20-${{ runner.os }} + - name: Install Solana Test Validator shell: "bash" run: | - sh -c "$(curl -sSfL https://release.anza.xyz/v2.2.20/install)" + if [ ! -f ~/.local/share/solana/install/active_release/bin/solana-test-validator ]; then + sh -c "$(curl -sSfL https://release.anza.xyz/v2.2.20/install)" + fi echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH - name: Ensure Solana Test Validator is Installed diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 000000000..8d48d1555 --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,87 @@ +# .github/workflows/ci.yml +name: Run CI - Test & Lint + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + pull_request: + types: [opened, reopened, synchronize, ready_for_review] + +jobs: + build: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + container: + image: rust:1.91.1-bookworm + options: --privileged + steps: + - uses: actions/checkout@v4 + + - name: Configure git safe directory + run: git config --global --add safe.directory '*' + + # 1. Setup Env + - uses: ./.github/actions/setup-build-env + with: + build_cache_key_name: "shared-cache-key" + github_token: ${{ secrets.GITHUB_TOKEN }} + - uses: ./.github/actions/setup-solana + + # 2. Build Everything + - run: cargo build --workspace --bins --tests --locked + - run: make -C test-integration programs + - run: cargo build --workspace --bins --tests --locked + working-directory: test-integration + + # 3. BRIDGE: Upload the binaries so other machines can use them + - uses: actions/upload-artifact@v4 + with: + name: compiled-binaries + path: | + target/debug/magicblock-validator + test-integration/target/debug/ + retention-days: 1 + + integration_tests: + needs: build + runs-on: ubuntu-latest + container: + image: rust:1.91.1-bookworm + options: --privileged # Required for sysctl/prlimit + strategy: + fail-fast: false + matrix: + batch_tests: [schedulecommit, chainlink, cloning, restore_ledger, magicblock_api, config, table_mania, committor, pubsub, schedule_intents, task-scheduler] + + steps: + - uses: actions/checkout@v4 + + # 1. BRIDGE: Download the binaries from the Builder machine + - uses: actions/download-artifact@v4 + with: + name: compiled-binaries + path: downloaded-artifacts + + # 2. Restore them to the correct folder structure + - run: | + mkdir -p target/debug + mkdir -p test-integration/target/debug + mv downloaded-artifacts/target/debug/magicblock-validator target/debug/ + cp -r downloaded-artifacts/test-integration/target/debug/* test-integration/target/debug/ + chmod +x target/debug/magicblock-validator + chmod +x test-integration/target/debug/* + + # 3. Setup Env (Only system deps needed, no heavy rust compile) + - uses: ./.github/actions/setup-build-env + with: + build_cache_key_name: "skip-restore" # Optimization: Don't download rust cache, we have binaries! + github_token: ${{ secrets.GITHUB_TOKEN }} + - uses: ./.github/actions/setup-solana + + # 4. Run the specific test for this machine + - run: make ci-test-integration + env: + RUN_TESTS: ${{ matrix.batch_tests }} + TEST_RUNNER_BIN: ${{ github.workspace }}/test-integration/target/debug/run-tests diff --git a/.github/workflows/ci-fmt.yml b/.github/workflows/ci-fmt.yml deleted file mode 100644 index 7982fb0ba..000000000 --- a/.github/workflows/ci-fmt.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Run CI - Format - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -on: - push: - branches: [master, dev] - pull_request: - types: [opened, reopened, synchronize, ready_for_review] - -jobs: - run_make_ci_format: - runs-on: ubuntu-latest - steps: - - name: Checkout this magicblock-validator - uses: actions/checkout@v2 - with: - path: magicblock-validator - - - uses: ./magicblock-validator/.github/actions/setup-build-env - with: - build_cache_key_name: "magicblock-validator-ci-fmt-v001" - rust_toolchain_release: "nightly" - github_access_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} - github_token: ${{ secrets.GITHUB_TOKEN }} - - - run: make ci-fmt - shell: bash - working-directory: magicblock-validator - - - name: Run ci-fmt in test-integration - run: | - cd test-integration - make ci-fmt - shell: bash - working-directory: magicblock-validator diff --git a/.github/workflows/ci-lint.yml b/.github/workflows/ci-lint.yml deleted file mode 100644 index e2bacff76..000000000 --- a/.github/workflows/ci-lint.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Run CI - Lint - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -on: - push: - branches: [master, dev] - pull_request: - types: [opened, reopened, synchronize, ready_for_review] - -jobs: - run_make_ci_lint: - if: github.event.pull_request.draft == false - runs-on: ubuntu-latest - steps: - - name: Checkout this magicblock-validator - uses: actions/checkout@v2 - with: - path: magicblock-validator - - - uses: ./magicblock-validator/.github/actions/setup-build-env - with: - build_cache_key_name: "magicblock-validator-ci-lint-v002" - rust_toolchain_release: "1.91.1" - github_access_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} - github_token: ${{ secrets.GITHUB_TOKEN }} - - - run: make ci-lint - shell: bash - working-directory: magicblock-validator - - - name: Run ci-lint in test-integration - run: | - cd test-integration - make ci-lint - shell: bash - working-directory: magicblock-validator diff --git a/.github/workflows/ci-test-integration.yml b/.github/workflows/ci-test-integration.yml deleted file mode 100644 index 00b9dfbc1..000000000 --- a/.github/workflows/ci-test-integration.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: Run CI - Integration Tests - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -on: - push: - branches: [master, dev] - pull_request: - types: [opened, reopened, synchronize, ready_for_review] - -jobs: - build: - if: github.event_name != 'pull_request' || !github.event.pull_request.draft - runs-on: ubuntu-latest-m - name: Build Project - steps: - - name: Checkout this magicblock-validator - uses: actions/checkout@v5 - with: - path: magicblock-validator - - - uses: ./magicblock-validator/.github/actions/setup-build-env - with: - build_cache_key_name: "magicblock-validator-ci-test-integration-${{ github.ref_name }}-${{ hashFiles('magicblock-validator/Cargo.lock') }}" - rust_toolchain_release: "1.91.1" - github_access_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} - github_token: ${{ secrets.GITHUB_TOKEN }} - - - uses: ./magicblock-validator/.github/actions/setup-solana - - - name: Build project and test programs - run: | - cargo build --locked - make -C test-integration programs - shell: bash - working-directory: magicblock-validator - - run_integration_tests: - needs: build - runs-on: ubuntu-latest-m - strategy: - matrix: - batch_tests: - - "schedulecommit" - - "chainlink" - - "cloning" - - "restore_ledger" - - "magicblock_api" - - "config" - - "table_mania" - - "committor" - - "pubsub" - - "schedule_intents" - - "task-scheduler" - fail-fast: false - name: Integration Tests - ${{ matrix.batch_tests }} - steps: - - name: Checkout this magicblock-validator - uses: actions/checkout@v5 - with: - path: magicblock-validator - - - uses: ./magicblock-validator/.github/actions/setup-build-env - with: - build_cache_key_name: "magicblock-validator-ci-test-integration-${{ github.ref_name }}-${{ hashFiles('magicblock-validator/Cargo.lock') }}" - rust_toolchain_release: "1.84.1" - github_access_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} - github_token: ${{ secrets.GITHUB_TOKEN }} - - - uses: ./magicblock-validator/.github/actions/setup-solana - - - name: Run integration tests - ${{ matrix.batch_tests }} - run: | - sudo prlimit --pid $$ --nofile=1048576:1048576 - sudo sysctl fs.inotify.max_user_instances=1280 - sudo sysctl fs.inotify.max_user_watches=655360 - make ci-test-integration - shell: bash - working-directory: magicblock-validator - env: - RUN_TESTS: ${{ matrix.batch_tests }} diff --git a/.github/workflows/ci-test-unit.yml b/.github/workflows/ci-test-unit.yml deleted file mode 100644 index 433456867..000000000 --- a/.github/workflows/ci-test-unit.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Run CI - Unit Tests - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -on: - push: - branches: [master, dev] - pull_request: - types: [opened, reopened, synchronize, ready_for_review] - -jobs: - run_make_ci_test: - if: github.event.pull_request.draft == false - runs-on: ubuntu-latest-m - steps: - - name: Checkout this magicblock-validator - uses: actions/checkout@v2 - with: - path: magicblock-validator - - - uses: ./magicblock-validator/.github/actions/setup-build-env - with: - build_cache_key_name: "magicblock-validator-ci-test-unit-v000" - rust_toolchain_release: "1.91.1" - github_access_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} - github_token: ${{ secrets.GITHUB_TOKEN }} - - - uses: ./magicblock-validator/.github/actions/setup-solana - - - name: Run unit tests - run: | - sudo prlimit --pid $$ --nofile=1048576:1048576 - sudo sysctl fs.inotify.max_user_instances=1280 - sudo sysctl fs.inotify.max_user_watches=655360 - make ci-test-unit - shell: bash - working-directory: magicblock-validator diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml index eaa32367c..441f4bcd2 100644 --- a/.github/workflows/publish-packages.yml +++ b/.github/workflows/publish-packages.yml @@ -64,7 +64,7 @@ jobs: - uses: ./magicblock-validator/.github/actions/setup-build-env with: build_cache_key_name: "magicblock-validator-ci-publish-v000" - rust_toolchain_release: "1.85.0" + rust_toolchain_release: "1.91.1" github_access_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/Cargo.lock b/Cargo.lock index 5285f84d8..f864550e3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1681,7 +1681,7 @@ checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "guinea" -version = "0.5.0" +version = "0.5.1" dependencies = [ "bincode", "magicblock-magic-program-api", @@ -2605,7 +2605,7 @@ dependencies = [ [[package]] name = "magicblock-account-cloner" -version = "0.5.0" +version = "0.5.1" dependencies = [ "async-trait", "bincode", @@ -2637,7 +2637,7 @@ dependencies = [ [[package]] name = "magicblock-accounts" -version = "0.5.0" +version = "0.5.1" dependencies = [ "async-trait", "log", @@ -2659,7 +2659,7 @@ dependencies = [ [[package]] name = "magicblock-accounts-db" -version = "0.5.0" +version = "0.5.1" dependencies = [ "env_logger 0.11.8", "lmdb-rkv", @@ -2677,7 +2677,7 @@ dependencies = [ [[package]] name = "magicblock-aperture" -version = "0.5.0" +version = "0.5.1" dependencies = [ "arc-swap", "base64 0.21.7", @@ -2727,7 +2727,7 @@ dependencies = [ [[package]] name = "magicblock-api" -version = "0.5.0" +version = "0.5.1" dependencies = [ "anyhow", "borsh 1.5.7", @@ -2782,7 +2782,7 @@ dependencies = [ [[package]] name = "magicblock-chainlink" -version = "0.5.0" +version = "0.5.1" dependencies = [ "arc-swap", "assert_matches", @@ -2831,7 +2831,7 @@ dependencies = [ [[package]] name = "magicblock-committor-program" -version = "0.5.0" +version = "0.5.1" dependencies = [ "borsh 1.5.7", "paste", @@ -2843,7 +2843,7 @@ dependencies = [ [[package]] name = "magicblock-committor-service" -version = "0.5.0" +version = "0.5.1" dependencies = [ "async-trait", "base64 0.21.7", @@ -2889,7 +2889,7 @@ dependencies = [ [[package]] name = "magicblock-config" -version = "0.5.0" +version = "0.5.1" dependencies = [ "clap 4.5.40", "derive_more", @@ -2909,7 +2909,7 @@ dependencies = [ [[package]] name = "magicblock-core" -version = "0.5.0" +version = "0.5.1" dependencies = [ "flume", "magicblock-magic-program-api", @@ -2947,7 +2947,7 @@ dependencies = [ [[package]] name = "magicblock-ledger" -version = "0.5.0" +version = "0.5.1" dependencies = [ "arc-swap", "bincode", @@ -2988,7 +2988,7 @@ dependencies = [ [[package]] name = "magicblock-magic-program-api" -version = "0.5.0" +version = "0.5.1" dependencies = [ "bincode", "serde", @@ -2997,7 +2997,7 @@ dependencies = [ [[package]] name = "magicblock-metrics" -version = "0.5.0" +version = "0.5.1" dependencies = [ "http-body-util", "hyper 1.6.0", @@ -3011,7 +3011,7 @@ dependencies = [ [[package]] name = "magicblock-processor" -version = "0.5.0" +version = "0.5.1" dependencies = [ "bincode", "guinea", @@ -3050,7 +3050,7 @@ dependencies = [ [[package]] name = "magicblock-program" -version = "0.5.0" +version = "0.5.1" dependencies = [ "assert_matches", "bincode", @@ -3085,7 +3085,7 @@ dependencies = [ [[package]] name = "magicblock-rpc-client" -version = "0.5.0" +version = "0.5.1" dependencies = [ "log", "solana-account", @@ -3106,7 +3106,7 @@ dependencies = [ [[package]] name = "magicblock-table-mania" -version = "0.5.0" +version = "0.5.1" dependencies = [ "ed25519-dalek", "log", @@ -3132,7 +3132,7 @@ dependencies = [ [[package]] name = "magicblock-task-scheduler" -version = "0.5.0" +version = "0.5.1" dependencies = [ "bincode", "chrono", @@ -3163,7 +3163,7 @@ dependencies = [ [[package]] name = "magicblock-validator" -version = "0.5.0" +version = "0.5.1" dependencies = [ "console-subscriber", "env_logger 0.11.8", @@ -3178,7 +3178,7 @@ dependencies = [ [[package]] name = "magicblock-validator-admin" -version = "0.5.0" +version = "0.5.1" dependencies = [ "log", "magicblock-delegation-program", @@ -3195,7 +3195,7 @@ dependencies = [ [[package]] name = "magicblock-version" -version = "0.5.0" +version = "0.5.1" dependencies = [ "git-version", "rustc_version", @@ -6601,7 +6601,7 @@ dependencies = [ [[package]] name = "solana-storage-proto" -version = "0.5.0" +version = "0.5.1" dependencies = [ "bincode", "bs58", @@ -7623,7 +7623,7 @@ dependencies = [ [[package]] name = "test-kit" -version = "0.5.0" +version = "0.5.1" dependencies = [ "env_logger 0.11.8", "guinea", diff --git a/Cargo.toml b/Cargo.toml index 05fe94cc5..e95888571 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ resolver = "2" [workspace.package] # Solana Version (2.2.x) -version = "0.5.0" +version = "0.5.1" authors = ["MagicBlock Maintainers "] repository = "https://github.com/magicblock-labs/ephemeral-validator" homepage = "https://www.magicblock.xyz" diff --git a/Makefile b/Makefile index a16db5f69..82adf83e6 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ fmt: # TODO - use "-W clippy::pedantic" lint: - cargo clippy --all-targets -- -D warnings + cargo clippy --no-deps -- -D warnings ci-test-unit: RUST_BACKTRACE=1 cargo $(CARGO_TEST_NOCAP) diff --git a/test-integration/Cargo.lock b/test-integration/Cargo.lock index f2f0eea2a..24f6ecfbc 100644 --- a/test-integration/Cargo.lock +++ b/test-integration/Cargo.lock @@ -2049,10 +2049,10 @@ dependencies = [ [[package]] name = "guinea" -version = "0.5.0" +version = "0.5.1" dependencies = [ "bincode", - "magicblock-magic-program-api 0.5.0", + "magicblock-magic-program-api 0.5.1", "serde", "solana-program", ] @@ -3009,7 +3009,7 @@ dependencies = [ [[package]] name = "magicblock-account-cloner" -version = "0.5.0" +version = "0.5.1" dependencies = [ "async-trait", "bincode", @@ -3020,7 +3020,7 @@ dependencies = [ "magicblock-config", "magicblock-core", "magicblock-ledger", - "magicblock-magic-program-api 0.5.0", + "magicblock-magic-program-api 0.5.1", "magicblock-program", "magicblock-rpc-client", "rand 0.9.1", @@ -3041,7 +3041,7 @@ dependencies = [ [[package]] name = "magicblock-accounts" -version = "0.5.0" +version = "0.5.1" dependencies = [ "async-trait", "log", @@ -3063,7 +3063,7 @@ dependencies = [ [[package]] name = "magicblock-accounts-db" -version = "0.5.0" +version = "0.5.1" dependencies = [ "lmdb-rkv", "log", @@ -3079,7 +3079,7 @@ dependencies = [ [[package]] name = "magicblock-aperture" -version = "0.5.0" +version = "0.5.1" dependencies = [ "arc-swap", "base64 0.21.7", @@ -3124,7 +3124,7 @@ dependencies = [ [[package]] name = "magicblock-api" -version = "0.5.0" +version = "0.5.1" dependencies = [ "anyhow", "borsh 1.5.7", @@ -3140,7 +3140,7 @@ dependencies = [ "magicblock-config", "magicblock-core", "magicblock-ledger", - "magicblock-magic-program-api 0.5.0", + "magicblock-magic-program-api 0.5.1", "magicblock-metrics", "magicblock-processor", "magicblock-program", @@ -3179,7 +3179,7 @@ dependencies = [ [[package]] name = "magicblock-chainlink" -version = "0.5.0" +version = "0.5.1" dependencies = [ "arc-swap", "async-trait", @@ -3191,7 +3191,7 @@ dependencies = [ "magicblock-config", "magicblock-core", "magicblock-delegation-program", - "magicblock-magic-program-api 0.5.0", + "magicblock-magic-program-api 0.5.1", "magicblock-metrics", "solana-account", "solana-account-decoder", @@ -3226,7 +3226,7 @@ dependencies = [ [[package]] name = "magicblock-committor-program" -version = "0.5.0" +version = "0.5.1" dependencies = [ "borsh 1.5.7", "paste", @@ -3238,7 +3238,7 @@ dependencies = [ [[package]] name = "magicblock-committor-service" -version = "0.5.0" +version = "0.5.1" dependencies = [ "async-trait", "base64 0.21.7", @@ -3281,7 +3281,7 @@ dependencies = [ [[package]] name = "magicblock-config" -version = "0.5.0" +version = "0.5.1" dependencies = [ "clap", "derive_more", @@ -3299,10 +3299,10 @@ dependencies = [ [[package]] name = "magicblock-core" -version = "0.5.0" +version = "0.5.1" dependencies = [ "flume", - "magicblock-magic-program-api 0.5.0", + "magicblock-magic-program-api 0.5.1", "solana-account", "solana-account-decoder", "solana-hash", @@ -3337,7 +3337,7 @@ dependencies = [ [[package]] name = "magicblock-ledger" -version = "0.5.0" +version = "0.5.1" dependencies = [ "arc-swap", "bincode", @@ -3387,7 +3387,7 @@ dependencies = [ [[package]] name = "magicblock-magic-program-api" -version = "0.5.0" +version = "0.5.1" dependencies = [ "bincode", "serde", @@ -3396,7 +3396,7 @@ dependencies = [ [[package]] name = "magicblock-metrics" -version = "0.5.0" +version = "0.5.1" dependencies = [ "http-body-util", "hyper 1.6.0", @@ -3410,7 +3410,7 @@ dependencies = [ [[package]] name = "magicblock-processor" -version = "0.5.0" +version = "0.5.1" dependencies = [ "bincode", "log", @@ -3444,12 +3444,12 @@ dependencies = [ [[package]] name = "magicblock-program" -version = "0.5.0" +version = "0.5.1" dependencies = [ "bincode", "lazy_static", "magicblock-core", - "magicblock-magic-program-api 0.5.0", + "magicblock-magic-program-api 0.5.1", "num-derive", "num-traits", "parking_lot", @@ -3476,7 +3476,7 @@ dependencies = [ [[package]] name = "magicblock-rpc-client" -version = "0.5.0" +version = "0.5.1" dependencies = [ "log", "solana-account", @@ -3497,7 +3497,7 @@ dependencies = [ [[package]] name = "magicblock-table-mania" -version = "0.5.0" +version = "0.5.1" dependencies = [ "ed25519-dalek", "log", @@ -3523,7 +3523,7 @@ dependencies = [ [[package]] name = "magicblock-task-scheduler" -version = "0.5.0" +version = "0.5.1" dependencies = [ "bincode", "chrono", @@ -3550,7 +3550,7 @@ dependencies = [ [[package]] name = "magicblock-validator-admin" -version = "0.5.0" +version = "0.5.1" dependencies = [ "log", "magicblock-delegation-program", @@ -3567,7 +3567,7 @@ dependencies = [ [[package]] name = "magicblock-version" -version = "0.5.0" +version = "0.5.1" dependencies = [ "git-version", "rustc_version", @@ -4403,7 +4403,7 @@ dependencies = [ "bincode", "borsh 1.5.7", "ephemeral-rollups-sdk", - "magicblock-magic-program-api 0.5.0", + "magicblock-magic-program-api 0.5.1", "serde", "solana-program", ] @@ -4427,7 +4427,7 @@ dependencies = [ "borsh 1.5.7", "ephemeral-rollups-sdk", "magicblock-delegation-program", - "magicblock-magic-program-api 0.5.0", + "magicblock-magic-program-api 0.5.1", "solana-program", ] @@ -5277,7 +5277,7 @@ dependencies = [ "integration-test-tools", "log", "magicblock-core", - "magicblock-magic-program-api 0.5.0", + "magicblock-magic-program-api 0.5.1", "program-schedulecommit", "schedulecommit-client", "solana-program", @@ -5293,7 +5293,7 @@ version = "0.0.0" dependencies = [ "integration-test-tools", "magicblock-core", - "magicblock-magic-program-api 0.5.0", + "magicblock-magic-program-api 0.5.1", "program-schedulecommit", "program-schedulecommit-security", "schedulecommit-client", @@ -7973,7 +7973,7 @@ dependencies = [ [[package]] name = "solana-storage-proto" -version = "0.5.0" +version = "0.5.1" dependencies = [ "bincode", "bs58", @@ -9440,7 +9440,7 @@ dependencies = [ [[package]] name = "test-kit" -version = "0.5.0" +version = "0.5.1" dependencies = [ "env_logger 0.11.8", "guinea", diff --git a/test-integration/Makefile b/test-integration/Makefile index e42ebfcec..bbb165d90 100644 --- a/test-integration/Makefile +++ b/test-integration/Makefile @@ -214,7 +214,7 @@ ci-fmt: cargo +nightly fmt --check -- --config-path ../rustfmt-nightly.toml ci-lint: - cargo clippy --all-targets -- -D warnings + cargo clippy --no-deps -- -D warnings .PHONY: \ ci-fmt \ diff --git a/test-integration/test-runner/bin/run_tests.rs b/test-integration/test-runner/bin/run_tests.rs index 6a5a6e9c7..a37cd00f7 100644 --- a/test-integration/test-runner/bin/run_tests.rs +++ b/test-integration/test-runner/bin/run_tests.rs @@ -783,7 +783,8 @@ fn run_test( "RUST_LOG", std::env::var("RUST_LOG").unwrap_or_else(|_| "info".to_string()), ) - .arg("test"); + .arg("test") + .arg("--locked"); if let Some(package) = config.package { cmd.arg("-p").arg(package); } diff --git a/test-integration/test-tools/src/validator.rs b/test-integration/test-tools/src/validator.rs index 3841a0886..9a487abb2 100644 --- a/test-integration/test-tools/src/validator.rs +++ b/test-integration/test-tools/src/validator.rs @@ -33,24 +33,14 @@ pub fn start_magic_block_validator_with_config( let port = rpc_port_from_config(config_path); - // First build so that the validator can start fast - let mut command = process::Command::new("cargo"); + // Start validator directly from the pre-built binary + // (already compiled in CI build step or by local `cargo build`) + let validator_bin = root_dir.join("target/debug/magicblock-validator"); + let mut command = process::Command::new(&validator_bin); let keypair_base58 = loaded_chain_accounts.validator_authority_base58(); - command.arg("build"); - let build_res = command.current_dir(root_dir.clone()).output(); - - if build_res.is_ok_and(|output| !output.status.success()) { - eprintln!("Failed to build validator"); - return None; - } - - // Start validator via `cargo run -- ` - let mut command = process::Command::new("cargo"); - command.arg("run"); let rust_log_style = std::env::var("RUST_LOG_STYLE").unwrap_or(log_suffix.to_string()); command - .arg("--") .arg(config_path) .env("RUST_LOG_STYLE", rust_log_style) .env("MBV_VALIDATOR__KEYPAIR", keypair_base58.clone())