Commit Graph

59 Commits

Author SHA1 Message Date
Christian Decker
d151d554b3 travis: Add a pytest run with EXPERIMENTAL_FEATURES=1
Signed-off-by: Lisa <@niftynei>
2020-10-29 13:42:32 -05:00
Christian Decker
ad049c36c1 travis: Enable TEST_CHECK_DBSTMTS=1 mode for one of the configs 2020-10-10 11:34:43 +10:30
Christian Decker
1afa8b88c9 travis: Re-enable the postgres configuration again 2020-09-26 09:04:35 +09:30
Rusty Russell
75ce380e0e Travis: disable postgres test.
I don't have time to diagnose why it's failing all the time right now.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-09-23 14:03:03 +09:30
Rusty Russell
dcf45b47b3 Travis: spread the load a little more.
Commit cec755f796 reduced from 14 runners to 10,
but we're seeing some timeouts again.  So turn it up to 11.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-09-11 09:18:28 +09:30
Christian Decker
0923215834 travis: Add dependencies to cache
These are just the elementsd and bitcoind binaries
2020-09-09 20:17:26 +09:30
Christian Decker
cec755f796 travis: Compact heavy-weight valgrind tests and add two new configs
Adding test support for elementsd and for postgres.
2020-09-09 20:17:26 +09:30
Christian Decker
15adb914a3 travis: Add postgresql libraries as dependencies 2020-09-09 20:17:26 +09:30
Rusty Russell
b3f6a0e78d Travis: don't install requirements.txt if we're just building.
This tests our instructions in INSTALL.md, which say you only need
requirements.txt for development or running tests, not building.

Also removes the unused SOURCE_CHECK_ONLY flag.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2020-08-31 21:33:26 -05:00
Christian Decker
33fae1f383 travis: Reorganize tests a bit to move non-integration tests out
We were running the integration tests and the install tests with every
test-group, which doesn't increase test coverage at all. So now we bundle them
with the source check which are short and remove them from the overloaded
configurations.
2020-08-11 08:38:49 +09:30
Christian Decker
86ad15d040 travis: Spread the valgrind load on more configurations 2020-07-15 11:32:58 +02:00
Niklas Claesson
601464416b travis: Actually build for arm
Before this we cached the whole `external` directory, but that lead to
stale files since the cache is checked out after the repository is
cloned.
2020-06-24 17:08:40 +02:00
Vasil Dimov
2b2ee87801 travis: do not cache ./external
Caching the `./external` directory means that any changes to
`external/Makefile` or any updates of the submodules in `./external/*`
would not be picked up and travis would run with old instances of those,
possibly "activating" such changes after weeks or months when the cache
is pruned eventually.

Changelog-None
2020-03-12 21:55:01 +01:00
Christian Decker
9e2231aaa8 travis: Make sure to install all python dependencies 2020-02-01 16:50:58 +01:00
arowser
68271f7c6b add arm32v7/arm64v8 unit test to travis-ci 2020-01-09 22:47:05 +01:00
Christian Decker
e4ab98459c wallet: Add tooling to extract SQL queries and generate driver info
This is the counterpart of the annotations we did in the last few commits. It
extracts queries, passes them through a driver-specific query rewriter and
dumps them into a driver-specific query-list, along with some metadata to
facilitate processing later on. The generated query list is then registered as
a `db_config` and will be loaded by the driver upon instantiation.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
2019-09-05 23:41:05 +00:00
Rusty Russell
3ef5160fa7 travis: add --enable-experimental-features (build-only) test.
Also, add a 32-bit build-only test, and move all the build-only tests
to the top.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-08-29 15:51:36 +02:00
Rusty Russell
43edd91440 Travis: Try sharding 12 ways, not 7.
I tried 8, then 9... then jumped to 12.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-08-19 01:38:12 +00:00
Rusty Russell
bf3b77a947 Travis: skip testing VALGRIND=1 DEVELOPER=0, remove the slowest non-developer tests.
I don't remember ever seeing a bug which only showed up in VALGRIND=1 with developer
mode disabled, so don't test that, and spread out the other test more evenly.

In addition, disable the worst-performing tests in DEVELOPER=0 mode.

Here timings from my build machine: the worst 6 (- DEVELOPER=0 VALGRIND=0)
with the same tests (+ DEVELOPER=1 VALGRIND=1)

