-
Notifications
You must be signed in to change notification settings - Fork 63
82 lines (78 loc) · 2.6 KB
/
cln-plugin.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: CI tests for CLN watchtower-plugin
on:
push:
branches:
- master
pull_request:
env:
bitcoind_version: "27.0"
cln_version: "24.02.2"
jobs:
cache-cln:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
check-latest: true
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Create CLN cache
id: cache-cln
uses: actions/cache@v4
env:
cache-name: cache-cln-dev
with:
path: lightning
key: ${{ runner.os }}-build-${{ env.cache-name }}-v${{ env.cln_version }}
- name: Compile CLN
env:
PYTHON_KEYRING_BACKEND: keyring.backends.null.Keyring
if: ${{ steps.cache-cln.outputs.cache-hit != 'true' }}
run: |
sudo apt-get update && sudo apt-get install -y gettext
git clone https://github.com/ElementsProject/lightning.git && cd lightning && git checkout v${{ env.cln_version }}
pip install --user poetry && poetry install
./configure && poetry run make
cln-plugin:
needs: cache-cln
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
check-latest: true
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install bitcoind
run: |
wget https://bitcoincore.org/bin/bitcoin-core-${{ env.bitcoind_version }}/bitcoin-${{ env.bitcoind_version }}-x86_64-linux-gnu.tar.gz
tar -xzf bitcoin-${{ env.bitcoind_version }}-x86_64-linux-gnu.tar.gz
ln -s $(pwd)/bitcoin-${{ env.bitcoind_version }}/bin/bitcoin* /usr/local/bin
- name: Load CLN cache
id: cache-cln
uses: actions/cache@v4
env:
cache-name: cache-cln-dev
with:
path: lightning
key: ${{ runner.os }}-build-${{ env.cache-name }}-v${{ env.cln_version }}
- name: Link CLN
run: |
cd lightning && sudo make install
- name: Install teos and the plugin
run: |
cargo install --locked --path teos
cargo install --locked --path watchtower-plugin
- name: Add test dependencies
run: |
cd watchtower-plugin/tests
pip install --user poetry && poetry install
- name: Run tests
run: |
cd watchtower-plugin/tests
VALGRIND=0 SLOW_MACHINE=1 poetry run pytest test.py --log-cli-level=INFO -s