-
Notifications
You must be signed in to change notification settings - Fork 2
/
.cirrus.yml
62 lines (60 loc) · 1.96 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
unittests_task:
container:
image: $ELECTRUM_IMAGE
cpu: 1
memory: 1G
matrix:
- name: "unittests: Python $ELECTRUM_PYTHON_VERSION"
env:
ELECTRUM_IMAGE: python:$ELECTRUM_PYTHON_VERSION
matrix:
- env:
ELECTRUM_PYTHON_VERSION: 3.8
- env:
ELECTRUM_PYTHON_VERSION: 3.9
- env:
ELECTRUM_PYTHON_VERSION: 3.10
- env:
ELECTRUM_PYTHON_VERSION: 3.11
- env:
ELECTRUM_PYTHON_VERSION: 3.12
- env:
ELECTRUM_PYTHON_VERSION: 3.13
submodules_script:
- git submodule init
- git submodule update
install_script:
- pip install pytest-cov
# TODO cache building libsecp .so, which is done implicitly in the next step:
- pip install .
version_script:
- python3 --version
- python3 -c "import electrum_ecc; print(f'{electrum_ecc.__version__=}'); print(electrum_ecc.ecc_fast.version_info())"
script:
- pytest tests --cov=electrum_ecc
# Test if the ABI version of current "libsecp256k1" git submodule is listed in ecc_fast.KNOWN_COMPATIBLE_ABI_VERSIONS
abi_version_task:
name: "check: ABI version is self-consistent"
container:
image: python:3.13
cpu: 1
memory: 1G
submodules_script:
- git submodule init
- git submodule update
requirements_script:
- pip install build
compile_libsecp_script:
# Compile libsecp. The wheel itself is not used.
- python3 -m build --wheel .
- ls -la build/temp_libsecp/lib
copy_so_script:
# Manually copy .so into source dir. Crucially, this .so is versioned (e.g. "*.so.2"),
# and we still expect it to be picked up by our bindings.
- . build/temp_libsecp/lib/libsecp256k1.la
- cp "build/temp_libsecp/lib/$dlname" src/electrum_ecc/
- ls -la src/electrum_ecc/
script:
# test if importing works
- cd src
- python3 -c "import electrum_ecc; print(f'{electrum_ecc.__version__=}'); print(electrum_ecc.ecc_fast.version_info())"