-
Notifications
You must be signed in to change notification settings - Fork 129
117 lines (105 loc) · 3.64 KB
/
nightly.yml
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
117
name: Nightly Integration Tests (master)
on:
schedule:
- cron: "21 2 * * *"
workflow_dispatch:
jobs:
nightly-build-and-test:
name: Test PY=${{ matrix.python-version }}, BCD=${{ matrix.bitcoind-version }}, EXP=${{ matrix.experimental }}, DEP=${{ matrix.deprecated }}
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
bitcoind-version: ["27.1"]
experimental: [1]
deprecated: [0]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Download Bitcoin & install binaries
run: |
export BITCOIND_VERSION=${{ matrix.bitcoind-version }}
wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIND_VERSION}/bitcoin-${BITCOIND_VERSION}-x86_64-linux-gnu.tar.gz
tar -xzf bitcoin-${BITCOIND_VERSION}-x86_64-linux-gnu.tar.gz
sudo mv bitcoin-${BITCOIND_VERSION}/bin/* /usr/local/bin
rm -rf bitcoin-${BITCOIND_VERSION}-x86_64-linux-gnu.tar.gz bitcoin-${BITCOIND_VERSION}
- name: Checkout Core Lightning
uses: actions/checkout@v4
with:
repository: 'ElementsProject/lightning'
path: 'lightning'
ref: master
submodules: 'recursive'
fetch-depth: 0 # Required for pyln versions to be recognized
- name: Compile & install Core Lightning
run: |
export EXPERIMENTAL_FEATURES=${{ matrix.experimental }}
export COMPAT=${{ matrix.deprecated }}
export VALGRIND=0
sudo apt-get install -y \
build-essential \
gettext \
libpq-dev \
libsodium-dev \
libsqlite3-dev \
net-tools \
postgresql \
protobuf-compiler \
python3 \
python3-pip \
zlib1g-dev
cd lightning
pip3 install --user -U \
pip \
poetry \
wheel \
blinker \
pytest-custom-exit-code==0.3.0 \
pytest-json-report
poetry install --with=dev
poetry update
poetry export --with=dev --without-hashes -f requirements.txt --output requirements.txt
pip install --user -U -r requirements.txt
pip install --user contrib/pyln-client contrib/pyln-testing flaky
./configure --disable-valgrind
make -j 16
sudo make install
- name: Test with pytest
run: |
export EXPERIMENTAL_FEATURES=${{ matrix.experimental }}
export COMPAT=${{ matrix.deprecated }}
export SLOW_MACHINE=1
export TEST_DEBUG=1
export TRAVIS=1
export CLN_PATH=${{ github.workspace }}/lightning
pip3 install --upgrade pip
pip3 install --user -U virtualenv pip > /dev/null
python3 .ci/test.py nightly ${{ matrix.python-version }} --update-badges
gather:
# A dummy task that depends on the full matrix of tests, and signals completion.
name: CI completion
runs-on: ubuntu-latest
if: ${{ always() }}
needs:
- nightly-build-and-test
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Complete
run: |
python_versions='3.8 3.9 3.10 3.11 3.12'
echo "Updating badges data for nightly workflow..."
python3 .ci/update_badges.py nightly $(echo "$python_versions")
echo "CI completed."