-
Notifications
You must be signed in to change notification settings - Fork 1
116 lines (96 loc) · 2.85 KB
/
ci.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Continuous Integration
on:
push:
branches:
- "main"
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
fmt-check:
name: Format Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install rust
run: |
rustup set auto-self-update disable
rustup toolchain install stable --profile minimal
- name: Install virtualenv
run: python -m pip install --user virtualenv
- name: Run Format check
run: make fmt-check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install rust
run: |
rustup set auto-self-update disable
rustup toolchain install stable --profile minimal
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: clippy
run: make clippy
itest:
name: Integration tests
runs-on: ubuntu-latest
strategy:
matrix:
cln-version: [
v24.08,
v24.05,
v24.02.2,
v23.11.2,
]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install rust
run: |
rustup set auto-self-update disable
rustup toolchain install stable --profile minimal
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Install bitcoind
run: |
wget -q "https://bitcoincore.org/bin/bitcoin-core-26.1/bitcoin-26.1-x86_64-linux-gnu.tar.gz"
tar -xzf "bitcoin-26.1-x86_64-linux-gnu.tar.gz"
sudo cp -r "bitcoin-26.1/bin" "/usr/local"
rm -rf "bitcoin-26.1-x86_64-linux-gnu.tar.gz" "bitcoin-26.1"
- name: Install lightningd
env:
CLN_VERSION: ${{ matrix.cln-version }}
CLN_FILENAME: clightning-${{ matrix.cln-version }}-Ubuntu-22.04.tar.xz
run: |
wget -q "https://github.com/ElementsProject/lightning/releases/download/$CLN_VERSION/$CLN_FILENAME"
mkdir cln
tar -xf "$CLN_FILENAME" -C cln
sudo cp -r "cln/usr" "/"
rm -rf "$CLN_FILENAME" "cln"
- name: Install virtualenv
run: python -m pip install --user virtualenv
- name: Integration tests
env:
TEST_DEBUG: 1
SLOW_MACHINE: 1
PYTEST_PAR: 10
run: make itest
utest:
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install rust
run: |
rustup set auto-self-update disable
rustup toolchain install stable --profile minimal
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Unit tests
run: make utest