From 9df9441aa340593719fb530274bcbbbad1fce0c2 Mon Sep 17 00:00:00 2001 From: ShahanaFarooqui Date: Fri, 24 Jan 2025 20:56:16 -0800 Subject: [PATCH] ci: Move the 'update doc examples' script to a later stage in the CI pipeline Changelog-None. --- .github/scripts/setup.sh | 7 +++++++ .github/workflows/ci.yaml | 44 ++++++++++++++++++++++++++++++++++++++- Makefile | 2 +- 3 files changed, 51 insertions(+), 2 deletions(-) diff --git a/.github/scripts/setup.sh b/.github/scripts/setup.sh index d69172372624..ef7556964c31 100755 --- a/.github/scripts/setup.sh +++ b/.github/scripts/setup.sh @@ -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 \ @@ -43,6 +49,7 @@ sudo apt-get -qq install --no-install-recommends --allow-unauthenticated -yy \ software-properties-common \ sudo \ tcl \ + tclsh \ unzip \ valgrind \ wget \ diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a8f0df1ccf78..7a2f455ecbd2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 @@ -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 @@ -582,6 +623,7 @@ jobs: - check-units - integration-valgrind - integration-sanitizers + - update-docs-examples - min-btc-support - check-flake steps: diff --git a/Makefile b/Makefile index 0198ec82118c..b1a9f8a219ac 100644 --- a/Makefile +++ b/Makefile @@ -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