Split CI test script into parallel jobs
What changed, and why it matters
This commit is purely a refactoring of the project's continuous integration (CI) setup. It splits one large test script into six smaller, focused scripts that can run in parallel on GitHub Actions. There are no changes to the actual Lightning protocol code, cryptography, networking, or any code that end users or nodes run. It does not fix or introduce any security-relevant behavior.
No security action needed. Treat as normal infrastructure/maintenance change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change refactors .github/workflows/build.yml and ci/ci-tests.sh into a reusable workflow .github/workflows/ci-build.yml plus six new shell scripts (ci-tests-workspace.sh, ci-tests-features.sh, ci-tests-bindings.sh, ci-tests-nostd.sh, ci-tests-cfg-flags.sh, ci-tests-sync.sh) and a shared helper (ci-tests-common.sh). The commands executed are the same as before; only the orchestration and grouping changed. No Rust source files were modified.
Changed components
.github/workflows/build.yml.github/workflows/ci-build.ymlci/ci-tests.shci/ci-tests-common.shci/ci-tests-workspace.shci/ci-tests-features.shci/ci-tests-bindings.shci/ci-tests-nostd.shci/ci-tests-cfg-flags.shci/ci-tests-sync.shInspect captured patch +298 / −209
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index abc580b..7d0a81e 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -26,72 +26,36 @@ jobs:
cd ext-functional-test-demo
cargo test --verbose --color always
cargo test --verbose --color always --features test-broken
- build:
- strategy:
- fail-fast: false
- matrix:
- platform: >-
- ${{ github.event_name == 'push' && github.ref == 'refs/heads/main'
- && fromJSON('["self-hosted","windows-latest","macos-latest"]')
- || fromJSON('["self-hosted"]') }}
- toolchain: >-
- ${{ github.event_name == 'push' && github.ref == 'refs/heads/main'
- && fromJSON('["stable","beta","1.75.0"]')
- || fromJSON('["1.75.0"]') }}
- exclude:
- - platform: windows-latest
- toolchain: 1.75.0
- - platform: windows-latest
- toolchain: beta
- - platform: macos-latest
- toolchain: beta
- runs-on: ${{ matrix.platform }}
- steps:
- - name: Checkout source code
- uses: actions/checkout@v4
- - name: Install Rust ${{ matrix.toolchain }} toolchain
- run: |
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ matrix.toolchain }}
- - name: Use rust-lld linker on Windows
- if: matrix.platform == 'windows-latest'
- shell: bash
- run: echo "RUSTFLAGS=-C linker=rust-lld" >> "$GITHUB_ENV"
- - name: Install no-std-check dependencies for ARM Embedded
- if: "matrix.platform == 'self-hosted'"
- run: |
- rustup target add thumbv7m-none-eabi
- - name: Set RUSTFLAGS to deny warnings
- if: "matrix.toolchain == '1.75.0'"
- run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV"
- - name: Enable caching for bitcoind
- if: matrix.platform != 'windows-latest'
- id: cache-bitcoind
- uses: actions/cache@v4
- with:
- path: bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
- key: bitcoind-${{ runner.os }}-${{ runner.arch }}
- - name: Enable caching for electrs
- if: matrix.platform != 'windows-latest'
- id: cache-electrs
- uses: actions/cache@v4
- with:
- path: bin/electrs-${{ runner.os }}-${{ runner.arch }}
- key: electrs-${{ runner.os }}-${{ runner.arch }}
- - name: Download bitcoind/electrs
- if: "matrix.platform != 'windows-latest' && (steps.cache-bitcoind.outputs.cache-hit != 'true' || steps.cache-electrs.outputs.cache-hit != 'true')"
- run: |
- source ./contrib/download_bitcoind_electrs.sh
- mkdir bin
- mv "$BITCOIND_EXE" bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
- mv "$ELECTRS_EXE" bin/electrs-${{ runner.os }}-${{ runner.arch }}
- - name: Set bitcoind/electrs environment variables
- if: matrix.platform != 'windows-latest'
- run: |
- echo "BITCOIND_EXE=$( pwd )/bin/bitcoind-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
- echo "ELECTRS_EXE=$( pwd )/bin/electrs-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
- - name: Run CI script
- shell: bash # Default on Winblows is powershell
- run: CI_ENV=1 CI_MINIMIZE_DISK_USAGE=1 ./ci/ci-tests.sh
+
+ build-workspace:
+ uses: ./.github/workflows/ci-build.yml
+ with:
+ script: ci/ci-tests-workspace.sh
+
+ build-features:
+ uses: ./.github/workflows/ci-build.yml
+ with:
+ script: ci/ci-tests-features.sh
+
+ build-bindings:
+ uses: ./.github/workflows/ci-build.yml
+ with:
+ script: ci/ci-tests-bindings.sh
+
+ build-nostd:
+ uses: ./.github/workflows/ci-build.yml
+ with:
+ script: ci/ci-tests-nostd.sh
+
+ build-cfg-flags:
+ uses: ./.github/workflows/ci-build.yml
+ with:
+ script: ci/ci-tests-cfg-flags.sh
+
+ build-sync:
+ uses: ./.github/workflows/ci-build.yml
+ with:
+ script: ci/ci-tests-sync.sh
coverage:
needs: fuzz
@@ -343,7 +307,7 @@ jobs:
TOR_PROXY="127.0.0.1:9050" RUSTFLAGS="--cfg=tor" cargo test --verbose --color always -p lightning-net-tokio
notify-failure:
- needs: [build, fuzz, linting, rustfmt, check_release, check_docs, benchmark, ext-test, tor-connect, coverage]
+ needs: [build-workspace, build-features, build-bindings, build-nostd, build-cfg-flags, build-sync, fuzz, linting, rustfmt, check_release, check_docs, benchmark, ext-test, tor-connect, coverage]
if: failure() && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml
new file mode 100644
index 0000000..4c56619
--- /dev/null
+++ b/.github/workflows/ci-build.yml
@@ -0,0 +1,80 @@
+name: CI Build Job
+
+on:
+ workflow_call:
+ inputs:
+ script:
+ description: CI script to run (relative to repo root)
+ required: true
+ type: string
+
+jobs:
+ build:
+ strategy:
+ fail-fast: false
+ matrix:
+ platform: >-
+ ${{ github.event_name == 'push' && github.ref == 'refs/heads/main'
+ && fromJSON('["self-hosted","windows-latest","macos-latest"]')
+ || fromJSON('["self-hosted"]') }}
+ toolchain: >-
+ ${{ github.event_name == 'push' && github.ref == 'refs/heads/main'
+ && fromJSON('["stable","beta","1.75.0"]')
+ || fromJSON('["1.75.0"]') }}
+ exclude:
+ - platform: windows-latest
+ toolchain: 1.75.0
+ - platform: windows-latest
+ toolchain: beta
+ - platform: macos-latest
+ toolchain: beta
+ runs-on: ${{ matrix.platform }}
+ steps:
+ - name: Checkout source code
+ uses: actions/checkout@v4
+ - name: Install Rust ${{ matrix.toolchain }} toolchain
+ run: |
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ matrix.toolchain }}
+ - name: Use rust-lld linker on Windows
+ if: matrix.platform == 'windows-latest'
+ shell: bash
+ run: echo "RUSTFLAGS=-C linker=rust-lld" >> "$GITHUB_ENV"
+ - name: Set RUSTFLAGS to deny warnings
+ if: "matrix.toolchain == '1.75.0'"
+ run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV"
+ - name: Install no-std-check dependencies for ARM Embedded
+ if: matrix.platform == 'self-hosted'
+ run: |
+ rustup target add thumbv7m-none-eabi
+ - name: Enable caching for bitcoind
+ if: matrix.platform != 'windows-latest'
+ id: cache-bitcoind
+ uses: actions/cache@v4
+ with:
+ path: bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
+ key: bitcoind-${{ runner.os }}-${{ runner.arch }}
+ - name: Enable caching for electrs
+ if: matrix.platform != 'windows-latest'
+ id: cache-electrs
+ uses: actions/cache@v4
+ with:
+ path: bin/electrs-${{ runner.os }}-${{ runner.arch }}
+ key: electrs-${{ runner.os }}-${{ runner.arch }}
+ - name: Download bitcoind/electrs
+ if: >-
+ matrix.platform != 'windows-latest'
+ && (steps.cache-bitcoind.outputs.cache-hit != 'true'
+ || steps.cache-electrs.outputs.cache-hit != 'true')
+ run: |
+ source ./contrib/download_bitcoind_electrs.sh
+ mkdir bin
+ mv "$BITCOIND_EXE" bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
+ mv "$ELECTRS_EXE" bin/electrs-${{ runner.os }}-${{ runner.arch }}
+ - name: Set bitcoind/electrs environment variables
+ if: matrix.platform != 'windows-latest'
+ run: |
+ echo "BITCOIND_EXE=$( pwd )/bin/bitcoind-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
+ echo "ELECTRS_EXE=$( pwd )/bin/electrs-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
+ - name: Run CI script
+ shell: bash
+ run: CI_ENV=1 CI_MINIMIZE_DISK_USAGE=1 ./${{ inputs.script }}
diff --git a/ci/ci-tests-bindings.sh b/ci/ci-tests-bindings.sh
new file mode 100755
index 0000000..74b471a
--- /dev/null
+++ b/ci/ci-tests-bindings.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+set -eox pipefail
+
+# shellcheck source=ci/ci-tests-common.sh
+source "$(dirname "$0")/ci-tests-common.sh"
+
+echo -e "\n\nTesting c_bindings builds"
+# Note that because `$RUSTFLAGS` is not passed through to doctest builds we cannot selectively
+# disable doctests in `c_bindings` so we skip doctests entirely here.
+RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test --quiet --color always --lib --bins --tests
+
+for DIR in lightning-invoice lightning-rapid-gossip-sync; do
+ # check if there is a conflict between no_std and the c_bindings cfg
+ RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test -p $DIR --quiet --color always --no-default-features
+done
+
+# Note that because `$RUSTFLAGS` is not passed through to doctest builds we cannot selectively
+# disable doctests in `c_bindings` so we skip doctests entirely here.
+RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test -p lightning-background-processor --quiet --color always --no-default-features --lib --bins --tests
+RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test -p lightning --quiet --color always --no-default-features --lib --bins --tests
diff --git a/ci/ci-tests-cfg-flags.sh b/ci/ci-tests-cfg-flags.sh
new file mode 100755
index 0000000..5380c98
--- /dev/null
+++ b/ci/ci-tests-cfg-flags.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+set -eox pipefail
+
+# shellcheck source=ci/ci-tests-common.sh
+source "$(dirname "$0")/ci-tests-common.sh"
+
+echo -e "\n\nTest cfg-flag builds"
+RUSTFLAGS="--cfg=taproot" cargo test --quiet --color always -p lightning
+[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
+RUSTFLAGS="--cfg=simple_close" cargo test --quiet --color always -p lightning
+[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
+RUSTFLAGS="--cfg=lsps1_service" cargo test --quiet --color always -p lightning-liquidity
+[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
+RUSTFLAGS="--cfg=peer_storage" cargo test --quiet --color always -p lightning
diff --git a/ci/ci-tests-common.sh b/ci/ci-tests-common.sh
new file mode 100755
index 0000000..d60c9d0
--- /dev/null
+++ b/ci/ci-tests-common.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+# ci/ci-tests-common.sh - Shared helpers for CI test scripts.
+# Source this file; do not execute it directly.
+# shellcheck disable=SC2002,SC2207
+
+RUSTC_MINOR_VERSION=$(rustc --version | awk '{ split($2,a,"."); print a[2] }')
+
+# Some crates require pinning to meet our MSRV even for our downstream users,
+# which we do here.
+# Further crates which appear only as dev-dependencies are pinned further down.
+function PIN_RELEASE_DEPS {
+ return 0 # Don't fail the script if our rustc is higher than the last check
+}
+
+PIN_RELEASE_DEPS # pin the release dependencies in our main workspace
+
+# The backtrace v0.3.75 crate relies on rustc 1.82
+[ "$RUSTC_MINOR_VERSION" -lt 82 ] && cargo update -p backtrace --precise "0.3.74" --quiet
+
+# Starting with version 1.2.0, the `idna_adapter` crate has an MSRV of rustc 1.81.0.
+[ "$RUSTC_MINOR_VERSION" -lt 81 ] && cargo update -p idna_adapter --precise "1.1.0" --quiet
+
+export RUST_BACKTRACE=1
diff --git a/ci/ci-tests-features.sh b/ci/ci-tests-features.sh
new file mode 100755
index 0000000..f01e7fd
--- /dev/null
+++ b/ci/ci-tests-features.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+set -eox pipefail
+
+# shellcheck source=ci/ci-tests-common.sh
+source "$(dirname "$0")/ci-tests-common.sh"
+
+echo -e "\n\nChecking and testing lightning with features"
+cargo test -p lightning --quiet --color always --features dnssec
+cargo check -p lightning --quiet --color always --features dnssec
+cargo doc -p lightning --quiet --document-private-items --features dnssec
+
+echo -e "\n\nChecking and testing lightning-persister with features"
+cargo test -p lightning-persister --quiet --color always --features tokio
+cargo check -p lightning-persister --quiet --color always --features tokio
+cargo doc -p lightning-persister --quiet --document-private-items --features tokio
+
+echo -e "\n\nTest backtrace-debug builds"
+cargo test -p lightning --quiet --color always --features backtrace
+
+echo -e "\n\nTesting other crate-specific builds"
+# Note that outbound_commitment_test only runs in this mode because of hardcoded signature values
+RUSTFLAGS="$RUSTFLAGS --cfg=ldk_test_vectors" cargo test -p lightning --quiet --color always --no-default-features --features=std
+# This one only works for lightning-invoice
+# check that compile with no_std and serde works in lightning-invoice
+cargo test -p lightning-invoice --quiet --color always --no-default-features --features serde
diff --git a/ci/ci-tests-nostd.sh b/ci/ci-tests-nostd.sh
new file mode 100755
index 0000000..7d3acb1
--- /dev/null
+++ b/ci/ci-tests-nostd.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+set -eox pipefail
+
+# shellcheck source=ci/ci-tests-common.sh
+source "$(dirname "$0")/ci-tests-common.sh"
+
+echo -e "\n\nTesting no_std builds"
+for DIR in lightning-invoice lightning-rapid-gossip-sync lightning-liquidity; do
+ cargo test -p $DIR --quiet --color always --no-default-features
+done
+
+cargo test -p lightning --quiet --color always --no-default-features
+cargo test -p lightning-background-processor --quiet --color always --no-default-features
+
+echo -e "\n\nTesting no_std build on a downstream no-std crate"
+# check no-std compatibility across dependencies
+pushd no-std-check
+cargo check --quiet --color always
+[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
+popd
+
+if [ -f "$(which arm-none-eabi-gcc)" ]; then
+ pushd no-std-check
+ cargo build --quiet --target=thumbv7m-none-eabi
+ [ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
+ popd
+fi
diff --git a/ci/ci-tests-sync.sh b/ci/ci-tests-sync.sh
new file mode 100755
index 0000000..ef836a6
--- /dev/null
+++ b/ci/ci-tests-sync.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+set -eox pipefail
+
+# shellcheck source=ci/ci-tests-common.sh
+source "$(dirname "$0")/ci-tests-common.sh"
+
+echo -e "\n\nChecking and testing Block Sync Clients with features"
+
+cargo test -p lightning-block-sync --quiet --color always --features rest-client
+cargo check -p lightning-block-sync --quiet --color always --features rest-client
+cargo test -p lightning-block-sync --quiet --color always --features rpc-client
+cargo check -p lightning-block-sync --quiet --color always --features rpc-client
+cargo test -p lightning-block-sync --quiet --color always --features rpc-client,rest-client
+cargo check -p lightning-block-sync --quiet --color always --features rpc-client,rest-client
+cargo test -p lightning-block-sync --quiet --color always --features rpc-client,rest-client,tokio
+cargo check -p lightning-block-sync --quiet --color always --features rpc-client,rest-client,tokio
+
+echo -e "\n\nChecking Transaction Sync Clients with features."
+cargo check -p lightning-transaction-sync --quiet --color always --features esplora-blocking
+cargo check -p lightning-transaction-sync --quiet --color always --features esplora-async
+cargo check -p lightning-transaction-sync --quiet --color always --features esplora-async-https
+cargo check -p lightning-transaction-sync --quiet --color always --features electrum
+
+if [ -z "$CI_ENV" ] && [[ -z "$BITCOIND_EXE" || -z "$ELECTRS_EXE" ]]; then
+ echo -e "\n\nSkipping testing Transaction Sync Clients due to BITCOIND_EXE or ELECTRS_EXE being unset."
+ cargo check -p lightning-transaction-sync --tests
+else
+ echo -e "\n\nTesting Transaction Sync Clients with features."
+ cargo test -p lightning-transaction-sync --quiet --color always --features esplora-blocking
+ cargo test -p lightning-transaction-sync --quiet --color always --features esplora-async
+ cargo test -p lightning-transaction-sync --quiet --color always --features esplora-async-https
+ cargo test -p lightning-transaction-sync --quiet --color always --features electrum
+fi
diff --git a/ci/ci-tests-workspace.sh b/ci/ci-tests-workspace.sh
new file mode 100755
index 0000000..3302f07
--- /dev/null
+++ b/ci/ci-tests-workspace.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+#shellcheck disable=SC2002,SC2207
+set -eox pipefail
+
+# shellcheck source=ci/ci-tests-common.sh
+source "$(dirname "$0")/ci-tests-common.sh"
+
+echo -e "\n\nChecking the workspace, except lightning-transaction-sync."
+cargo check --quiet --color always
+
+WORKSPACE_MEMBERS=( $(cat Cargo.toml | tr '\n' '\r' | sed 's/\r //g' | tr '\r' '\n' | grep '^members =' | sed 's/members.*=.*\[//' | tr -d '"' | tr ',' ' ') )
+
+echo -e "\n\nTesting the workspace, except lightning-transaction-sync."
+cargo test --quiet --color always
+
+echo -e "\n\nTesting upgrade from prior versions of LDK"
+pushd lightning-tests
+cargo test --quiet
+popd
+
+echo -e "\n\nChecking and building docs for all workspace members individually..."
+for DIR in "${WORKSPACE_MEMBERS[@]}"; do
+ cargo check -p "$DIR" --quiet --color always
+ cargo doc -p "$DIR" --quiet --document-private-items
+done
+
+echo -e "\n\nTest Custom Message Macros"
+cargo test -p lightning-custom-message --quiet --color always
+[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
+
+# Test that we can build downstream code with only the "release pins".
+pushd msrv-no-dev-deps-check
+PIN_RELEASE_DEPS
+cargo check --quiet
+[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
+popd
diff --git a/ci/ci-tests.sh b/ci/ci-tests.sh
index 83b2af2..57691ad 100755
--- a/ci/ci-tests.sh
+++ b/ci/ci-tests.sh
@@ -1,146 +1,13 @@
#!/bin/bash
-#shellcheck disable=SC2002,SC2207
set -eox pipefail
-RUSTC_MINOR_VERSION=$(rustc --version | awk '{ split($2,a,"."); print a[2] }')
+# Run all CI test groups sequentially for local testing.
+# In GitHub Actions, these run as separate parallel jobs.
-# Some crates require pinning to meet our MSRV even for our downstream users,
-# which we do here.
-# Further crates which appear only as dev-dependencies are pinned further down.
-function PIN_RELEASE_DEPS {
- return 0 # Don't fail the script if our rustc is higher than the last check
-}
-
-PIN_RELEASE_DEPS # pin the release dependencies in our main workspace
-
-# The backtrace v0.3.75 crate relies on rustc 1.82
-[ "$RUSTC_MINOR_VERSION" -lt 82 ] && cargo update -p backtrace --precise "0.3.74" --quiet
-
-# Starting with version 1.2.0, the `idna_adapter` crate has an MSRV of rustc 1.81.0.
-[ "$RUSTC_MINOR_VERSION" -lt 81 ] && cargo update -p idna_adapter --precise "1.1.0" --quiet
-
-export RUST_BACKTRACE=1
-
-echo -e "\n\nChecking the workspace, except lightning-transaction-sync."
-cargo check --quiet --color always
-
-WORKSPACE_MEMBERS=( $(cat Cargo.toml | tr '\n' '\r' | sed 's/\r //g' | tr '\r' '\n' | grep '^members =' | sed 's/members.*=.*\[//' | tr -d '"' | tr ',' ' ') )
-
-echo -e "\n\nTesting the workspace, except lightning-transaction-sync."
-cargo test --quiet --color always
-
-echo -e "\n\nTesting upgrade from prior versions of LDK"
-pushd lightning-tests
-cargo test --quiet
-popd
-
-echo -e "\n\nChecking and building docs for all workspace members individually..."
-for DIR in "${WORKSPACE_MEMBERS[@]}"; do
- cargo check -p "$DIR" --quiet --color always
- cargo doc -p "$DIR" --quiet --document-private-items
-done
-
-echo -e "\n\nChecking and testing lightning with features"
-cargo test -p lightning --quiet --color always --features dnssec
-cargo check -p lightning --quiet --color always --features dnssec
-cargo doc -p lightning --quiet --document-private-items --features dnssec
-
-echo -e "\n\nChecking and testing Block Sync Clients with features"
-
-cargo test -p lightning-block-sync --quiet --color always --features rest-client
-cargo check -p lightning-block-sync --quiet --color always --features rest-client
-cargo test -p lightning-block-sync --quiet --color always --features rpc-client
-cargo check -p lightning-block-sync --quiet --color always --features rpc-client
-cargo test -p lightning-block-sync --quiet --color always --features rpc-client,rest-client
-cargo check -p lightning-block-sync --quiet --color always --features rpc-client,rest-client
-cargo test -p lightning-block-sync --quiet --color always --features rpc-client,rest-client,tokio
-cargo check -p lightning-block-sync --quiet --color always --features rpc-client,rest-client,tokio
-
-echo -e "\n\nChecking Transaction Sync Clients with features."
-cargo check -p lightning-transaction-sync --quiet --color always --features esplora-blocking
-cargo check -p lightning-transaction-sync --quiet --color always --features esplora-async
-cargo check -p lightning-transaction-sync --quiet --color always --features esplora-async-https
-cargo check -p lightning-transaction-sync --quiet --color always --features electrum
-
-if [ -z "$CI_ENV" ] && [[ -z "$BITCOIND_EXE" || -z "$ELECTRS_EXE" ]]; then
- echo -e "\n\nSkipping testing Transaction Sync Clients due to BITCOIND_EXE or ELECTRS_EXE being unset."
- cargo check -p lightning-transaction-sync --tests
-else
- echo -e "\n\nTesting Transaction Sync Clients with features."
- cargo test -p lightning-transaction-sync --quiet --color always --features esplora-blocking
- cargo test -p lightning-transaction-sync --quiet --color always --features esplora-async
- cargo test -p lightning-transaction-sync --quiet --color always --features esplora-async-https
- cargo test -p lightning-transaction-sync --quiet --color always --features electrum
-fi
-
-echo -e "\n\nChecking and testing lightning-persister with features"
-cargo test -p lightning-persister --quiet --color always --features tokio
-cargo check -p lightning-persister --quiet --color always --features tokio
-cargo doc -p lightning-persister --quiet --document-private-items --features tokio
-
-echo -e "\n\nTest Custom Message Macros"
-cargo test -p lightning-custom-message --quiet --color always
-[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
-
-echo -e "\n\nTest backtrace-debug builds"
-cargo test -p lightning --quiet --color always --features backtrace
-
-echo -e "\n\nTesting no_std builds"
-for DIR in lightning-invoice lightning-rapid-gossip-sync lightning-liquidity; do
- cargo test -p $DIR --quiet --color always --no-default-features
-done
-
-cargo test -p lightning --quiet --color always --no-default-features
-cargo test -p lightning-background-processor --quiet --color always --no-default-features
-
-echo -e "\n\nTesting c_bindings builds"
-# Note that because `$RUSTFLAGS` is not passed through to doctest builds we cannot selectively
-# disable doctests in `c_bindings` so we skip doctests entirely here.
-RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test --quiet --color always --lib --bins --tests
-
-for DIR in lightning-invoice lightning-rapid-gossip-sync; do
- # check if there is a conflict between no_std and the c_bindings cfg
- RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test -p $DIR --quiet --color always --no-default-features
-done
-
-# Note that because `$RUSTFLAGS` is not passed through to doctest builds we cannot selectively
-# disable doctests in `c_bindings` so we skip doctests entirely here.
-RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test -p lightning-background-processor --quiet --color always --no-default-features --lib --bins --tests
-RUSTFLAGS="$RUSTFLAGS --cfg=c_bindings" cargo test -p lightning --quiet --color always --no-default-features --lib --bins --tests
-
-echo -e "\n\nTesting other crate-specific builds"
-# Note that outbound_commitment_test only runs in this mode because of hardcoded signature values
-RUSTFLAGS="$RUSTFLAGS --cfg=ldk_test_vectors" cargo test -p lightning --quiet --color always --no-default-features --features=std
-# This one only works for lightning-invoice
-# check that compile with no_std and serde works in lightning-invoice
-cargo test -p lightning-invoice --quiet --color always --no-default-features --features serde
-
-echo -e "\n\nTesting no_std build on a downstream no-std crate"
-# check no-std compatibility across dependencies
-pushd no-std-check
-cargo check --quiet --color always
-[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
-popd
-
-# Test that we can build downstream code with only the "release pins".
-pushd msrv-no-dev-deps-check
-PIN_RELEASE_DEPS
-cargo check --quiet
-[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
-popd
-
-if [ -f "$(which arm-none-eabi-gcc)" ]; then
- pushd no-std-check
- cargo build --quiet --target=thumbv7m-none-eabi
- [ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
- popd
-fi
-
-echo -e "\n\nTest cfg-flag builds"
-RUSTFLAGS="--cfg=taproot" cargo test --quiet --color always -p lightning
-[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
-RUSTFLAGS="--cfg=simple_close" cargo test --quiet --color always -p lightning
-[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
-RUSTFLAGS="--cfg=lsps1_service" cargo test --quiet --color always -p lightning-liquidity
-[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
-RUSTFLAGS="--cfg=peer_storage" cargo test --quiet --color always -p lightning
+DIR="$(dirname "$0")"
+"$DIR/ci-tests-workspace.sh"
+"$DIR/ci-tests-features.sh"
+"$DIR/ci-tests-bindings.sh"
+"$DIR/ci-tests-nostd.sh"
+"$DIR/ci-tests-cfg-flags.sh"
+"$DIR/ci-tests-sync.sh"
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.