Skip to content

Commit d24ebf2

Browse files
committed
nix: Document Linux e2e environment
1 parent 026b5ea commit d24ebf2

2 files changed

Lines changed: 43 additions & 5 deletions

File tree

docs/setup-nix.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This document explains how to set up and maintain the Nix development environmen
55
## Overview
66

77
PeerSwap uses Nix flakes for reproducible development environments and Cachix for fast binary caching. This setup provides:
8-
- Deterministic build environments across all platforms
8+
- Deterministic build environments on supported package platforms
99
- Fast CI/CD builds through binary caching
1010
- Consistent developer experience
1111

@@ -45,6 +45,44 @@ direnv allow
4545
# Without direnv (manual)
4646
nix develop
4747
```
48+
49+
> **Note**
50+
> The full daemon integration environment is Linux-oriented because it includes
51+
> Bitcoin Core, Elements, Core Lightning, LND, and related daemon dependencies.
52+
> On macOS, the full shell may fail to evaluate unsupported Linux-only packages.
53+
> Run end-to-end tests on Linux, matching CI.
54+
55+
### Integration and E2E Tests
56+
57+
The CI integration jobs run inside `nix-shell` on Linux. Use the same entry
58+
point locally on a Linux machine or CI-equivalent runner:
59+
60+
```bash
61+
nix-shell --run "elementsd --version"
62+
nix-shell --run "make test-bins"
63+
```
64+
65+
Run individual matrix targets with the same environment used in CI:
66+
67+
```bash
68+
nix-shell --run "RUN_INTEGRATION_TESTS=1 PAYMENT_RETRY_TIME=10 PEERSWAP_TEST_FILTER=peerswap INTEGRATION_TEST_PARALLEL=6 make test-matrix-liquid_clncln"
69+
```
70+
71+
Available matrix targets are:
72+
73+
```text
74+
bitcoin_clncln
75+
bitcoin_mixed
76+
bitcoin_lndlnd
77+
liquid_clncln
78+
liquid_mixed
79+
liquid_lndlnd
80+
misc_1
81+
misc_2
82+
misc_3
83+
lnd
84+
```
85+
4886
### Binary Cache (Cachix)
4987

5088
The project automatically uses the `peerswap` Cachix cache for faster builds. If you don't have Cachix installed:

flake.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@
6262

6363
# Bitcoin/Elements daemons (used by integration tests / local networks).
6464
# Version checks:
65-
# - `bitcoind --version` (bitcoind 30.0)
66-
# - `elementsd --version` (elementsd 23.2.4)
65+
# - `bitcoind --version` (bitcoind 31.0)
66+
# - `elementsd --version` (elementsd 23.3.3)
6767
bitcoind
6868
elementsd
6969

7070
# Lightning implementations (used by integration tests / local setups).
7171
# Version checks:
72-
# - `lightningd --version` (Core Lightning / clightning 25.09.2)
73-
# - `lnd --version` (lnd 0.19.3-beta)
72+
# - `lightningd --version` (Core Lightning / clightning 26.04.1)
73+
# - `lnd --version` (lnd 0.20.1-beta)
7474
clightning
7575
lnd
7676

0 commit comments

Comments
 (0)