Commit Graph

219 Commits

Author SHA1 Message Date
Rusty Russell
a97527212c GitHub: fix "Automerge" button to *actually* depend on tests passing.
I've been bitten by this several times: skipping the test seems to make it OK
for GH!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-05-11 11:25:40 +09:30
Rusty Russell
1521b92e41 CI: Use eatmydata to speed up test runs.
We don't care about data persistence, and this suppresses all sync calls (speeding
sqlite3 specifically).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-05-08 14:01:38 +09:30
Rusty Russell
b472baeab5 CI: don't wait on update-docs-examples
It's disabled.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-05-08 14:01:38 +09:30
Rusty Russell
1125130db0 CI: don't abandon other runs just because one fails.
This significantly slows down the cycle when we have flakes (it's good if
the tree is completely broken though!).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-05-08 14:01:38 +09:30
Rusty Russell
5778083cbd CI: disable the doc check for now.
It's not completely stable, which is OK, and we will solve this next release.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-05-02 13:25:11 -07:00
Rusty Russell
675ac14986 CI: Install protobuf on FreeBSD
```
cargo build --quiet --example cln-plugin-startup
  error: failed to run custom build command for `cln-grpc v0.4.0 (/home/runner/work/lightning/lightning/cln-grpc)`

  Caused by:
    process didn't exit successfully: `/home/runner/work/lightning/lightning/target/debug/build/cln-grpc-1c0900b8d6f448d4/build-script-build` (exit status: 101)
    --- stdout
    cargo:rerun-if-changed=proto/node.proto
    cargo:rerun-if-changed=proto

    --- stderr

    thread 'main' panicked at cln-grpc/build.rs:7:10:
    called `Result::unwrap()` on an `Err` value: Custom { kind: NotFound, error: "Could not find `protoc`. If `protoc` is installed, try setting the `PROTOC` environment variable to the path of the `protoc` binary. Try installing `protobuf-compiler` or `protobuf` using your package manager. It is also available at https://github.com/protocolbuffers/protobuf/releases  For more information: https://docs.rs/prost-build/#sourcing-protoc" }
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  gmake: *** [cln-rpc/Makefile:15: target/debug/examples/cln-plugin-startup] Error 101
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-04-23 09:21:43 +09:30
Rusty Russell
fe3ee1e4e6 CI: mark external subdirs safe for FreeBSD build
```
fatal: detected dubious ownership in repository at '/home/runner/work/lightning/lightning/external/libwally-core'
  To add an exception for this directory, call:

  	git config --global --add safe.directory /home/runner/work/lightning/lightning/external/libwally-core
  Reinitializing submodules src/secp256k1 ...
  fatal: detected dubious ownership in repository at '/home/runner/work/lightning/lightning/external/libwally-core'
  To add an exception for this directory, call:

  	git config --global --add safe.directory /home/runner/work/lightning/lightning/external/libwally-core
  fatal: detected dubious ownership in repository at '/home/runner/work/lightning/lightning/external/libwally-core'
  To add an exception for this directory, call:

  	git config --global --add safe.directory /home/runner/work/lightning/lightning/external/libwally-core
  gmake: *** [external/Makefile:65: submodcheck] Error 128
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-04-23 09:21:43 +09:30
Rusty Russell
afe911173a CI: install jq for FreeBSD build.
```
  checking for jq... not found
  *** We need jq!
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-04-23 09:21:43 +09:30
Rusty Russell
d201bdacea ci: install pkg-config for FreeBSD.
```
      | -- Found Python: /tmp/tmpyjjd1wyq/.venv/bin/python (found suitable version "3.11.11", minimum required is "3") found components: Interpreter Development.Module Development.SABIModule
      | CMake Error at /tmp/tmpyjjd1wyq/.venv/lib/python3.11/site-packages/cmake/data/share/cmake-4.0/Modules/FindPackageHandleStandardArgs.cmake:227 (message):
      |   Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
      | Call Stack (most recent call first):
      |   /tmp/tmpyjjd1wyq/.venv/lib/python3.11/site-packages/cmake/data/share/cmake-4.0/Modules/FindPackageHandleStandardArgs.cmake:591 (_FPHSA_FAILURE_MESSAGE)
      |   /tmp/tmpyjjd1wyq/.venv/lib/python3.11/site-packages/cmake/data/share/cmake-4.0/Modules/FindPkgConfig.cmake:110 (find_package_handle_standard_args)
      |   CMakeLists.txt:35 (find_package)
      |
      |
      | -- Configuring incomplete, errors occurred!
      | Traceback (most recent call last):
      |   File "/root/.local/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
      |     main()
      |   File "/root/.local/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in main
      |     json_out["return_val"] = hook(**hook_input["kwargs"])
      |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/root/.local/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 280, in build_wheel
      |     return _build_backend().build_wheel(
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/tmp/tmpyjjd1wyq/.venv/lib/python3.11/site-packages/hatchling/build.py", line 58, in build_wheel
      |     return os.path.basename(next(builder.build(directory=wheel_directory, versions=['standard'])))
      |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |   File "/tmp/tmpyjjd1wyq/.venv/lib/python3.11/site-packages/hatchling/builders/plugin/interface.py", line 147, in build
      |     build_hook.initialize(version, build_data)
      |   File "/tmp/tmpyjjd1wyq/.venv/lib/python3.11/site-packages/scikit_build_core/hatch/plugin.py", line 125, in initialize
      |     self._initialize(build_data=build_data)
      |   File "/tmp/tmpyjjd1wyq/.venv/lib/python3.11/site-packages/scikit_build_core/hatch/plugin.py", line 228, in _initialize
      |     builder.configure(
      |   File "/tmp/tmpyjjd1wyq/.venv/lib/python3.11/site-packages/scikit_build_core/builder/builder.py", line 283, in configure
      |     self.config.configure(
      |   File "/tmp/tmpyjjd1wyq/.venv/lib/python3.11/site-packages/scikit_build_core/cmake.py", line 254, in configure
      |     raise FailedLiveProcessError(msg) from None
      | scikit_build_core.errors.FailedLiveProcessError: CMake configuration failed

  Note: This error originates from the build backend, and is likely not a problem with poetry but one of the following issues with coincurve (20.0.0)

    - not supporting PEP 517 builds
    - not specifying PEP 517 build requirements correctly
    - the build requirements are incompatible with your operating system or Python version
    - the build requirements are missing system dependencies (eg: compilers, libraries, headers).

  You can verify this by running pip wheel --no-cache-dir --use-pep517 "coincurve (==20.0.0)".
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-04-23 09:21:43 +09:30
Rusty Russell
e320c21948 CI: Try to ensure that poetry can find rust to build packages.
No, really:

```
IsolatedBuildInstallError
    Failed to install maturin>=1.2,<2.0.

    Output:
    Updating dependencies
    Resolving dependencies...

    Package operations: 1 install, 0 updates, 0 removals

      - Installing maturin (1.8.3)

    PEP517 build of a dependency failed

    Backend subprocess exited when trying to invoke build_wheel

        | Command '['/tmp/tmp0qxx7olq/.venv/bin/python', '/root/.local/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py', 'build_wheel', '/tmp/tmpu1wwwrff']' returned non-zero exit status 1.
        |
        | /tmp/tmp0qxx7olq/.venv/lib/python3.11/site-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated
        | !!
        |
        |         ********************************************************************************
        |         Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0).
        |
        |         By 2026-Feb-18, you need to update your project and remove deprecated calls
        |         or your builds will no longer be supported.
        |
        |         See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
        |         ********************************************************************************
        |
        | !!
        |   corresp(dist, value, root_dir)
        | running bdist_wheel
        | running build
        | running build_py
        | creating build/lib.freebsd-14.2-RELEASE-amd64-cpython-311/maturin
        | copying maturin/__init__.py -> build/lib.freebsd-14.2-RELEASE-amd64-cpython-311/maturin
        | copying maturin/__main__.py -> build/lib.freebsd-14.2-RELEASE-amd64-cpython-311/maturin
        | running egg_info
        | writing maturin.egg-info/PKG-INFO
        | writing dependency_links to maturin.egg-info/dependency_links.txt
        | writing requirements to maturin.egg-info/requires.txt
        | writing top-level names to maturin.egg-info/top_level.txt
        | reading manifest file 'maturin.egg-info/SOURCES.txt'
        | reading manifest template 'MANIFEST.in'
        | warning: no files found matching '*.json' under directory 'src/python_interpreter'
        | writing manifest file 'maturin.egg-info/SOURCES.txt'
        | running build_ext
        | running build_rust
        | error: can't find Rust compiler
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-04-23 09:21:43 +09:30
Rusty Russell
0aa0efc989 CI: fix FreeBSD to use poetry to build.
Did this ever work?

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-04-23 09:21:43 +09:30
Rusty Russell
e63dca5078 CI: don't try to copy files out of FreeBSD VM
```
...
  skipping non-regular file "lightning/lightning/ccan/ccan/short_types/LICENSE"
  skipping non-regular file "lightning/lightning/ccan/ccan/str/LICENSE"
  skipping non-regular file "lightning/lightning/ccan/ccan/str/base32/LICENSE"
  skipping non-regular file "lightning/lightning/ccan/ccan/str/hex/LICENSE"
  skipping non-regular file "lightning/lightning/ccan/ccan/strmap/LICENSE"
  skipping non-regular file "lightning/lightning/ccan/ccan/structeq/LICENSE"
  skipping non-regular file "lightning/lightning/ccan/ccan/take/LICENSE"
  skipping non-regular file "lightning/lightning/ccan/ccan/tal/LICENSE"
  skipping non-regular file "lightning/lightning/ccan/ccan/tal/grab_file/LICENSE"
  skipping non-regular file "lightning/lightning/ccan/ccan/tal/link/LICENSE"
  skipping non-regular file "lightning/lightning/ccan/ccan/tal/path/LICENSE"
  skipping non-regular file "lightning/lightning/ccan/ccan/tal/str/LICENSE"
  skipping non-regular file "lightning/lightning/ccan/ccan/tcon/LICENSE"
  skipping non-regular file "lightning/lightning/ccan/ccan/time/LICENSE"
  skipping non-regular file "lightning/lightning/ccan/ccan/timer/LICENSE"
  skipping non-regular file "lightning/lightning/ccan/ccan/typesafe_cb/LICENSE"
  skipping non-regular file "lightning/lightning/ccan/ccan/utf8/LICENSE"
  skipping non-regular file "lightning/lightning/doc/CHANGELOG.md"
  skipping non-regular file "lightning/lightning/doc/LICENSE.md"

  sent 583 bytes  received 1,319,490 bytes  880,048.67 bytes/sec
  total size is 62,270,071  speedup is 47.17
Error: The process '/usr/bin/bash' failed with exit code 1
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-04-23 09:21:43 +09:30
Rusty Russell
730697ef07 CI: don't download bitcoind for FreeBSD build.
It didn't work, and it was downloading the Linux binary anyway!

```
  2025-04-11 02:37:12 (1.61 MB/s) - ‘bitcoin-27.1-x86_64-linux-gnu.tar.gz’ saved [48920073/48920073]

  tar: Error opening archive: Failed to open 'bitcoin-27.1-x86_64-linux-gnu.tar.bz2'
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-04-23 09:21:43 +09:30
Rusty Russell
36cbdae608 CI: update freebsd test to python 3.10.
```
 12 MiB to be downloaded.
  [1/1] Fetching pkg-2.1.0.pkg: .......... done
  Checking integrity... done (0 conflicting)
  [1/1] Upgrading pkg from 1.21.3 to 2.1.0...
  [1/1] Extracting pkg-2.1.0: .......... done
  Updating FreeBSD repository catalogue...
  FreeBSD repository is up to date.
  All repositories are up to date.
  pkg: No packages available to install matching 'python38' have been found in the repositories
  Error: The process '/usr/bin/bash' failed with exit code 1
```

Changelog-None: CI only
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-04-23 09:21:43 +09:30
ShahanaFarooqui
9da6487246 github: Remove prefix from docs and actions
Changelog-Changed: Removed lightning- prefix from schemas/.json and doc/.md files.
2025-04-15 15:17:14 +09:30
ShahanaFarooqui
260d62482b ci: Checkout with fresh tags in case the old tag reference is corrupted
The workflow fails to trigger manually after recreating the release tag. It should support re-running even if the tag was previously deleted and recreated.

Changelog-None.
2025-04-04 17:04:22 -05:00
ShahanaFarooqui
d40191eeb6 ci: Fixed python to version 3.10
The pypi publishing failed due to `ERROR: No matching distribution found for poetry==2.1.1`. Fixing Python version resolves the issue.
2025-03-05 18:25:24 -06:00
ShahanaFarooqui
9df9441aa3 ci: Move the 'update doc examples' script to a later stage in the CI pipeline
Changelog-None.
2025-01-30 09:34:59 +10:30
ShahanaFarooqui
b1fbbb0405 ci: Version update for Fedora reproducible build
Closes #7902.

Changelog-None.
2025-01-28 14:50:45 +10:30
ShahanaFarooqui
32a991acaf ci: Send email if the reproducible build process fails
Changelog-None.
2025-01-24 16:52:56 +10:30
ShahanaFarooqui
2f64283945 github: Checkout action triggering branch
To ensure the workflow uses updated files, including the Dockerfile, from the same branch for testing.
2025-01-15 10:36:43 -08:00
ShahanaFarooqui
c1484a65c2 ci: Fix for FreeBSD workflow
Changelog-None.
2025-01-13 12:36:51 -08:00
ShahanaFarooqui
740b7125de ci: Install poetry-plugin-export for poetry export command
Poetry will no longer include the `poetry-plugin-export` plugin by default, which is essential for exporting dependencies. So, we now need to install it explicitly.
2025-01-09 11:15:05 +01:00
ShahanaFarooqui
127ceb6ddb ci: Lock MacOS and poetry versions 2025-01-09 11:15:05 +01:00
ShahanaFarooqui
9c34bd6108 ci: Lock Ubuntu version on 22.04
These workflows are failing due to `ubuntu-latest` being updated from version `22.04` to `24.04`.

Reference: https://github.com/actions/runner-images/issues/10636

Changelog-None.
2025-01-09 11:15:05 +01:00
Rusty Russell
5c53ed73fb CI: disable --force-flaky.
This should help us fix the flakes.  Dealing with them was a major
headache at the end of the last release (and they covered up real bugs!).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-12-20 15:36:07 +10:30
ShahanaFarooqui
2791c60bb2 ci: Removed branch testing due to checkout confusion between branch vs tag
- Removed branch testing as it is not required. Point releases will trigger the event due to `tag` push even when it is not from master branch.

- Added version in inputs for testing

- Added missing `inputs` tag

Changelog-None.
2024-12-03 21:32:22 +10:30
Se7enZ
42d43b2708 build: Prepare release draft in Github actions. 2024-12-03 11:56:23 +10:30
Se7enZ
1f31aa73fa build: Sign aggregate release artifact from Github. 2024-12-03 11:56:23 +10:30
Se7enZ
b9b81c6918 build: Matrix strategy for release builds ([#7776]).
Also modifies the `build-release.sh` script to optionally
accept specific distribution targets for Ubuntu releases.
2024-12-03 11:56:23 +10:30
Se7enZ
c99b72da1c build: Release build automation ([#7776]).
Changelog-None
2024-12-03 11:56:23 +10:30
ShahanaFarooqui
0a7956b6d4 ci: Add GENERATE_EXAMPLES env in CI & docker build script 2024-11-28 15:56:16 +10:30
ShahanaFarooqui
fffafe53eb make: Add check-doc-examples in Makefile for check-source 2024-11-26 21:45:19 +10:30
ShahanaFarooqui
047eb8bbeb ci: Update Python version from 3.8 to 3.10
Changelog-None.
2024-11-19 09:05:55 +10:30
ShahanaFarooqui
4bff697be9 ci: Update Ubuntu version from 20.04 to 22.04 2024-11-19 09:05:55 +10:30
ShahanaFarooqui
92064706c7 ci: Fixed handling of special characters in PR descriptions while searching for change log none. 2024-11-06 13:48:12 +10:30
ShahanaFarooqui
93ba08a537 github: Check if change entry is logged in PR description 2024-11-03 13:15:13 +10:30
ShahanaFarooqui
859f795168 repro: focal modded fix
- Locked grpcio-tools version to fix dirty tree issue. Ref: https://github.com/ElementsProject/lightning/pull/7376#issuecomment-2161102381

- Updated python version to 3.10 for future proofing

- Added manual dispatch for github action
2024-10-31 20:26:30 -07:00
Se7enZ
814c838cae build: Repro build matrix strategy for focal, jammy and noble. ([#7117])
Changelog-None
2024-10-31 20:26:30 -07:00
Se7enZ
f7d3b0bf5a build: Nightly repro build for Ubuntu Noble. 2024-10-31 20:26:30 -07:00
Joseph Goulden
2056478e56 build: Add simple flake
Changelog-Added: Nix users can now install CLN from the new flake.
2024-10-21 16:56:02 +02:00
ShahanaFarooqui
910c014183 ci: Prebuild action fails if Changelog is missing from all commits of a PR
Changelog-None.
2024-10-08 18:31:40 +02:00
ShahanaFarooqui
1a71e15cf3 github: Read tag on HEAD in Github Actions
Running `git describe` in local setup correctly identifies the tag available on the tag. But `docker buildx` via actions does not identify it without `--tags` param.

Reference Issue: https://github.com/ElementsProject/lightning/issues/7626

Changelog-Fixed: Docker image created via github actions correctly reads the tag available on the HEAD.
2024-09-05 12:31:49 -07:00
ShahanaFarooqui
bb72ad39b1 github: Actions trigger of tag push
Changelog-Fixed: Regex expression for github actions tags push trigger.
2024-09-05 12:31:49 -07:00
ShahanaFarooqui
382b496c5f github: Update FreeBSD Test
- Passing bitcoind version from matrix

- cleanup: Removed extra tabs and `-` from pypi.yml

Changelog-Fixed: Github action for FreeBSD setup
2024-08-22 20:42:29 +09:30
ShahanaFarooqui
3a4dd5f032 github: Update Github actions for Pypi publishing
Changelog-Fixed: Fixed the already existing Pypi publishing actions file.
2024-08-21 10:06:49 -07:00
ShahanaFarooqui
5d1b5b5faa docker: GitHub actions testing for docker release
- Temporarily adding `rc` tag trigger for testing `Build and push multi-platform docker images` action flow before the final release.

- Added some variable inputs for testing like repo, platforms, etc.

- Added more logs for future debugging.
2024-08-20 21:25:07 -07:00
daywalker90
0a73f918c1 macos: fix ci and autoclean
Changelog-None
2024-08-07 10:57:26 +09:30
ShahanaFarooqui
1e1d072b65 ci: Adding new step to run basic tests on minimum supported BTC version
As suggested by @rustyrussell, Adding another step for testing minimum supported Bitcoin version with clang test suite.

Changelog-None.
2024-07-16 16:10:51 -05:00
Rusty Russell
c30502779e CI: set elements and bitcoind versions in one place.
We have them spread everywhere: unify them, and make setup.sh use install-bitcoind.sh

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-06-25 09:36:00 +09:30