-452.42s call     tests/test_pay.py::test_channel_spendable
+87.69s call     tests/test_pay.py::test_channel_spendable
-335.66s call     tests/test_gossip.py::test_gossip_store_compact_on_load
+47.41s call     tests/test_gossip.py::test_gossip_store_compact_on_load
-332.07s call     tests/test_connection.py::test_opening_tiny_channel
+89.71s call     tests/test_connection.py::test_opening_tiny_channel
-331.97s call     tests/test_pay.py::test_channel_spendable_large
+56.23s call     tests/test_pay.py::test_channel_spendable_large
-305.28s call     tests/test_invoices.py::test_invoice_routeboost
+37.57s call     tests/test_invoices.py::test_invoice_routeboost
-284.28s call     tests/test_plugin.py::test_htlc_accepted_hook_forward_restart
+49.12s call     tests/test_plugin.py::test_htlc_accepted_hook_forward_restart

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-08-14 11:14:38 +00:00
Rusty Russell
5a3ba1ce99 travis: don't run full testsuite with gcc-4.8
Build test (non-developer) is probably enough.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-08-02 15:56:15 +02:00
Rusty Russell
6a2a118467 travis: upgrade to bionic
This means we'll start enforcing no "maybe uninitialized" warnings at
-O3, since xenial was using gcc 5.4 or gcc 4.8 which are too primitive.

Seems like `sudo: false` is deprecated (those deps weren't being
installed); you simply install in the `before_install` hook.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-08-02 15:56:15 +02:00
Rusty Russell
7961a815aa travis: add compilation to SOURCE_CHECK_ONLY.
Our "-O3" CI check wasn't doing what I thought.  But building with -flto
is hard with older gccs, so remove that.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-06-03 00:07:11 +00:00
Rusty Russell
6b32b72dee configure: use "-Og" for non-developer builds, add COPTFLAGS variable.
Unfortuntely we get spurious uninitialized variable warnings with
anything but -O3 or no optimization, so set default CWARNFLAGS
appropriately.

MCP bench results without optimization:
   store_load_msec:28509-31001(29206.6+/-9.4e+02)
   vsz_kb:580004-580016(580006+/-4.8)
   store_rewrite_sec:11.640000-12.730000(11.908+/-0.41)
   listnodes_sec:1.790000-1.880000(1.83+/-0.032)
   listchannels_sec:21.180000-21.950000(21.476+/-0.27)
   routing_sec:2.210000-11.160000(7.126+/-3.1)
   peer_write_all_sec:36.270000-41.200000(38.168+/-1.9)

MCP bench with -Og: 22% speedup vs no optimization
   store_load_msec:21963-23645(22841+/-6.6e+02)
   vsz_kb:579916
   store_rewrite_sec:10.080000-10.960000(10.456+/-0.3)
   listnodes_sec:1.280000-1.390000(1.338+/-0.047)
   listchannels_sec:14.770000-16.080000(15.518+/-0.46)
   routing_sec:0.990000-6.660000(3.958+/-2.2)
   peer_write_all_sec:29.950000-32.950000(31.138+/-1)

MCP bench with -O2: 31% speedup vs no optimization
   store_load_msec:20713-22088(21505.6+/-4.8e+02)
   vsz_kb:579928
   store_rewrite_sec:9.570000-11.200000(10.192+/-0.54)
   listnodes_sec:0.960000-1.090000(1.028+/-0.045)
   listchannels_sec:10.400000-11.770000(11.012+/-0.48)
   routing_sec:0.300000-3.140000(1.978+/-1.1)
   peer_write_all_sec:28.980000-30.310000(29.572+/-0.44)

MCP bench with -O3 -flto: 36% speedup vs no optimization
   store_load_msec:19616-20191(19862.6+/-1.9e+02)
   vsz_kb:578452
   store_rewrite_sec:8.980000-9.960000(9.55+/-0.32)
   listnodes_sec:0.920000-1.910000(1.18+/-0.38)
   listchannels_sec:8.960000-9.450000(9.206+/-0.16)
   routing_sec:0.730000-1.850000(1.438+/-0.42)
   peer_write_all_sec:28.090000-29.410000(28.772+/-0.42)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-05-16 15:39:56 -04:00
Rusty Russell
a3bac88e08 travis: add a test that we compile under gcc-4.8 (CentOS!)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2019-02-27 23:12:50 +00:00
fanquake
01c9cdec97 travis: fix cache directories syntax 2019-02-06 18:40:38 +01:00
Christian Decker
7ac0f53da3 travis: Attempt to setup travis without docker and without sudo
This should speed up testing since it no longer requires virtualization.
2019-02-04 17:10:24 +01:00
Rusty Russell
62e6a9ff54 travis: add test for compilation with higher optimization.
This can give more warnings, so we should test it.  Bad for debugging,
though.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-11-07 04:49:41 +01:00
Christian Decker
50a45fdb12 travis: Filter out Travis-related envvars
This is causing us to attempt to have a home directory in /home/travis
instead of the user's real homedir.
2018-11-03 07:25:01 +00:00
Rusty Russell
aab91557f3 Travis: eliminate 4 slowest tests, with new SLOW_MACHINE flag.
In one case we can reduce, in the others we eliminated if VALGRIND.

Here are the ten slowest tests on my laptop:

