Skip to content

Commit 9df9441

Browse files
ShahanaFarooquirustyrussell
authored andcommitted
ci: Move the 'update doc examples' script to a later stage in the CI pipeline
Changelog-None.
1 parent 7f73d31 commit 9df9441

File tree

3 files changed

+51
-2
lines changed

3 files changed

+51
-2
lines changed

.github/scripts/setup.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,18 @@ sudo apt-get -qq install --no-install-recommends --allow-unauthenticated -yy \
2020
gcc-arm-none-eabi \
2121
gettext \
2222
git \
23+
gnupg \
2324
jq \
2425
libc6-dev-arm64-cross \
2526
libc6-dev-armhf-cross \
27+
libev-dev \
28+
libevent-dev \
29+
libffi-dev \
30+
libicu-dev \
2631
libpq-dev \
2732
libprotobuf-c-dev \
2833
libsqlite3-dev \
34+
libssl-dev \
2935
libtool \
3036
libxml2-utils \
3137
locales \
@@ -43,6 +49,7 @@ sudo apt-get -qq install --no-install-recommends --allow-unauthenticated -yy \
4349
software-properties-common \
4450
sudo \
4551
tcl \
52+
tclsh \
4653
unzip \
4754
valgrind \
4855
wget \

.github/workflows/ci.yaml

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ jobs:
8888
- name: Check source
8989
env:
9090
VALGRIND: 0
91-
GENERATE_EXAMPLES: 1
9291
PYTEST_OPTS: --timeout=1200
9392
run: make check-source BASE_REF="origin/${{ github.base_ref }}"
9493
- name: Check Generated Files have been updated
@@ -480,6 +479,48 @@ jobs:
480479
run: |
481480
poetry run pytest tests/ -vvv -n 2 ${PYTEST_OPTS} ${{ matrix.PYTEST_OPTS }}
482481
482+
update-docs-examples:
483+
name: Update examples in doc schemas
484+
runs-on: ubuntu-22.04
485+
timeout-minutes: 30
486+
strategy:
487+
fail-fast: true
488+
env:
489+
VALGRIND: 0
490+
GENERATE_EXAMPLES: 1
491+
PYTEST_OPTS: --timeout=1200
492+
TEST_NETWORK: regtest
493+
needs:
494+
- compile
495+
steps:
496+
- name: Checkout
497+
uses: actions/checkout@v4
498+
- name: Set up Python 3.10
499+
uses: actions/setup-python@v5
500+
with:
501+
python-version: '3.10'
502+
- name: Install dependencies
503+
run: |
504+
bash -x .github/scripts/setup.sh
505+
pip install -U pip wheel poetry
506+
poetry self add poetry-plugin-export
507+
poetry export -o /tmp/requirements.txt --without-hashes --with dev
508+
pip install -r /tmp/requirements.txt
509+
- name: Install bitcoind
510+
env:
511+
TEST_NETWORK: regtest
512+
run: .github/scripts/install-bitcoind.sh
513+
- name: Download build
514+
uses: actions/download-artifact@v4
515+
with:
516+
name: cln-compile-gcc.tar.bz2
517+
- name: Unpack pre-built CLN
518+
run: |
519+
tar -xaf cln-compile-gcc.tar.bz2
520+
- name: Test
521+
run: |
522+
make -j $(nproc) check-doc-examples
523+
483524
min-btc-support:
484525
name: Test minimum supported BTC v${{ matrix.MIN_BTC_VERSION }} with ${{ matrix.NAME }}
485526
runs-on: ubuntu-22.04
@@ -582,6 +623,7 @@ jobs:
582623
- check-units
583624
- integration-valgrind
584625
- integration-sanitizers
626+
- update-docs-examples
585627
- min-btc-support
586628
- check-flake
587629
steps:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ check-doc-examples: update-doc-examples
595595
git diff --exit-code HEAD
596596

597597
# For those without working cppcheck
598-
check-source-no-cppcheck: check-makefile check-source-bolt check-whitespace check-spelling check-python check-includes check-shellcheck check-setup_locale check-tmpctx check-discouraged-functions check-amount-access check-doc-examples
598+
check-source-no-cppcheck: check-makefile check-source-bolt check-whitespace check-spelling check-python check-includes check-shellcheck check-setup_locale check-tmpctx check-discouraged-functions check-amount-access
599599

600600
check-source: check-source-no-cppcheck
601601

0 commit comments

Comments
 (0)