forked from wizardsardine/liana
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
87 lines (78 loc) · 3.1 KB
/
.cirrus.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
task:
name: 'Functional tests'
container:
image: rust:1-bookworm
timeout_in: 90m # https://cirrus-ci.org/faq/#instance-timed-out
env:
EXECUTOR_WORKERS: 3
VERBOSE: 0
LOG_LEVEL: debug
TIMEOUT: 300
matrix:
- name: 'Misc functional tests'
env:
TEST_GROUP: tests/test_misc.py
matrix:
- USE_MIN_BITCOIN_VERSION: 'TRUE'
- USE_MIN_BITCOIN_VERSION: 'FALSE'
- USE_TAPROOT: 1
- name: 'RPC functional tests'
env:
TEST_GROUP: tests/test_rpc.py
matrix:
- USE_TAPROOT: 0
- USE_TAPROOT: 1
- name: 'Chain functional tests'
env:
TEST_GROUP: tests/test_chain.py
matrix:
- USE_TAPROOT: 0
- USE_TAPROOT: 1
cargo_registry_cache:
folders: $CARGO_HOME/registry
fingerprint_script: cat Cargo.lock
cargo_git_cache:
folders: $CARGO_HOME/git # It will fail if they aren't separated
fingerprint_script: cat Cargo.lock
target_cache:
folder: target
fingerprint_script:
- rustc --version
- cat Cargo.lock
tests_tools_cache:
folder: tests/tools/taproot_signer/target
fingerprint_script:
- rustc --version
- cat tests/tools/taproot_signer/Cargo.lock
lianad_build_script: cargo build --release && cd tests/tools/taproot_signer && cargo build --release
deps_script: apt update && apt install -y python3 python3-pip
pip_cache:
folder: ~/.cache/pip
python_deps_script: pip install --break-system-packages -r tests/requirements.txt
test_script: |
set -xe
if [ "$USE_MIN_BITCOIN_VERSION" = "TRUE" ]; then
# Download the minimum required bitcoind binary
curl -O https://bitcoincore.org/bin/bitcoin-core-24.0.1/bitcoin-24.0.1-x86_64-linux-gnu.tar.gz
echo "49df6e444515d457ea0b885d66f521f2a26ca92ccf73d5296082e633544253bf bitcoin-24.0.1-x86_64-linux-gnu.tar.gz" | sha256sum -c
tar -xzf bitcoin-24.0.1-x86_64-linux-gnu.tar.gz
export BITCOIND_PATH=bitcoin-24.0.1/bin/bitcoind
export IS_NOT_BITCOIND_24=0
else
# Download the bitcoind binary
curl -O https://bitcoincore.org/bin/bitcoin-core-26.0/bitcoin-26.0-x86_64-linux-gnu.tar.gz
echo "23e5ab226d9e01ffaadef5ffabe8868d0db23db952b90b0593652993680bb8ab bitcoin-26.0-x86_64-linux-gnu.tar.gz" | sha256sum -c
tar -xzf bitcoin-26.0-x86_64-linux-gnu.tar.gz
export BITCOIND_PATH=bitcoin-26.0/bin/bitcoind
fi
# The misc tests have a backward compat test that need the path to a previous version of Liana.
# For now it requires using 0.3.
if [ "$TEST_GROUP" = "tests/test_misc.py" ]; then
curl -LO https://github.com/wizardsardine/liana/releases/download/0.3.1/liana-0.3.1-x86_64-linux-gnu.tar.gz
echo "70c8595554b6f78ccc7b66ef5f5ebc5bac03a7b1ce28afe8a076f69adf59c583 liana-0.3.1-x86_64-linux-gnu.tar.gz" | sha256sum -c
tar -xzf liana-0.3.1-x86_64-linux-gnu.tar.gz
export OLD_LIANAD_PATH="$PWD/liana-0.3.1-x86_64-linux-gnu/lianad"
fi
# Run the functional tests
LIANAD_PATH=$PWD/target/release/lianad pytest $TEST_GROUP -vvv -n 2
before_cache_script: rm -rf $CARGO_HOME/registry/index