Skip to content

Commit 06f7a80

Browse files
committed
CI: add test that we can downgrade the node and run it under v25.09.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent 5a095b0 commit 06f7a80

File tree

1 file changed

+72
-1
lines changed

1 file changed

+72
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ jobs:
213213
name: Run fuzz regression tests
214214
runs-on: ubuntu-22.04
215215
needs:
216-
- prebuild
216+
- compile
217217
steps:
218218
- name: Checkout
219219
uses: actions/checkout@v4
@@ -235,6 +235,75 @@ jobs:
235235
./configure --enable-debugbuild --enable-fuzzing --enable-address-sanitizer --enable-ub-sanitizer --disable-valgrind CC=clang
236236
uv run make -j $(nproc) check-fuzz
237237
238+
check-downgrade:
239+
name: Check we can downgrade the node
240+
runs-on: ubuntu-22.04
241+
needs:
242+
- prebuild
243+
steps:
244+
- name: Checkout
245+
uses: actions/checkout@v4
246+
247+
- name: Set up Python 3.10
248+
uses: actions/setup-python@v5
249+
with:
250+
python-version: "3.10"
251+
252+
- name: Install uv
253+
uses: astral-sh/setup-uv@v5
254+
255+
- name: Install dependencies
256+
run: |
257+
bash -x .github/scripts/setup.sh
258+
259+
- name: Install bitcoind
260+
env:
261+
TEST_NETWORK: ${{ matrix.TEST_NETWORK }}
262+
run: .github/scripts/install-bitcoind.sh
263+
264+
- name: Download build
265+
uses: actions/download-artifact@v4
266+
with:
267+
name: cln-${{ matrix.CFG }}.tar.bz2
268+
269+
- name: Unpack pre-built CLN
270+
env:
271+
CFG: ${{ matrix.CFG }}
272+
run: |
273+
tar -xaf cln-${CFG}.tar.bz2
274+
275+
- name: Fetch and unpack previous CLN
276+
run: |
277+
mkdir /tmp/old-cln
278+
cd /tmp/old-cln
279+
wget https://github.com/ElementsProject/lightning/releases/download/v25.09/clightning-v25.09-Ubuntu-22.04-amd64.tar.xz
280+
tar -xaf clightning-v25.09-Ubuntu-22.04-amd64.tar.xz
281+
282+
- name: Switch network
283+
if: ${{ matrix.TEST_NETWORK == 'liquid-regtest' }}
284+
run: |
285+
# Loading the network from config.vars rather than the envvar is a terrible idea...
286+
sed -i 's/TEST_NETWORK=regtest/TEST_NETWORK=liquid-regtest/g' config.vars
287+
cat config.vars
288+
289+
- name: Test
290+
env:
291+
COMPILER: ${{ matrix.COMPILER }}
292+
EXPERIMENTAL_DUAL_FUND: ${{ matrix.EXPERIMENTAL_DUAL_FUND }}
293+
COMPAT: 1
294+
CFG: ${{ matrix.CFG }}
295+
SLOW_MACHINE: 1
296+
PYTEST_PAR: 10
297+
TEST_DEBUG: 1
298+
TEST_DB_PROVIDER: ${{ matrix.TEST_DB_PROVIDER }}
299+
TEST_NETWORK: ${{ matrix.TEST_NETWORK }}
300+
LIGHTNINGD_POSTGRES_NO_VACUUM: 1
301+
PREV_LIGHTNINGD: /tmp/old-cln/usr/bin/lightningd
302+
run: |
303+
env
304+
cat config.vars
305+
VALGRIND=0 uv run eatmydata pytest tests/test_downgrade.py -vvv -n ${PYTEST_PAR} ${PYTEST_OPTS}
306+
238307
integration:
239308
name: Test CLN ${{ matrix.name }}
240309
runs-on: ubuntu-22.04
@@ -627,6 +696,7 @@ jobs:
627696
- integration-valgrind
628697
- integration-sanitizers
629698
- min-btc-support
699+
- check-downgrade
630700
if: ${{ always() }}
631701
steps:
632702
- name: Complete
@@ -638,6 +708,7 @@ jobs:
638708
SANITIZERS: ${{ needs['integration-sanitizers'].result }}
639709
DOCS: ${{ needs['update-docs-examples'].result }}
640710
BTC: ${{ needs['min-btc-support'].result }}
711+
CHECK_DOWNGRADE: ${{ needs['check-downgrade'].result }}
641712
run: |
642713
failed=""
643714
for name in $JOB_NAMES; do

0 commit comments

Comments
 (0)