Skip to content

Commit 089b759

Browse files
committed
CI: avoid rebuilds on downloads.
We use the same fragment everywhere for consistency, even though some stages don't actually call make. Signed-off-by: Rusty Russell <[email protected]>
1 parent 2188f39 commit 089b759

File tree

1 file changed

+59
-32
lines changed

1 file changed

+59
-32
lines changed

.github/workflows/ci.yaml

Lines changed: 59 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,16 @@ jobs:
125125
set -e
126126
./configure --enable-debugbuild CC="$COMPILER" ${{ matrix.COPTFLAGS_VAR }}
127127
128-
uv run make -j $(nproc) testpack.tar.bz2
128+
uv run make -j $(nproc) testpack.tar.gz
129129
130130
# Rename now so we don't clash
131-
mv testpack.tar.bz2 cln-${CFG}.tar.bz2
131+
mv testpack.tar.gz cln-${CFG}.tar.gz
132132
- name: Check rust packages
133133
run: cargo test --all
134134
- uses: actions/upload-artifact@v4
135135
with:
136-
name: cln-${{ matrix.CFG }}.tar.bz2
137-
path: cln-${{ matrix.CFG }}.tar.bz2
136+
name: cln-${{ matrix.CFG }}.tar.gz
137+
path: cln-${{ matrix.CFG }}.tar.gz
138138

139139
postbuild:
140140
name: Postbuild checks
@@ -171,22 +171,28 @@ jobs:
171171
# We're going to check BOLT quotes, so get the latest version
172172
git clone https://github.com/lightning/bolts.git ../${BOLTDIR}
173173
174-
- name: Download build
174+
- name: Download
175175
uses: actions/download-artifact@v4
176176
with:
177-
name: cln-${{ matrix.CFG }}.tar.bz2
177+
name: cln-${{ matrix.CFG }}.tar.gz
178+
179+
- name: Unpack prebuilt binaries
180+
run: |
181+
git submodule sync && git submodule update --init --recursive
182+
# Make sure source appears older than what we're about to unpack
183+
find . -type f -print0 | xargs -0 touch -d yesterday
184+
tar xaf cln-${{ matrix.CFG }}.tar.gz
178185
179186
- name: Check source
180187
env:
181188
VALGRIND: 0
182189
PYTEST_OPTS: --timeout=1200 --durations=10
183190
run: |
184-
tar -xmaf cln-${{ matrix.CFG }}.tar.bz2
185-
uv run make check-source BASE_REF="origin/${{ github.base_ref }}"
191+
uv run make check-source BASE_REF="origin/${{ github.base_ref }}" CARGO=false CC=devtools/cc-nobuild SUPPRESS_GENERATION=1
186192
- name: Check Generated Files have been updated
187-
run: uv run make check-gen-updated
193+
run: uv run make check-gen-updated CARGO=false CC=devtools/cc-nobuild SUPPRESS_GENERATION=1
188194
- name: Check docs
189-
run: uv run make check-doc
195+
run: uv run make check-doc CARGO=false CC=devtools/cc-nobuild SUPPRESS_GENERATION=1
190196

191197
check-units:
192198
# The unit test checks are not in the critical path (not dependent
@@ -228,12 +234,18 @@ jobs:
228234
- name: Download build
229235
uses: actions/download-artifact@v4
230236
with:
231-
name: cln-${{ matrix.CFG }}.tar.bz2
237+
name: cln-${{ matrix.CFG }}.tar.gz
238+
239+
- name: Unpack prebuilt binaries
240+
run: |
241+
git submodule sync && git submodule update --init --recursive
242+
# Make sure source appears older than what we're about to unpack
243+
find . -type f -print0 | xargs -0 touch -d yesterday
244+
tar xaf cln-${{ matrix.CFG }}.tar.gz
232245
233246
- name: Check
234247
run: |
235-
tar -xaf cln-${{ matrix.CFG }}.tar.bz2
236-
uv run eatmydata make -j $(nproc) check-units installcheck VALGRIND=${{ matrix.VALGRIND }}
248+
uv run eatmydata make -j $(nproc) check-units installcheck VALGRIND=${{ matrix.VALGRIND }} CARGO=false CC=devtools/cc-nobuild SUPPRESS_GENERATION=1
237249
238250
check-fuzz:
239251
name: Run fuzz regression tests
@@ -336,20 +348,22 @@ jobs:
336348
- name: Download build
337349
uses: actions/download-artifact@v4
338350
with:
339-
name: cln-${{ matrix.CFG }}.tar.bz2
351+
name: cln-${{ matrix.CFG }}.tar.gz
340352

