- name: Set RUSTFLAGS to deny warnings
if: "matrix.toolchain == '1.63.0'"
run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV"
+ - name: Enable caching for bitcoind
+ 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
+ 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
+ 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_MINIMIZE_DISK_USAGE=1 ./ci/ci-tests.sh
RUSTC_MINOR_VERSION=$(rustc --version | awk '{ split($2,a,"."); print a[2] }')
HOST_PLATFORM="$(rustc --version --verbose | grep "host:" | awk '{ print $2 }')"
-CONTRIB_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )/../contrib" && pwd )
# Some crates require pinning to meet our MSRV even for our downstream users,
# which we do here.
popd
if [[ "$HOST_PLATFORM" != *windows* ]]; then
- echo -e "\n\nBuilding and testing Transaction Sync Clients with features"
- pushd lightning-transaction-sync
-
- source "$CONTRIB_DIR/download_bitcoind_electrs.sh"
-
- cargo test --verbose --color always --features esplora-blocking
- cargo check --verbose --color always --features esplora-blocking
- cargo test --verbose --color always --features esplora-async
- cargo check --verbose --color always --features esplora-async
- cargo test --verbose --color always --features esplora-async-https
- cargo check --verbose --color always --features esplora-async-https
- cargo test --verbose --color always --features electrum
- cargo check --verbose --color always --features electrum
- popd
+ if [ -z "$BITCOIND_EXE" ] || [ -z "$ELECTRS_EXE" ]; then
+ echo -e "\n\nSkipping testing Transaction Sync Clients due to BITCOIND_EXE or ELECTRS_EXE being unset."
+ else
+ echo -e "\n\nBuilding and testing Transaction Sync Clients with features"
+ pushd lightning-transaction-sync
+
+ cargo test --verbose --color always --features esplora-blocking
+ cargo check --verbose --color always --features esplora-blocking
+ cargo test --verbose --color always --features esplora-async
+ cargo check --verbose --color always --features esplora-async
+ cargo test --verbose --color always --features esplora-async-https
+ cargo check --verbose --color always --features esplora-async-https
+ cargo test --verbose --color always --features electrum
+ cargo check --verbose --color always --features electrum
+ popd
+ fi
fi
echo -e "\n\nTest futures builds"