Skip to content

Commit

Permalink
ci: Move the 'update doc examples' script to a later stage in the CI …
Browse files Browse the repository at this point in the history
…pipeline

Changelog-None.
  • Loading branch information
ShahanaFarooqui authored and rustyrussell committed Jan 29, 2025
1 parent 7f73d31 commit 9df9441
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,18 @@ sudo apt-get -qq install --no-install-recommends --allow-unauthenticated -yy \
gcc-arm-none-eabi \
gettext \
git \
gnupg \
jq \
libc6-dev-arm64-cross \
libc6-dev-armhf-cross \
libev-dev \
libevent-dev \
libffi-dev \
libicu-dev \
libpq-dev \
libprotobuf-c-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libxml2-utils \
locales \
Expand All @@ -43,6 +49,7 @@ sudo apt-get -qq install --no-install-recommends --allow-unauthenticated -yy \
software-properties-common \
sudo \
tcl \
tclsh \
unzip \
valgrind \
wget \
Expand Down
44 changes: 43 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ jobs:
- name: Check source
env:
VALGRIND: 0
GENERATE_EXAMPLES: 1
PYTEST_OPTS: --timeout=1200
run: make check-source BASE_REF="origin/${{ github.base_ref }}"
- name: Check Generated Files have been updated
Expand Down Expand Up @@ -480,6 +479,48 @@ jobs:
run: |
poetry run pytest tests/ -vvv -n 2 ${PYTEST_OPTS} ${{ matrix.PYTEST_OPTS }}
update-docs-examples:
name: Update examples in doc schemas
runs-on: ubuntu-22.04
timeout-minutes: 30
strategy:
fail-fast: true
env:
VALGRIND: 0
GENERATE_EXAMPLES: 1
PYTEST_OPTS: --timeout=1200
TEST_NETWORK: regtest
needs:
- compile
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
bash -x .github/scripts/setup.sh
pip install -U pip wheel poetry
poetry self add poetry-plugin-export
poetry export -o /tmp/requirements.txt --without-hashes --with dev
pip install -r /tmp/requirements.txt
- name: Install bitcoind
env:
TEST_NETWORK: regtest
run: .github/scripts/install-bitcoind.sh
- name: Download build
uses: actions/download-artifact@v4
with:
name: cln-compile-gcc.tar.bz2
- name: Unpack pre-built CLN
run: |
tar -xaf cln-compile-gcc.tar.bz2
- name: Test
run: |
make -j $(nproc) check-doc-examples
min-btc-support:
name: Test minimum supported BTC v${{ matrix.MIN_BTC_VERSION }} with ${{ matrix.NAME }}
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -582,6 +623,7 @@ jobs:
- check-units
- integration-valgrind
- integration-sanitizers
- update-docs-examples
- min-btc-support
- check-flake
steps:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ check-doc-examples: update-doc-examples
git diff --exit-code HEAD

# For those without working cppcheck
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
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-source: check-source-no-cppcheck

Expand Down

0 comments on commit 9df9441

Please sign in to comment.