Commit Graph

180 Commits

Author SHA1 Message Date
Rusty Russell 55d6eb6762 CI: run 2, not 3 UBSAN/ASAN pytests at once.
It seems to reliably be getting a SIGTERM after 17-18 minutes:

```
[gw1] [ 91%] PASSED tests/test_plugin.py::test_forward_event_notification
Error: Process completed with exit code 143.
```

Perhaps this is out of mem?  So, try -n2.  We also make the configure
line explicit, rather than relying on environment vars (we should probably
do this for the other cases, too)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-06-22 13:23:21 +09:30
Rusty Russell c1d35cc0c8 Revert "CI: allow postgres and ASAN longer to run."
This reverts commit 2123a057ac9ad37dfc36f003974bf8238de842f2.
2023-06-20 17:24:48 +09:30
Rusty Russell 0c3757f3a8 CI: allow postgres and ASAN longer to run.
It seems to time out on tests/test_connection.py::test_feerate_stress.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-06-20 17:24:48 +09:30
Rusty Russell 34b9786076 CI: suppress Postgres vacuuming during tests.
build.sh did this, but we didn't carry it across to the new test
matrix, leading to spurious CI failures:

```
lightningd-1 2023-06-06T16:15:34.931Z DEBUG   plugin-bookkeeper: Setting up database at ***localhost:39061/accounts_0_7ccmg745
lightningd-1 2023-06-06T16:15:34.931Z INFO    plugin-bookkeeper: Creating database
lightningd-1 2023-06-06T16:15:34.931Z **BROKEN** plugin-bookkeeper: Error vacuuming db: VACUUM command failed: ERROR:  deadlock detected\nDETAIL:  Process 77248 waits for AccessShareLock on relation 1260 of database 0; blocked by process 77414.\nProcess 77414 waits for RowExclusiveLock on relation 1214 of database 0; blocked by process 77248.\nHINT:  See server log for query details.\n
lightningd-1 2023-06-06T16:15:34.931Z INFO    plugin-bookkeeper: Killing plugin: exited before replying to init
lightningd-1 2023-06-06T16:15:34.931Z **BROKEN** plugin-bookkeeper: Plugin marked as important, shutting down lightningd!
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-06-20 17:24:48 +09:30
Rusty Russell cc76cfbb4b CI: Remove unused CI build script.
We now do this directly in .github/workflows

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-06-20 17:24:48 +09:30
Vincenzo Palazzo 0b671fb144 Revert "ci: re-enable the compilation workflow"
This reverts commit 1b6f3d687f.
2023-06-14 15:01:53 +02:00
Vincenzo Palazzo 2bf3db623a Revert "ci: add the pre-build check as dependencies on lnprototetest"
This reverts commit 00d9f28a85.
2023-06-14 15:01:53 +02:00
Vincenzo Palazzo 8b30c34d48 ci: add the pre-build check as dependencies on lnprototetest
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-06-14 13:21:48 +02:00
Vincenzo Palazzo 1b6f3d687f ci: re-enable the compilation workflow
This enable again the compilation workflow
and add the dependencies to the pre-check

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-06-14 13:21:48 +02:00
Matt Morehouse 4b6c5c06e7 ci: run integration tests with sanitizers
Running with sanitizers in CI will help prevent us from introducing new
memory safety errors.
2023-06-07 18:47:40 +02:00
Matt Morehouse 117b80d508 ci: run unit tests with sanitizers
Running with sanitizers in CI will help prevent us from introducing new
memory safety errors.
2023-06-07 18:47:40 +02:00
Adi Shankara e83782f5de doc: Add guides and GitHub workflow for doc sync
This PR:
- adds all the guides (in markdown format) that is published at https://docs.corelightning.org/docs
- adds a github workflow to sync any future changes made to files inside the guides folder
- does not include API reference (json-rpc commands). Those will be handled in a separate PR since they're used as manpages and will require a different github workflow

Note that the guides do not exactly map to their related files in doc/, since we reorganized the overall documentation structure on readme for better readability and developer experience. For example, doc/FUZZING.md and doc/HACKING.md#Testing are merged into testing.md in the new docs. As on the creation date of this PR, content from each of the legacy documents has been synced with the new docs. Until this PR gets merged, I will continue to push any updates made to the legacy documents into the new docs.

If this looks reasonable, I will add a separate PR to clean up the legacy documents from doc/ (or mark them deprecated) to avoid redundant upkeep and maintenance.

Changelog-None
2023-06-06 12:40:19 +09:30
Rusty Russell e0d2c39565 CI: use rebasing instead of merge.
This reflects what we actually do when we apply the commit, and also
means we can easily iterate the commits.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-06-05 09:25:57 +09:30
fanquake 5aa7634753 ci: use Bitcoin Core 25.0 2023-05-30 09:12:43 +09:30
Rusty Russell cd222f8c57 CI: restore dual-funding tests.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-05-29 13:46:21 +09:30
Jon Griffiths 8b4136bad5 build: remove gmp
Core and secp have not used gmp for a very long time now (core disabled
it in 2015).

Signed-off-by: Jon Griffiths <jon_p_griffiths@yahoo.com>
2023-05-24 18:21:43 +09:30
Rusty Russell e7d4c3175a build: remove --enable-experimental-features / EXPERIMENTAL_FEATURES
Changelog-EXPERIMENTAL: Build: all experimental features are now runtime-enabled; no more ./configure --enable-experimental-features
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-05-23 09:34:08 +09:30
fanquake dff2dd259e ci: use Bitcoin Core 24.1 2023-05-21 12:46:01 +02:00
Rusty Russell 0850cbb5bb CI: re-add python timeout.
Without this, a stuck test (such as before the previous commit, where a plugin crashed
when running a command) simply gets timed out by the full CI timeout.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-05-19 14:17:44 +02:00
Matt Morehouse 3c4b20e3a3 ci: run fuzz regression tests
There are several benefits of doing this:
- prevent fuzz target bit rot
- more test coverage in CI
- greater visibility of fuzz tests, encouraging contributions to the
  seed corpus and tests themselves
2023-04-11 21:46:00 -07:00
Greg Sanders cb7caa3139 Re-enable PSBT tests for Liquid except test_sign_and_send_psbt 2023-03-23 16:10:55 +10:30
Vincenzo Palazzo ba4f0c8dab ci: add timeout field to 2h for each task
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-03-20 10:43:35 +10:30
Vincenzo Palazzo b7ab80963d ci: include rust tests inside the pre build checks
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-02-08 16:33:26 -06:00
Greg Sanders 813401b2a6 Update Bitcoin Core to 24.0.1 in other git ci locations 2023-02-07 16:29:00 -06:00
Christian Decker f2cd635175 gci: Re-Add `TEST_NETWORK=liquid-regtest` to CI run
My bad for forgetting it in the Rework CI.

Changelog-None
Suggested-by: Greg Sanders <@instagibbs>
2023-02-05 09:39:11 +01:00
Greg Sanders 296cf181af Update CI to Bitcoin Core 24.0.1 2023-02-05 15:39:50 +10:30
Christian Decker e3a9bda301 ci: Downgrade the upload-artifact action to v2.2.4
There seem to be a couple of issues with Bad Requests with later
versions, trying this :-)
2023-01-16 13:53:48 +10:30
Christian Decker b0e3d483e6 gci: Add a test for the postgres backend 2023-01-16 13:53:48 +10:30
Christian Decker 383fca7d0e gci: Add an explicit name to the matrix for display
This is going to be useful to discern what goal the job has.
2023-01-16 13:53:48 +10:30
Christian Decker e17611c570 gci: Split out installation of elements and bitcoin into a script
It was crowding the github workflow file
2023-01-16 13:53:48 +10:30
Christian Decker e76618e2a6 ci: Use bzip2 and release to reduce artifact size 2023-01-16 13:53:48 +10:30
Christian Decker b40fd3efbd ci: Add gather step
We can require a status to be successful in PRs, but they are
referenced by name, and so we'd have to add each matrix job as
required. That's rather cumbersome, so have this artificial gather
step at the end which signals success on the entire run.
2023-01-16 13:53:48 +10:30
Christian Decker ca3053707f ci: Build and test in ubuntu:22.04 and install lowdown 2023-01-16 13:53:48 +10:30
Christian Decker 6fe6395678 ci: Add bitcoind to integration test job 2023-01-16 13:53:48 +10:30
Christian Decker 34f0954074 ci: Automatically cancel CI runs if we push a new version to the PR
We often have a number of changes in flight, and we amend PRs before the previous run completes. This allows us to cancel that prior run, preserving our precious runners.
2023-01-16 13:53:48 +10:30
Christian Decker e7ee40e951 ci: Split out the unit tests
They are run in parallel with the integration tests, not on the
critical path, but can be a bit lengthy since they build a log of C
code, and run in valgrind.
2023-01-16 13:53:48 +10:30
Christian Decker a650dcb26d ci: Split the pre-flight checks into separate steps
One of these escapes, and actually builds the entire thing. This
should not actually build the CLN binaries, just check it works.
2023-01-16 13:53:48 +10:30
Christian Decker a20540eb15 ci: Add a testpack.tar target to tranfer artifacts between CI jobs
The tester CI job uses absolute paths to ensure it is testing the
correct binaries. That clashes with the transfer between builder and
tester job using the `install` target because that switches things
around. This commit introduces a new target that just collects
artifacts in place, and tars them. Then we can use `tar` to unpack
them on the tester jobs again.
2023-01-16 13:53:48 +10:30
Christian Decker 69e37a8865 gci: Re-add tests of pre-compiled binaries 2023-01-16 13:53:48 +10:30
Christian Decker 10abb620a8 gci: Clone BOLTs repository in pre-build checks 2023-01-16 13:53:48 +10:30
Christian Decker 4d668e76a0 gci: Split out the stages better
We want to compile with one set of dependencies, and run the tests
with another. This also helps us cut down on the times we compile CLN
itself, by sharing them among stages, and simplifies the logic of each
stage to have one specific goal.
2023-01-16 13:53:48 +10:30
Christian Decker a00190dce5 gci: Update Github Actions steps to their latest versions
They were causing warnings.
2023-01-16 13:53:48 +10:30
Christian Decker 8c075c4cda gci: Stop uploading unit test results
We never used them, and they were creating distracting warnings.
2023-01-16 13:53:48 +10:30
Christian Decker 1fbf774e04 gci: Split out the lnprototest from the larger CI run
The lnprototests are often blocking PRs, due to them failing, but we
can't restart them when valgrind runs are still ongoing, since they'd
also restart. Splitting allows us to rerun them selectively and waste
less time.

Ideally we'd just fix them, but I am by no means knowledgeable enough
to fix them now.
2023-01-16 13:53:48 +10:30
arowser f918a04738 unify the zlib version 2023-01-05 14:42:00 +01:00
arowser 90956fa947 change zlib download path 2023-01-05 14:42:00 +01:00
Christian Decker 3ae58c4429 ci: Add `protoc` compiler to setup 2022-12-22 15:42:12 +01:00
Christian Decker f63ec15116 ci: Unconditionally install `protoc`
We used to install it only when Rust was configured, but for some
reason all builds now seem to be Rust builds. That's ok, so just
provide the necessary dependency.
2022-12-22 15:42:12 +01:00
Christian Decker 090facd79b ci: Temporarily disable lnprototest tests
They are broken, and not a good signal.
2022-11-30 14:24:12 +01:00
Christian Decker 15112ae87b gci: Force MacOS CI Job to use python 3.10
The runner version was recently bumped causing our tests to fail
because it couldn't find the `poetry` version it just installed. We
instead install python3.10, and force its use, since otherwise we end
up compiling grpcio and fail to do so.

Changelog-None
2022-11-08 17:41:21 +01:00
Rusty Russell 342e330b56 doc: update references to old BOLTs repo.
This reveals that common/test/run-bolt12_merkle-json.c was broken!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-09-29 16:10:57 +09:30
Christian Decker 4693803c35 ci: Use the new make upgrade-version target to manage versions 2022-09-22 11:41:11 +02:00
Christian Decker aace5b51ef pyln: Adjust the auto-publish task to trigger on tags
I was wondering why the workflow never published, turns out we were triggering on
branch pushes only, not tags. So the branch would get pushed, but the tag is pushed
afterwards, and thus not triggering.
2022-09-22 11:41:11 +02:00
Christian Decker fcd2320de7 gha: Make the setup and build scripts exit if anything fails
Caused quite a few headaches and red herrings in the past, so let's be
stricter.

Changelog-None
2022-09-20 10:33:40 +02:00
Christian Decker 74cd0a7280 gci: Use stable rust instead of nightly
Nightly occasionally breaks, so use stable instead.

Changelog-None
2022-09-16 17:23:40 +02:00
niftynei 7df530d184 builds: cleanup duplicate and unused code, fix spelling
Few extremely minor updates to the ubuntu dockerfile and ci builds
2022-09-10 11:24:31 +09:30
niftynei 34a0d7083a build: use ubuntu 22.04 LTS
Requires us to update to latest lnproto which is now using the most up
to date python-bitcoinlib, as well as updating our python lock files
(which pin the grpcio deps, because of locking problems h/t @cdecker)
2022-09-10 11:24:31 +09:30
Rusty Russell 50056ce918 doc: remove mrkd requirement, add lowdown requirement.
I guessed it's called "lowdown" for everyone?

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-09-08 00:36:51 +03:00
Christian Decker aabf38a11d ci: Fix the Mac OS build test 2022-08-19 10:44:21 -04:00
Rusty Russell d0c321b43a CI: fix CI scripts to fail if a command fails.
If compilation failed, we didn't stop (though except for fuzzing, we
would fail when we try to run the tests).

Also use make -s instead of redirecting make ooutput.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-07-25 08:08:32 -07:00
Rusty Russell 1771b8ec22 CI: re-enable checks, by changing errant tab back to spaces.
And the Python contrib/ stuff seems to fail under VALGRIND, so attach
it to a normal make line.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-07-03 20:36:20 +09:30
Rusty Russell 2fe17a5837 CI: make sure *someone* runs check-units under valgrind!
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-06-29 21:07:42 +09:30
Rusty Russell 575b94c1ef pytest: Remove all trace of python's "flaky" module.
Over time, it has cost us more developer cycles than it has gained.
It has hidden intermittant bugs, and allowed cruft to accumulate:
when we eventually tried to figure out what was going wrong, the
actual change which caused it was now stale and forgotten.

This was a particular bane during the connectd rewrite, and I
worked through some issues which had occurred before, but were not
more likely.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-06-27 17:21:35 +09:30
Gregory Sanders b15cf312e8 Change lightning-rfc to bolts post repo move 2022-05-18 10:19:16 +09:30
Christian Decker 2cf92acaa8 gh: Add @cdecker as codeowner for the Rust artifacts
Changelog-None
2022-05-08 16:57:58 +02:00
Christian Decker e7a3471af6 gh: Remove @wythe from the codeowners
For some reason Github complains that @wythe doesn't have access to
the public repository, removing in order to silence that warning. Feel
free to contact me to investigate what's happening and re-enable :-)

Changelog-None
2022-05-08 16:57:58 +02:00
Rusty Russell 33ae601266 CI: fix bsd workflow.
I have no idea why someone else owns the directory suddenly, but all git
commands fail.  Workaround as suggested by the error message.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-04-20 07:16:01 +09:30
Rusty Russell 836c1b805b doc: update c-lightning to Core Lightning almost everywhere.
Mostly comments and docs: some places are actually paths, which
I have avoided changing.  We may migrate them slowly, particularly
when they're user-visible.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-04-07 06:53:26 +09:30
kiwiidb 8ed6b7050b build: bump zlib dependency 2022-04-06 08:06:50 +09:30
Vincenzo Palazzo 154a391cf7 ci: adding pytest parameter to tracing lnprotetest
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-03-31 13:01:04 +10:30
Vincenzo Palazzo 20523f1b03 ci: migrate the protocol test on docker image
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-03-31 13:01:04 +10:30
Christian Decker c673c092dc py: Update the PyPI job to use poetry and correct versions
Let's use poetry when we already use it for everything else.

Changelog-None
2022-03-30 06:12:40 +10:30
Vincenzo Palazzo c0c826d2ee ci: introduce in ci the compilation testing on different os
Changelog-None: introduce in ci the compilation testing on different os

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-03-10 09:44:16 +10:30
Christian Decker 8857789a54 gci: Only test pushes if it's `master`
Should avoid many of the duplicate test runs
2022-03-08 05:00:36 +10:30
Christian Decker 941f217778 gci: Fix up the MacOS test with poetry 2022-03-08 05:00:36 +10:30
Christian Decker 978711699a gci: Switch to python 3.7
Since the minimum requirement for pyln-testing is 3.7 we better test
with that version at least.
2022-03-08 05:00:36 +10:30
Christian Decker 70840ef066 gci: Switch docs and CI builder to use `poetry` 2022-03-08 05:00:36 +10:30
Christian Decker d51f97a9e4 gci: Do not generate JSON reports for test runs
We've not been using them, so let's not generate them.
2022-03-08 05:00:36 +10:30
Christian Decker b320337a60 gci: Limit the RUST=1 config to test rust-related functionality
No point in retesting yet again, just test what wasn't tested
elsewhere.
2022-02-11 16:02:25 +01:00
Christian Decker 3eced14e38 gci: Add rust configuration to Github actions 2022-02-11 16:02:25 +01:00
Rusty Russell 409b26916c CI: actually check db statements.
check-dbstmts was just running the normal pytest, AFAICT:

```
export TEST_CHECK_DBSTMTS=0
+ TEST_CHECK_DBSTMTS=0
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2022-01-25 06:26:52 +10:30
Jan Sarenik 84d83bd716 .github: Fix FreeBSD workflow
The docs https://github.com/marketplace/actions/freebsd-vm
say that `runs-on:` must be `macos-10.15`.
2021-12-05 14:51:17 +10:30
Vincenzo Palazzo 38df2a3a4c ci: Introduce doc sanity check in Github action.
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2021-11-28 10:55:48 +10:30
Christian Decker 3d8293dbf4 gci: Add `-f` flag to git fetch
This avoids the warning of clobbering tags when fetching tags