341-
- name: Unpack pre-built CLN
342-
env:
343-
CFG: ${{ matrix.CFG }}
353+
- name: Unpack prebuilt binaries
344354
run: |
345-
tar -xaf cln-${CFG}.tar.bz2
355+
git submodule sync && git submodule update --init --recursive
356+
# Make sure source appears older than what we're about to unpack
357+
find . -type f -print0 | xargs -0 touch -d yesterday
358+
tar xaf cln-${{ matrix.CFG }}.tar.gz
346359
347360
- name: Switch network
348361
if: ${{ matrix.TEST_NETWORK == 'liquid-regtest' }}
349362
run: |
350363
# Loading the network from config.vars rather than the envvar is a terrible idea...
351364
sed -i 's/TEST_NETWORK=regtest/TEST_NETWORK=liquid-regtest/g' config.vars
352365
cat config.vars
366+
touch -d yesterday config.vars
353367
354368
- name: Test
355369
env:
@@ -427,10 +441,14 @@ jobs:
427441
- name: Download build
428442
uses: actions/download-artifact@v4
429443
with:
430-
name: cln-compile-gcc.tar.bz2
444+
name: cln-compile-gcc.tar.gz
431445

432-
- name: Unpack build
433-
run: tar -xvjf cln-compile-gcc.tar.bz2
446+
- name: Unpack prebuilt binaries
447+
run: |
448+
git submodule sync && git submodule update --init --recursive
449+
# Make sure source appears older than what we're about to unpack
450+
find . -type f -print0 | xargs -0 touch -d yesterday
451+
tar xaf cln-compile-gcc.tar.gz
434452
435453
- name: Test
436454
env:
@@ -496,10 +514,14 @@ jobs:
496514
- name: Download build
497515
uses: actions/download-artifact@v4
498516
with:
499-
name: cln-compile-clang-sanitizers.tar.bz2
517+
name: cln-compile-clang-sanitizers.tar.gz
500518

501-
- name: Unpack build
502-
run: tar -xvjf cln-compile-clang-sanitizers.tar.bz2
519+
- name: Unpack prebuilt binaries
520+
run: |
521+
git submodule sync && git submodule update --init --recursive
522+
# Make sure source appears older than what we're about to unpack
523+
find . -type f -print0 | xargs -0 touch -d yesterday
524+
tar xaf cln-compile-clang-sanitizers.tar.gz
503525
504526
- name: Test
505527
run: |
@@ -540,10 +562,14 @@ jobs:
540562
- name: Download build
541563
uses: actions/download-artifact@v4
542564
with:
543-
name: cln-compile-gcc.tar.bz2
544-
- name: Unpack pre-built CLN
565+
name: cln-compile-gcc.tar.gz
566+
- name: Unpack prebuilt binaries
545567
run: |
546-
tar -xaf cln-compile-gcc.tar.bz2
568+
git submodule sync && git submodule update --init --recursive
569+
# Make sure source appears older than what we're about to unpack
570+
find . -type f -print0 | xargs -0 touch -d yesterday
571+
tar xaf cln-compile-gcc.tar.gz
572+
547573
- name: Test
548574
run: |
549575
uv run eatmydata make -j $(nproc) check-doc-examples
@@ -598,13 +624,14 @@ jobs:
598624
- name: Download build
599625
uses: actions/download-artifact@v4
600626
with:
601-
name: cln-${{ matrix.CFG }}.tar.bz2
627+
name: cln-${{ matrix.CFG }}.tar.gz
602628

603-
- name: Unpack pre-built CLN
604-
env:
605-
CFG: ${{ matrix.CFG }}
629+
- name: Unpack prebuilt binaries
606630
run: |
607-
tar -xaf cln-${CFG}.tar.bz2
631+
git submodule sync && git submodule update --init --recursive
632+
# Make sure source appears older than what we're about to unpack
633+
find . -type f -print0 | xargs -0 touch -d yesterday
634+
tar xaf cln-${{ matrix.CFG }}.tar.gz
608635
609636
- name: Test
610637
env:

0 commit comments

Comments
 (0)