Skip to content

Commit 804fd84

Browse files
committed
ci: trim to jobs and toolchains the fork actually changes
1 parent 2a35e52 commit 804fd84

3 files changed

Lines changed: 4 additions & 332 deletions

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 242 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,13 @@ concurrency:
1313
cancel-in-progress: true
1414

1515
jobs:
16-
ext-test:
17-
runs-on: self-hosted
18-
steps:
19-
- name: Checkout source code
20-
uses: actions/checkout@v4
21-
- name: Install Rust stable toolchain
22-
run: |
23-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain stable
24-
- name: Run externalized tests
25-
run: |
26-
cd ext-functional-test-demo
27-
cargo test --verbose --color always
28-
cargo test --verbose --color always --features test-broken
2916
build:
3017
strategy:
3118
fail-fast: false
3219
matrix:
33-
platform: [ self-hosted, windows-latest, macos-latest ]
34-
toolchain: [ stable, beta, 1.63.0 ] # 1.63.0 is the MSRV for all crates but `lightning-transaction-sync`.
20+
platform: [ ubuntu-latest, windows-latest, macos-latest ]
21+
toolchain: [ stable, beta ]
3522
exclude:
36-
- platform: windows-latest
37-
toolchain: 1.63.0
3823
- platform: windows-latest
3924
toolchain: beta
4025
- platform: macos-latest
@@ -50,232 +35,9 @@ jobs:
5035
if: matrix.platform == 'windows-latest'
5136
shell: bash
5237
run: echo "RUSTFLAGS=-C linker=rust-lld" >> "$GITHUB_ENV"
53-
- name: Install no-std-check dependencies for ARM Embedded
54-
if: "matrix.platform == 'self-hosted'"
55-
run: |
56-
rustup target add thumbv7m-none-eabi
57-
- name: shellcheck the CI and `contrib` scripts
58-
if: "matrix.platform == 'self-hosted'"
59-
run: |
60-
shellcheck ci/*.sh -aP ci
61-
shellcheck contrib/*.sh -aP contrib
62-
- name: Set RUSTFLAGS to deny warnings
63-
if: "matrix.toolchain == '1.63.0'"
64-
run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV"
65-
- name: Run CI script
66-
shell: bash # Default on Winblows is powershell
67-
run: CI_ENV=1 CI_MINIMIZE_DISK_USAGE=1 ./ci/ci-tests.sh
68-
69-
build-tx-sync:
70-
strategy:
71-
fail-fast: false
72-
matrix:
73-
platform: [ ubuntu-latest, macos-latest ]
74-
toolchain: [ stable, beta, 1.75.0 ] # 1.75.0 is the MSRV for `lightning-transaction-sync`.
75-
runs-on: ${{ matrix.platform }}
76-
steps:
77-
- name: Checkout source code
78-
uses: actions/checkout@v4
79-
- name: Install Rust ${{ matrix.toolchain }} toolchain
80-
run: |
81-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ matrix.toolchain }}
82-
- name: Set RUSTFLAGS to deny warnings
83-
if: "matrix.toolchain == '1.75.0'"
84-
run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV"
85-
- name: Enable caching for bitcoind
86-
id: cache-bitcoind
87-
uses: actions/cache@v4
88-
with:
89-
path: bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
90-
key: bitcoind-${{ runner.os }}-${{ runner.arch }}
91-
- name: Enable caching for electrs
92-
id: cache-electrs
93-
uses: actions/cache@v4
94-
with:
95-
path: bin/electrs-${{ runner.os }}-${{ runner.arch }}
96-
key: electrs-${{ runner.os }}-${{ runner.arch }}
97-
- name: Download bitcoind/electrs
98-
if: "steps.cache-bitcoind.outputs.cache-hit != 'true' || steps.cache-electrs.outputs.cache-hit != 'true'"
99-
run: |
100-
source ./contrib/download_bitcoind_electrs.sh
101-
mkdir bin
102-
mv "$BITCOIND_EXE" bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
103-
mv "$ELECTRS_EXE" bin/electrs-${{ runner.os }}-${{ runner.arch }}
104-
- name: Set bitcoind/electrs environment variables
105-
run: |
106-
echo "BITCOIND_EXE=$( pwd )/bin/bitcoind-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
107-
echo "ELECTRS_EXE=$( pwd )/bin/electrs-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
108-
- name: Run CI script
38+
- name: Build the workspace
10939
shell: bash # Default on Winblows is powershell
110-
run: CI_ENV=1 CI_MINIMIZE_DISK_USAGE=1 ./ci/ci-tx-sync-tests.sh
111-
112-
coverage:
113-
strategy:
114-
fail-fast: false
115-
runs-on: self-hosted
116-
steps:
117-
- name: Checkout source code
118-
uses: actions/checkout@v4
119-
with:
120-
fetch-depth: 0
121-
- name: Install Rust stable toolchain
122-
run: |
123-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal
124-
- name: Run tests with coverage generation
125-
run: |
126-
cargo install cargo-llvm-cov
127-
export RUSTFLAGS="-Coverflow-checks=off"
128-
cargo llvm-cov --features rest-client,rpc-client,tokio,serde --codecov --hide-instantiations --output-path=target/codecov.json
129-
curl --verbose -O https://cli.codecov.io/latest/linux/codecov
130-
chmod +x codecov
131-
# Could you use this to fake the coverage report for your PR? Sure.
132-
# Will anyone be impressed by your amazing coverage? No
133-
# Maybe if codecov wasn't broken we wouldn't need to do this...
134-
./codecov --verbose upload-process --disable-search --fail-on-error -f target/codecov.json -t "f421b687-4dc2-4387-ac3d-dc3b2528af57" -F 'tests'
135-
cargo clean
136-
- name: Run fuzz coverage generation
137-
run: |
138-
./contrib/generate_fuzz_coverage.sh --output-dir `pwd` --output-codecov-json
139-
# Could you use this to fake the coverage report for your PR? Sure.
140-
# Will anyone be impressed by your amazing coverage? No
141-
# Maybe if codecov wasn't broken we wouldn't need to do this...
142-
./codecov --verbose upload-process --disable-search --fail-on-error -f fuzz-codecov.json -t "f421b687-4dc2-4387-ac3d-dc3b2528af57" -F 'fuzzing'
143-
144-
benchmark:
145-
runs-on: ubuntu-latest
146-
env:
147-
TOOLCHAIN: stable
148-
steps:
149-
- name: Checkout source code
150-
uses: actions/checkout@v4
151-
- name: Install Rust ${{ env.TOOLCHAIN }} toolchain
152-
run: |
153-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ env.TOOLCHAIN }}
154-
- name: Cache routing graph snapshot
155-
id: cache-graph
156-
uses: actions/cache@v4
157-
with:
158-
path: lightning/net_graph-2023-12-10.bin
159-
key: ldk-net_graph-v0.0.118-2023-12-10.bin
160-
- name: Fetch routing graph snapshot
161-
if: steps.cache-graph.outputs.cache-hit != 'true'
162-
run: |
163-
curl --verbose -L -o lightning/net_graph-2023-12-10.bin https://bitcoin.ninja/ldk-net_graph-v0.0.118-2023-12-10.bin
164-
echo "Sha sum: $(sha256sum lightning/net_graph-2023-12-10.bin | awk '{ print $1 }')"
165-
if [ "$(sha256sum lightning/net_graph-2023-12-10.bin | awk '{ print $1 }')" != "${EXPECTED_ROUTING_GRAPH_SNAPSHOT_SHASUM}" ]; then
166-
echo "Bad hash"
167-
exit 1
168-
fi
169-
env:
170-
EXPECTED_ROUTING_GRAPH_SNAPSHOT_SHASUM: e94b38ef4b3ce683893bf6a3ee28d60cb37c73b059403ff77b7e7458157968c2
171-
- name: Cache scorer snapshot
172-
id: cache-scorer
173-
uses: actions/cache@v4
174-
with:
175-
path: lightning/scorer-2023-12-10.bin
176-
key: ldk-scorer-v0.0.118-2023-12-10.bin
177-
- name: Fetch scorer snapshot
178-
if: steps.cache-scorer.outputs.cache-hit != 'true'
179-
run: |
180-
curl --verbose -L -o lightning/scorer-2023-12-10.bin https://bitcoin.ninja/ldk-scorer-v0.0.118-2023-12-10.bin
181-
echo "Sha sum: $(sha256sum lightning/scorer-2023-12-10.bin | awk '{ print $1 }')"
182-
if [ "$(sha256sum lightning/scorer-2023-12-10.bin | awk '{ print $1 }')" != "${EXPECTED_SCORER_SNAPSHOT_SHASUM}" ]; then
183-
echo "Bad hash"
184-
exit 1
185-
fi
186-
env:
187-
EXPECTED_SCORER_SNAPSHOT_SHASUM: 570a26bb28870fe1da7e392cdec9fb794718826b04c43ca053d71a8a9bb9be69
188-
- name: Fetch rapid graph sync reference input
189-
run: |
190-
curl --verbose -L -o lightning-rapid-gossip-sync/res/full_graph.lngossip https://bitcoin.ninja/ldk-compressed_graph-285cb27df79-2022-07-21.bin
191-
echo "Sha sum: $(sha256sum lightning-rapid-gossip-sync/res/full_graph.lngossip | awk '{ print $1 }')"
192-
if [ "$(sha256sum lightning-rapid-gossip-sync/res/full_graph.lngossip | awk '{ print $1 }')" != "${EXPECTED_RAPID_GOSSIP_SHASUM}" ]; then
193-
echo "Bad hash"
194-
exit 1
195-
fi
196-
env:
197-
EXPECTED_RAPID_GOSSIP_SHASUM: e0f5d11641c11896d7af3a2246d3d6c3f1720b7d2d17aab321ecce82e6b7deb8
198-
- name: Test with Network Graph on Rust ${{ matrix.toolchain }}
199-
run: |
200-
cd lightning
201-
RUSTFLAGS="--cfg=require_route_graph_test" cargo test
202-
cd ..
203-
- name: Run benchmarks on Rust ${{ matrix.toolchain }}
204-
run: |
205-
cd bench
206-
RUSTFLAGS="--cfg=ldk_bench --cfg=require_route_graph_test" cargo bench
207-
208-
check_release:
209-
runs-on: ubuntu-latest
210-
env:
211-
TOOLCHAIN: stable
212-
steps:
213-
- name: Checkout source code
214-
uses: actions/checkout@v4
215-
with:
216-
fetch-depth: 0
217-
- name: Install Rust ${{ env.TOOLCHAIN }} toolchain
218-
run: |
219-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ env.TOOLCHAIN }}
220-
- name: Run cargo check for release build.
221-
run: |
222-
cargo check --release
223-
cargo check --no-default-features --features=std --release
224-
cargo doc --release
225-
- name: Run cargo check for Taproot build.
226-
run: |
227-
cargo check --release
228-
cargo check --no-default-features --release
229-
cargo check --no-default-features --features=std --release
230-
cargo doc --release
231-
cargo doc --no-default-features --release
232-
env:
233-
RUSTFLAGS: '--cfg=taproot'
234-
RUSTDOCFLAGS: '--cfg=taproot'
235-
236-
check_docs:
237-
runs-on: self-hosted
238-
env:
239-
# While docs.rs builds using a nightly compiler (and we use some nightly features),
240-
# nightly ends up randomly breaking builds occasionally, so we instead use beta
241-
# and set RUSTC_BOOTSTRAP in check-docsrs.sh
242-
TOOLCHAIN: beta
243-
steps:
244-
- name: Checkout source code
245-
uses: actions/checkout@v4
246-
with:
247-
fetch-depth: 0
248-
- name: Install Rust ${{ env.TOOLCHAIN }} toolchain
249-
run: |
250-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ env.TOOLCHAIN }}
251-
- name: Simulate docs.rs build
252-
run: ci/check-docsrs.sh
253-
254-
fuzz:
255-
runs-on: self-hosted
256-
env:
257-
TOOLCHAIN: 1.63
258-
steps:
259-
- name: Checkout source code
260-
uses: actions/checkout@v4
261-
- name: Install Rust ${{ env.TOOLCHAIN }} toolchain
262-
run: |
263-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ env.TOOLCHAIN }}
264-
- name: Pin the syn and regex dependencies
265-
run: |
266-
cd fuzz && cargo update -p regex --precise "1.9.6" && cargo update -p syn --precise "2.0.106" && cargo update -p quote --precise "1.0.41"
267-
cargo update -p proc-macro2 --precise "1.0.103" --verbose && cargo update -p serde_json --precise "1.0.145" --verbose
268-
cargo update -p itoa --precise "1.0.15" --verbose && cargo update -p ryu --precise "1.0.20" --verbose
269-
cd write-seeds && cargo update -p regex --precise "1.9.6" && cargo update -p syn --precise "2.0.106" && cargo update -p quote --precise "1.0.41"
270-
cargo update -p proc-macro2 --precise "1.0.103" --verbose && cargo update -p serde_json --precise "1.0.145" --verbose
271-
cargo update -p itoa --precise "1.0.15" --verbose && cargo update -p ryu --precise "1.0.20" --verbose
272-
- name: Sanity check fuzz targets on Rust ${{ env.TOOLCHAIN }}
273-
run: |
274-
cd fuzz
275-
RUSTFLAGS="--cfg=fuzzing --cfg=secp256k1_fuzz --cfg=hashes_fuzz" cargo test --verbose --color always --lib --bins -j8
276-
cargo clean
277-
- name: Run fuzzers
278-
run: cd fuzz && ./ci-fuzz.sh && cd ..
40+
run: cargo build --workspace --verbose --color always
27941

28042
linting:
28143
runs-on: ubuntu-latest

.github/workflows/check_commits.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/semver.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)