Changelog-None
2021-10-31 16:57:56 +01:00
Rusty Russell c012a71dec CI: suppress postgres vaccuuming.
```
[gw1] [ 98%] PASSED tests/test_wallet.py::test_hsmtool_dump_descriptors 
tests/test_wallet.py::test_fundchannel_listtransaction 
[gw0] [ 98%] PASSED tests/test_plugin.py::test_channel_opened_notification 
tests/test_wallet.py::test_hsmtool_generatehsm 
[gw0] [ 98%] PASSED tests/test_wallet.py::test_hsmtool_generatehsm 
tests/test_wallet.py::test_withdraw_nlocktime_fuzz 
[gw1] [ 98%] ERROR tests/test_wallet.py::test_fundchannel_listtransaction 
tests/test_wallet.py::test_fundchannel_listtransaction 
tests/test_wallet.py::test_withdraw_nlocktime_fuzz 
tests/test_wallet.py::test_fundchannel_listtransaction 
[gw0] [ 99%] ERROR tests/test_wallet.py::test_withdraw_nlocktime_fuzz 
tests/test_wallet.py::test_multiwithdraw_simple 
[gw1] [ 99%] ERROR tests/test_wallet.py::test_fundchannel_listtransaction 
tests/test_wallet.py::test_withdraw_nlocktime 
tests/test_wallet.py::test_multiwithdraw_simple 
tests/test_wallet.py::test_withdraw_nlocktime 
tests/test_wallet.py::test_multiwithdraw_simple 
tests/test_wallet.py::test_withdraw_nlocktime 
[gw0] [ 99%] ERROR tests/test_wallet.py::test_multiwithdraw_simple 
tests/test_wallet.py::test_repro_4258 
[gw1] [ 99%] ERROR tests/test_wallet.py::test_withdraw_nlocktime
...
2021-10-12 06:36:09.203 UTC [224552] STATEMENT:  SELECT version FROM version LIMIT 1
2021-10-12 06:36:09.566 UTC [224523] PANIC:  could not write to file "pg_wal/xlogtemp.224523": No space left on device
2021-10-12 06:36:09.566 UTC [224523] STATEMENT:  VACUUM FULL;
Error vacuuming db: BEGIN command failed: PANIC:  could not write to file "pg_wal/xlogtemp.224523": No space left on device
server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request.
```
2021-10-15 12:09:36 +02:00
Christian Decker 8d3861ee29 ci: Add missing envvar forward for the DB configuration
We were not forwarding the matrix DB configuration, so we were only
ever testing `sqlite3`.
2021-10-10 11:05:01 +10:30
Christian Decker 69a47a3e1e ci: Add BSD configuration 2021-10-07 12:11:24 +02:00
Christian Decker 24e60055bc gha: Fix the trigger in the PyPI publication action 2021-10-06 16:18:21 +02:00
Christian Decker b2df01dc73 gci: Checkout tags in CI to get auto-versioning working 2021-09-28 18:34:43 +02:00
Christian Decker b8f79d3e44 gci: Remove push trigger 2021-09-28 18:34:43 +02:00
Christian Decker 058484b8b1 gci: Use stripped down bitcoind for Mac OS 2021-09-28 18:34:43 +02:00
Christian Decker ef579e7e9f gci: Pin down a couple more dependencies 2021-09-28 18:34:43 +02:00
Christian Decker 0e987e5ef5 gci: Limit PyPI publication to pull request merged and version tags 2021-09-28 18:34:43 +02:00
Christian Decker 808f582638 gci: Checkout entire history in PyPI build to ensure tags are there
setuptools_scm requires the ability to look up the latest tag.
2021-09-28 18:34:43 +02:00
Christian Decker c4af904342 pyln: Add production publication on tag push 2021-09-28 18:34:43 +02:00
Christian Decker 71740283e4 gci: Add missing tooling 2021-09-28 18:34:43 +02:00
Christian Decker fe9949ce0b pyln: Derive version from git for pyln-client 2021-09-28 18:34:43 +02:00
Christian Decker c8a360b81a gci: Give PyPI packages a reasonable name 2021-09-28 18:34:43 +02:00
Christian Decker 4fe99d459d gci: Add workflow to deploy PyPI artifacts 2021-09-28 18:34:43 +02:00
Christian Decker d35043a1c6 gci: Add macOS configuration 2021-09-24 17:19:16 +02:00