469.75s call     tests/test_closing.py::test_closing_torture
243.61s call     tests/test_closing.py::test_onchain_multihtlc_our_unilateral
222.73s call     tests/test_closing.py::test_onchain_multihtlc_their_unilateral
217.80s call     tests/test_closing.py::test_closing_different_fees
146.14s call     tests/test_connection.py::test_dataloss_protection
138.93s call     tests/test_connection.py::test_restart_many_payments
129.66s call     tests/test_gossip.py::test_gossip_persistence
128.73s call     tests/test_connection.py::test_no_fee_estimate
122.46s call     tests/test_misc.py::test_htlc_send_timeout
118.79s call     tests/test_closing.py::test_onchain_dust_out

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-10-28 16:03:12 +01:00
Christian Decker
d124f22421 travis: Actually build with clang if we want to 2018-08-10 01:31:24 +00:00
Rusty Russell
32af9d1e19 Travis: re-enable BOLT text check.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-07-01 17:37:03 +02:00
Rusty Russell
361ed8675a Makefile: we should use COMPAT instead of NO_COMPAT.
That's what configure defines.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-06-14 14:38:24 +02:00
Rusty Russell
5d0a54b7f0 travis: use VALGRIND rather than NO_VALGRIND.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-06-08 17:56:01 +02:00
Rusty Russell
328786ffeb Travis: do test build without compat defined.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-03-07 18:55:51 +01:00
practicalswift
ca487d5115 Add "make clean" check to Travis 2018-02-28 20:52:26 +01:00
ZmnSCPxj
33b25b6a9b travis: Correctly process $SOURCE_CHECK_ONLY.
The `!` outside of parentheses was being cut by travis.
2018-02-15 08:48:35 +00:00
Rusty Russell
6757300a0e Travis: slightly more finegrained, should be under 17 minutes now.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-12 09:27:49 +01:00
Rusty Russell
106c8304f6 Travis: don't perform source-check on every build variant.
Run it in a separate job, first.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-12 09:27:49 +01:00
Rusty Russell
b4a2f51384 Travis: use more fine-grained tests.
Currently valgrind developer tests are taking about 25 minutes,
with the non-developer valgrind taking 32.

Split into 6 parts and 2 parts respectively.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-02-12 09:27:49 +01:00
Christian Decker
ab620c5068 travis: Enable pytest-test-groups to split tests across several runs
Adds two new environment variables TEST_GROUP_COUNT and TEST_GROUP to
split the integration tests into groups and run only a selected group.

This allows us to increase the TEST_GROUP_COUNT and add a new
TEST_GROUP to avoid bumping up against the time limit when running in
valgrind.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
2017-12-21 22:43:24 +00:00
Christian Decker
1a91786def travis: Use env-file to pass in environment variables
Signed-off-by: Christian Decker <decker.christian@gmail.com>
2017-12-21 22:43:24 +00:00
Rusty Russell
887e9dcc44 travis: reenable check-source (without BOLT text).
We've been slipping, so fix up minor issues too so it compiles.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-12-21 14:33:27 +01:00
Christian Decker
7572c22a26 travis: Add clang build to build matrix
Signed-off-by: Christian Decker <decker.christian@gmail.com>
2017-12-12 02:31:03 +00:00
Christian Decker
fda77f27a5 travis: Disable BOLT checking while they are being copy-edited
Due to the large number of changes in phrasing, we'd have a large
number of CI builds failing. So just temporarily disable BOLT
checking.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
2017-12-01 18:30:57 +01:00
Rusty Russell
1ec19093f7 Travis: check bolt quotes.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-11-01 01:09:23 +00:00
Christian Decker
f78205f30f travis: Fold build output
Signed-off-by: Christian Decker <decker.christian@gmail.com>
2017-10-31 19:30:54 +00:00
Christian Decker
fa28bf4ec9 travis: use tee while pulling docker images
Shows us progress while downloading images and we can verify that the
images match what we expect. `tee` is mainly used to disable the pull
animation that was spamming the logs otherwise.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
2017-10-31 19:30:54 +00:00
Rusty Russell
8fdf334168 Travis: turn off email notifications.
Believe me Travis, I notice...

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-10-31 04:14:33 +00:00
Rusty Russell
3c6eec87e3 Add DEVELOPER flag, set by default.
This is a bit messier than I'd like, but we want to clearly remove all
dev code (not just have it uncalled), so we remove fields and functions
altogether rather than stub them out.  This means we put #ifdefs in callers
in some places, but at least it's explicit.

We still run tests, but only a subset, and we run with NO_VALGRIND under
Travis to avoid increasing test times too much.

See-also: #176
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-10-26 12:53:09 +02:00
Christian Decker
058600bee6 travis: Added 32bit variant 2017-09-08 16:56:07 +09:30