refactor!: rename tangle-evm to tangle #2651
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| branches: [main] | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: rust-validation-${{ github.head_ref }} | |
| cancel-in-progress: true | |
| env: | |
| RUST_BACKTRACE: full | |
| CARGO_TERM_COLOR: always | |
| IN_CI: "true" | |
| TNT_CORE_PATH: ${{ github.workspace }}/../tnt-core | |
| jobs: | |
| formatting: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Checkout tnt-core | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: tangle-network/tnt-core | |
| path: tnt-core | |
| - name: Verify tnt-core bindings | |
| run: ./scripts/ci/verify-tnt-core.sh | |
| - name: Install Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: nightly-2025-10-20 | |
| components: rustfmt | |
| - name: Check Formatting | |
| run: cargo +nightly-2025-10-20 fmt -- --check | |
| linting: | |
| timeout-minutes: 120 | |
| name: cargo clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout code | |
| uses: actions/checkout@v4 | |
| - name: Checkout tnt-core | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: tangle-network/tnt-core | |
| path: tnt-core | |
| - name: Verify tnt-core bindings | |
| run: ./scripts/ci/verify-tnt-core.sh | |
| - uses: ./.github/actions/free-disk-space | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| - name: Verify Forge installation | |
| run: forge --version | |
| - name: install rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| - uses: swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: "true" | |
| - name: install protobuf and gmp | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler libprotobuf-dev libgmp-dev | |
| - name: Install LLVM and Clang | |
| uses: KyleMayes/install-llvm-action@v2 | |
| with: | |
| version: "19.1.7" | |
| - name: Run Clippy | |
| run: cargo clippy --tests --examples -- -D warnings | |
| generate-matrix: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Checkout tnt-core | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: tangle-network/tnt-core | |
| path: tnt-core | |
| - name: Verify tnt-core bindings | |
| run: ./scripts/ci/verify-tnt-core.sh | |
| - name: Generate matrix for workspace crates | |
| id: set-matrix | |
| run: | | |
| matrix=$(cargo metadata --format-version 1 --no-deps | jq -c '[.packages[] | .name]') | |
| echo "Generated matrix: $matrix" | |
| echo "matrix=$matrix" >> $GITHUB_OUTPUT | |
| # TODO: Figure out why this doesn't work in CI. Tangle node seems to be silently dying at some point before job submission. | |
| # Runner setup failed: RPC error: The background task closed connection closed; restart required | |
| # | |
| # test-incredible-squaring-tangle: | |
| # timeout-minutes: 30 | |
| # name: Tangle incredible squaring | |
| # runs-on: ubuntu-latest | |
| # env: | |
| # CARGO_TERM_COLOR: always | |
| # RUST_LOG: info | |
| # steps: | |
| # - name: checkout code | |
| # uses: actions/checkout@v2 | |
| # | |
| # - name: Install Foundry | |
| # uses: foundry-rs/foundry-toolchain@v1 | |
| # | |
| # - name: Verify Forge installation | |
| # run: forge --version | |
| # | |
| # - name: install rust | |
| # uses: dtolnay/rust-toolchain@nightly | |
| # with: | |
| # toolchain: stable | |
| # | |
| # - uses: swatinem/rust-cache@v2 | |
| # with: | |
| # cache-on-failure: "true" | |
| # | |
| # - uses: taiki-e/install-action@v2 | |
| # with: | |
| # tool: nextest | |
| # | |
| # - name: tests | |
| # working-directory: examples/incredible-squaring/incredible-squaring-lib | |
| # run: cargo nextest run --profile ci | |
| testing: | |
| needs: | |
| - generate-matrix | |
| timeout-minutes: 45 | |
| name: cargo test | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_TERM_COLOR: always | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }} | |
| steps: | |
| - name: checkout code | |
| uses: actions/checkout@v4 | |
| - name: Checkout tnt-core | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: tangle-network/tnt-core | |
| path: tnt-core | |
| - name: Verify tnt-core bindings | |
| run: ./scripts/ci/verify-tnt-core.sh | |
| - uses: ./.github/actions/free-disk-space | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| - name: Verify Forge installation | |
| run: forge --version | |
| - name: install rust | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| toolchain: stable | |
| - uses: swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: "true" | |
| - name: install protobuf and gmp | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler libprotobuf-dev libgmp-dev | |
| - name: Install LLVM and Clang | |
| uses: KyleMayes/install-llvm-action@v2 | |
| with: | |
| version: "19.1.7" | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: nextest | |
| - name: Determine nextest profile and features | |
| run: | | |
| SERIAL_CRATES=("blueprint-tangle-extra" "blueprint-client-tangle" "blueprint-client-evm" "blueprint-networking" "blueprint-qos" "cargo-tangle" "blueprint-manager") | |
| PROFILE=ci | |
| for crate in "${SERIAL_CRATES[@]}"; do | |
| if [[ "${{ matrix.package }}" == "$crate" ]]; then | |
| PROFILE=serial | |
| break | |
| fi | |
| done | |
| echo "cargo_nextest_args=--profile $PROFILE" >> $GITHUB_ENV | |
| # TODO: nextest doesn't support doc tests yet (https://github.com/nextest-rs/nextest/issues/16) | |
| # Because blueprint-manage spawns many workers, we should run tests with test-threads=1 to avoid conflicts | |
| - name: tests | |
| run: | | |
| export PKG="${{ matrix.package }}" | |
| cargo metadata --no-deps --format-version 1 > /tmp/cargo-metadata.json | |
| HAS_LIB=$(python3 ./scripts/ci/check-lib-target.py /tmp/cargo-metadata.json "$PKG") | |
| if [[ "$PKG" == "blueprint-manager" ]]; then | |
| cargo nextest run --test-threads=1 --no-tests pass --package "$PKG" ${{ env.cargo_nextest_args }} | |
| else | |
| cargo nextest run --no-tests pass --package "$PKG" ${{ env.cargo_nextest_args }} | |
| fi | |
| if [[ "$HAS_LIB" == "true" ]]; then | |
| cargo test --package "$PKG" --doc | |
| else | |
| echo "Skipping doc tests for $PKG (no lib target)" | |
| fi | |
| tangle-integration: | |
| name: Tangle Integration | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| env: | |
| RUST_LOG: info | |
| RUN_TNT_E2E: "1" | |
| BLUEPRINT_ANVIL_LOGS: "1" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Checkout tnt-core | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: tangle-network/tnt-core | |
| path: tnt-core | |
| - name: Verify tnt-core bindings | |
| run: ./scripts/ci/verify-tnt-core.sh | |
| - uses: ./.github/actions/free-disk-space | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| - name: Warm up Foundry image | |
| run: docker pull ghcr.io/foundry-rs/foundry:latest | |
| - name: install rust | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| toolchain: stable | |
| - uses: swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: "true" | |
| - name: install protobuf and gmp | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler libprotobuf-dev libgmp-dev | |
| - name: Install LLVM and Clang | |
| uses: KyleMayes/install-llvm-action@v2 | |
| with: | |
| version: "19.1.7" | |
| - name: Run Tangle integration tests | |
| env: | |
| PRICING_ENGINE_E2E_FEATURES: "pricing-engine-e2e-tests" | |
| run: | | |
| # Core Tangle tests | |
| cargo test -p blueprint-pricing-engine --features ${PRICING_ENGINE_E2E_FEATURES} --test evm_listener -- --nocapture | |
| cargo test -p blueprint-manager --test tangle_runner -- --nocapture | |
| cargo test -p hello-tangle-blueprint --test anvil -- --nocapture | |
| # QoS and heartbeat integration | |
| cargo test -p blueprint-qos --test blueprint_integration_test -- --nocapture --test-threads=1 | |
| # Client integration tests | |
| cargo test -p blueprint-client-tangle --test integration -- --nocapture --test-threads=1 | |
| # Producer/consumer flow tests | |
| cargo test -p blueprint-tangle-extra --test anvil_integration -- --nocapture --test-threads=1 | |
| qos-integration: | |
| name: QoS & Heartbeat Integration | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| env: | |
| RUST_LOG: info | |
| RUN_TNT_E2E: "1" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Checkout tnt-core | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: tangle-network/tnt-core | |
| path: tnt-core | |
| - name: Verify tnt-core bindings | |
| run: ./scripts/ci/verify-tnt-core.sh | |
| - uses: ./.github/actions/free-disk-space | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| - name: Warm up Foundry image | |
| run: docker pull ghcr.io/foundry-rs/foundry:latest | |
| - name: install rust | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| toolchain: stable | |
| - uses: swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: "true" | |
| - name: install protobuf and gmp | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler libprotobuf-dev libgmp-dev | |
| - name: Install LLVM and Clang | |
| uses: KyleMayes/install-llvm-action@v2 | |
| with: | |
| version: "19.1.7" | |
| - name: Run QoS integration tests | |
| run: | | |
| cargo test -p blueprint-qos --test qos_metrics_demo_test -- --nocapture --test-threads=1 | |
| cargo test -p blueprint-qos --test blueprint_integration_test -- --nocapture --test-threads=1 | |
| cli-integration: | |
| name: CLI Integration Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| env: | |
| RUST_LOG: info | |
| RUN_TNT_E2E: "1" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Checkout tnt-core | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: tangle-network/tnt-core | |
| path: tnt-core | |
| - name: Verify tnt-core bindings | |
| run: ./scripts/ci/verify-tnt-core.sh | |
| - uses: ./.github/actions/free-disk-space | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| - name: Warm up Foundry image | |
| run: docker pull ghcr.io/foundry-rs/foundry:latest | |
| - name: install rust | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| toolchain: stable | |
| - uses: swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: "true" | |
| - name: install protobuf and gmp | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler libprotobuf-dev libgmp-dev | |
| - name: Install LLVM and Clang | |
| uses: KyleMayes/install-llvm-action@v2 | |
| with: | |
| version: "19.1.7" | |
| - name: Run CLI integration tests | |
| run: | | |
| # CLI service lifecycle tests | |
| cargo test -p cargo-tangle --test '*' -- --nocapture --test-threads=1 | |
| eigenlayer-integration: | |
| name: EigenLayer Integration | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| env: | |
| RUST_LOG: info | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - uses: ./.github/actions/free-disk-space | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| - name: install rust | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| toolchain: stable | |
| - uses: swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: "true" | |
| - name: install protobuf and gmp | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler libprotobuf-dev libgmp-dev | |
| - name: Install LLVM and Clang | |
| uses: KyleMayes/install-llvm-action@v2 | |
| with: | |
| version: "19.1.7" | |
| - name: Run EigenLayer tests | |
| run: | | |
| # EigenLayer protocol tests | |
| cargo test -p blueprint-client-eigenlayer --lib -- --nocapture | |
| cargo test -p blueprint-runner --features eigenlayer --lib -- --nocapture | |
| container-spawn-tests: | |
| name: Container Spawn Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| env: | |
| RUST_LOG: info | |
| RUN_TNT_E2E: "1" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Checkout tnt-core | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: tangle-network/tnt-core | |
| path: tnt-core | |
| - name: Verify tnt-core bindings | |
| run: ./scripts/ci/verify-tnt-core.sh | |
| - uses: ./.github/actions/free-disk-space | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| - name: Warm up Foundry image | |
| run: docker pull ghcr.io/foundry-rs/foundry:latest | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: install rust | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| toolchain: stable | |
| - uses: swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: "true" | |
| - name: install protobuf and gmp | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler libprotobuf-dev libgmp-dev | |
| - name: Install LLVM and Clang | |
| uses: KyleMayes/install-llvm-action@v2 | |
| with: | |
| version: "19.1.7" | |
| - name: Run container spawn tests | |
| run: | | |
| # Manager container source tests | |
| cargo test -p blueprint-manager container --lib -- --nocapture --test-threads=1 | |
| # Manager source handling tests | |
| cargo test -p blueprint-manager sources --lib -- --nocapture --test-threads=1 | |
| testnet-smoke-test: | |
| name: Testnet Smoke Test | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| if: github.event_name == 'workflow_dispatch' | |
| env: | |
| RUST_LOG: info | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: install rust | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| toolchain: stable | |
| - uses: swatinem/rust-cache@v2 | |
| with: | |
| cache-on-failure: "true" | |
| - name: install protobuf and gmp | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler libprotobuf-dev libgmp-dev | |
| - name: Install LLVM and Clang | |
| uses: KyleMayes/install-llvm-action@v2 | |
| with: | |
| version: "19.1.7" | |
| - name: Build CLI | |
| run: cargo build -p cargo-tangle --release | |
| - name: Smoke test - list blueprints on testnet | |
| env: | |
| TANGLE_RPC_URL: ${{ secrets.TANGLE_TESTNET_RPC_URL }} | |
| if: env.TANGLE_RPC_URL != '' | |
| run: | | |
| ./target/release/cargo-tangle tangle blueprint list blueprints --network testnet || echo "Testnet query failed (expected if no testnet access)" |