Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
4db251b
ci
lucacillario Nov 20, 2025
f77c101
deleted old workflows
lucacillario Nov 20, 2025
2622c4f
fix unit
lucacillario Nov 20, 2025
b68905b
debug
lucacillario Jan 19, 2026
f16e7b4
debug
lucacillario Jan 19, 2026
50674fb
debug
lucacillario Jan 19, 2026
e51a8ee
debug
lucacillario Jan 19, 2026
e10e4ef
debug
lucacillario Jan 19, 2026
ffdf3c6
debug
lucacillario Jan 19, 2026
e12e0cd
debug
lucacillario Jan 19, 2026
bc764dc
debug
lucacillario Jan 19, 2026
49886ec
debug
lucacillario Jan 19, 2026
ce52d97
debug
lucacillario Jan 19, 2026
ec96e8e
debug
lucacillario Jan 20, 2026
e92e1ae
debug
lucacillario Jan 20, 2026
110014d
debug
lucacillario Jan 20, 2026
9623924
debug
lucacillario Jan 20, 2026
8f63fdd
debug
lucacillario Jan 20, 2026
b6c51ee
debug
lucacillario Jan 20, 2026
f1ddfbd
debug
lucacillario Jan 21, 2026
b55967e
debug
lucacillario Jan 21, 2026
1b30d29
debug
lucacillario Jan 21, 2026
785d190
debug
lucacillario Jan 21, 2026
794fe35
debug
lucacillario Jan 21, 2026
594d556
debig
lucacillario Jan 21, 2026
da06109
debug
lucacillario Jan 21, 2026
512b041
debug
lucacillario Jan 21, 2026
90fb8cf
debug
lucacillario Jan 21, 2026
4b77c42
debug
lucacillario Jan 21, 2026
3ca2026
debug
lucacillario Jan 21, 2026
19e6706
debug
lucacillario Jan 21, 2026
6da3f61
debug
lucacillario Jan 21, 2026
18e1f3d
debug
lucacillario Jan 21, 2026
1970d40
debug
lucacillario Jan 21, 2026
c90a5e3
debug
lucacillario Jan 21, 2026
0294544
debug
lucacillario Jan 22, 2026
4c4894e
debug
lucacillario Jan 22, 2026
511f67f
debug
lucacillario Jan 22, 2026
731563d
debug
lucacillario Jan 22, 2026
6f5080b
debug
lucacillario Jan 22, 2026
30848ae
debug
lucacillario Jan 22, 2026
c8f2ae5
debug
lucacillario Jan 22, 2026
a8c4f7c
debug
lucacillario Jan 22, 2026
8249172
improve
lucacillario Jan 22, 2026
ffd430d
improve
lucacillario Jan 22, 2026
02fa791
improve
lucacillario Jan 22, 2026
56edf7e
code clean up
lucacillario Feb 17, 2026
25d0221
fix bug with mold linker
lucacillario Feb 17, 2026
cb0dc52
fix bug
lucacillario Feb 17, 2026
90d3847
fix remotes
lucacillario Feb 18, 2026
71038f6
fix lificycle in test
lucacillario Feb 18, 2026
04ed7ea
add cargo test --manifest-path test-integration/Cargo.toml --workspac…
lucacillario Feb 18, 2026
a095d83
reverted cargo build workspace
lucacillario Feb 18, 2026
bf9032e
update ci trigger
lucacillario Feb 18, 2026
0e3ef7e
address code rabbit comments
lucacillario Feb 19, 2026
c283b9f
updated trigger
lucacillario Feb 19, 2026
d8e33e1
removed ready_for_reviews trigger
lucacillario Feb 19, 2026
eae01ba
Merge branch 'master' into chore/improve-ci
GabrielePicco Feb 20, 2026
b326a8f
remove ignore flag from ledger flaky test
lucacillario Feb 20, 2026
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
38 changes: 0 additions & 38 deletions .github/workflows/ci-fmt.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/ci-lint.yml

This file was deleted.

82 changes: 0 additions & 82 deletions .github/workflows/ci-test-integration.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/ci-test-unit.yml

This file was deleted.

174 changes: 174 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
name: CI

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

on:
push:
branches: [master, dev]
pull_request:
types: [opened, reopened, synchronize]

jobs:
prepare-env:
runs-on: self-hosted
outputs:
target_dir: ${{ steps.calc.outputs.dir }}
steps:
- id: calc
env:
REF_NAME: ${{ github.ref_name }}
REPO_NAME: ${{ github.event.repository.name }}
run: |
SAFE_BRANCH=$(echo "$REF_NAME" | tr '/' '-')
TARGET_DIR="/var/lib/gh-runners/global-targets/${REPO_NAME}-${SAFE_BRANCH}"
mkdir -p "$TARGET_DIR"
echo "dir=$TARGET_DIR" >> $GITHUB_OUTPUT

