@@ -26,77 +26,36 @@ jobs:
2626 cd ext-functional-test-demo
2727 cargo test --verbose --color always
2828 cargo test --verbose --color always --features test-broken
29- build :
30- strategy :
31- fail-fast : false
32- matrix :
33- platform : >-
34- ${{ github.event_name == 'push' && github.ref == 'refs/heads/main'
35- && fromJSON('["self-hosted","windows-latest","macos-latest"]')
36- || fromJSON('["self-hosted"]') }}
37- toolchain : >-
38- ${{ github.event_name == 'push' && github.ref == 'refs/heads/main'
39- && fromJSON('["stable","beta","1.75.0"]')
40- || fromJSON('["1.75.0"]') }}
41- exclude :
42- - platform : windows-latest
43- toolchain : 1.75.0
44- - platform : windows-latest
45- toolchain : beta
46- - platform : macos-latest
47- toolchain : beta
48- runs-on : ${{ matrix.platform }}
49- steps :
50- - name : Checkout source code
51- uses : actions/checkout@v4
52- - name : Install Rust ${{ matrix.toolchain }} toolchain
53- run : |
54- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ matrix.toolchain }}
55- - name : Use rust-lld linker on Windows
56- if : matrix.platform == 'windows-latest'
57- shell : bash
58- run : echo "RUSTFLAGS=-C linker=rust-lld" >> "$GITHUB_ENV"
59- - name : Install no-std-check dependencies for ARM Embedded
60- if : " matrix.platform == 'self-hosted'"
61- run : |
62- rustup target add thumbv7m-none-eabi
63- - name : shellcheck the CI and `contrib` scripts
64- if : " matrix.platform == 'self-hosted'"
65- run : |
66- shellcheck ci/*.sh -aP ci
67- shellcheck contrib/*.sh -aP contrib
68- - name : Set RUSTFLAGS to deny warnings
69- if : " matrix.toolchain == '1.75.0'"
70- run : echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV"
71- - name : Enable caching for bitcoind
72- if : matrix.platform != 'windows-latest'
73- id : cache-bitcoind
74- uses : actions/cache@v4
75- with :
76- path : bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
77- key : bitcoind-${{ runner.os }}-${{ runner.arch }}
78- - name : Enable caching for electrs
79- if : matrix.platform != 'windows-latest'
80- id : cache-electrs
81- uses : actions/cache@v4
82- with :
83- path : bin/electrs-${{ runner.os }}-${{ runner.arch }}
84- key : electrs-${{ runner.os }}-${{ runner.arch }}
85- - name : Download bitcoind/electrs
86- if : " matrix.platform != 'windows-latest' && (steps.cache-bitcoind.outputs.cache-hit != 'true' || steps.cache-electrs.outputs.cache-hit != 'true')"
87- run : |
88- source ./contrib/download_bitcoind_electrs.sh
89- mkdir bin
90- mv "$BITCOIND_EXE" bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
91- mv "$ELECTRS_EXE" bin/electrs-${{ runner.os }}-${{ runner.arch }}
92- - name : Set bitcoind/electrs environment variables
93- if : matrix.platform != 'windows-latest'
94- run : |
95- echo "BITCOIND_EXE=$( pwd )/bin/bitcoind-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
96- echo "ELECTRS_EXE=$( pwd )/bin/electrs-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
97- - name : Run CI script
98- shell : bash # Default on Winblows is powershell
99- run : CI_ENV=1 CI_MINIMIZE_DISK_USAGE=1 ./ci/ci-tests.sh
29+
30+ build-workspace :
31+ uses : ./.github/workflows/ci-build.yml
32+ with :
33+ script : ci/ci-tests-workspace.sh
34+
35+ build-features :
36+ uses : ./.github/workflows/ci-build.yml
37+ with :
38+ script : ci/ci-tests-features.sh
39+
40+ build-bindings :
41+ uses : ./.github/workflows/ci-build.yml
42+ with :
43+ script : ci/ci-tests-bindings.sh
44+
45+ build-nostd :
46+ uses : ./.github/workflows/ci-build.yml
47+ with :
48+ script : ci/ci-tests-nostd.sh
49+
50+ build-cfg-flags :
51+ uses : ./.github/workflows/ci-build.yml
52+ with :
53+ script : ci/ci-tests-cfg-flags.sh
54+
55+ build-sync :
56+ uses : ./.github/workflows/ci-build.yml
57+ with :
58+ script : ci/ci-tests-sync.sh
10059
10160 coverage :
10261 needs : fuzz
@@ -305,6 +264,10 @@ jobs:
305264 - name : Install clippy
306265 run : |
307266 rustup component add clippy
267+ - name : shellcheck the CI and `contrib` scripts
268+ run : |
269+ shellcheck ci/*.sh -aP ci
270+ shellcheck contrib/*.sh -aP contrib
308271 - name : Run default clippy linting
309272 run : |
310273 ./ci/check-lint.sh
@@ -344,7 +307,7 @@ jobs:
344307 TOR_PROXY="127.0.0.1:9050" RUSTFLAGS="--cfg=tor" cargo test --verbose --color always -p lightning-net-tokio
345308
346309 notify-failure :
347- needs : [build, fuzz, linting, rustfmt, check_release, check_docs, benchmark, ext-test, tor-connect, coverage]
310+ 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]
348311 if : failure() && github.ref == 'refs/heads/main'
349312 runs-on : ubuntu-latest
350313 permissions :
0 commit comments