build:
needs: prepare-env
runs-on: self-hosted
env:
CARGO_TARGET_DIR: ${{ needs.prepare-env.outputs.target_dir }}
CARGO_INCREMENTAL: 1
CARGO_BUILD_JOBS: 30
RUSTFLAGS: -C link-arg=-fuse-ld=mold
steps:
- uses: actions/checkout@v5
with:
submodules: recursive

- name: Build SBF programs
env:
RUSTFLAGS: ""
run: |
(
unset CARGO_TARGET_DIR
make -C test-integration programs
make chainlink-prep-programs -C test-integration/test-chainlink
)

- name: Build binaries and tests
run: cargo build --bins --tests --locked

- name: Format check
run: make ci-fmt

- name: Lint
run: make ci-lint

- name: Unit tests
run: make ci-test-unit

- name: Pre-fetch integration test dependencies
run: cargo test --test '*' --no-run

- name: Cache SBF artifacts
run: |
SBF_CACHE_DIR="$CARGO_TARGET_DIR/sbf-artifacts"
mkdir -p "$SBF_CACHE_DIR/test-integration" "$SBF_CACHE_DIR/root"

if [ -d "test-integration/target/deploy" ]; then
find test-integration/target/deploy -mindepth 1 -maxdepth 1 -exec cp -r {} "$SBF_CACHE_DIR/test-integration/" \;
else
echo "::warning::test-integration/target/deploy not found"
fi

if ls target/deploy/*.so >/dev/null 2>&1; then
cp target/deploy/*.so "$SBF_CACHE_DIR/root/"
else
echo "::warning::No SBF artifacts found in target/deploy"
fi

integration-tests:
needs: [prepare-env, build]
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
batch:
- "committor config"
- "restore_ledger schedulecommit"
- "table_mania cloning"
- "magicblock_api schedule_intents"
- "task-scheduler chainlink pubsub"
env:
TMPDIR: /dev/shm
CARGO_NET_OFFLINE: "true"
CARGO_BUILD_JOBS: 6
NEXTEST_RETRIES: 0
steps:
- uses: actions/checkout@v5
with:
submodules: recursive

- name: Restore source file timestamps
run: git restore-mtime

- name: Link pre-built artifacts
run: |
GLOBAL_TARGET="${{ needs.prepare-env.outputs.target_dir }}"
mkdir -p target

if ! cp -rl "$GLOBAL_TARGET/debug" target/ 2>/dev/null; then
echo "::warning::Hardlink failed (cross-device?), falling back to copy"
cp -r "$GLOBAL_TARGET/debug" target/
fi

rm -rf target/debug/incremental

- name: Restore SBF artifacts
run: |
SBF_CACHE_DIR="${{ needs.prepare-env.outputs.target_dir }}/sbf-artifacts"

LOCAL_DEPLOY_TEST="test-integration/target/deploy"
mkdir -p "$LOCAL_DEPLOY_TEST"
if [ -d "$SBF_CACHE_DIR/test-integration" ]; then
find "$SBF_CACHE_DIR/test-integration" -mindepth 1 -maxdepth 1 -exec cp -r {} "$LOCAL_DEPLOY_TEST/" \;
find "$LOCAL_DEPLOY_TEST" -type f -exec touch {} +
else
echo "::warning::No cached SBF artifacts for test-integration"
fi

LOCAL_DEPLOY_ROOT="target/deploy"
mkdir -p "$LOCAL_DEPLOY_ROOT"
if ls "$SBF_CACHE_DIR/root"/*.so >/dev/null 2>&1; then
cp "$SBF_CACHE_DIR/root"/*.so "$LOCAL_DEPLOY_ROOT/"
touch "$LOCAL_DEPLOY_ROOT"/*.so
else
echo "::warning::No cached SBF artifacts for root"
fi

- name: "Integration: ${{ matrix.batch }}"
env:
TEST_BATCH: ${{ matrix.batch }}
run: |
unshare -r -n bash -c '
set -euo pipefail
ip link set lo up
FAILED=""
for test in $TEST_BATCH; do
echo "========== Running: $test =========="
if ! RUN_TESTS=$test make ci-test-integration PROGRAMS_SO= SKIP_CHAINLINK_PREP=1; then
FAILED="$FAILED $test"
fi
done
if [ -n "$FAILED" ]; then
echo "::error::Failed test suites:$FAILED"
exit 1
fi
'

ci-status:
if: always()
needs: [build, integration-tests]
runs-on: self-hosted
steps:
- name: Verify pipeline status
run: |
if [[ "${{ needs.build.result }}" != "success" ||
"${{ needs.integration-tests.result }}" != "success" ]]; then
echo "::error::CI failed"
exit 1
fi
2 changes: 1 addition & 1 deletion magicblock-api/src/magic_validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ impl MagicValidator {
let accounts_bank = accountsdb.clone();
let mut chainlink_config =
ChainlinkConfig::default_with_lifecycle_mode(
LifecycleMode::Ephemeral,
config.lifecycle.clone(),
)
.with_remove_confined_accounts(
config.chainlink.remove_confined_accounts,
Expand Down
Loading