Skip to content

Commit 6314eb3

Browse files
authored
Merge pull request #15 from f321x/ci_github_actions
ci: move from cirrus CI to Github Actions
2 parents 0c603be + cef071c commit 6314eb3

3 files changed

Lines changed: 85 additions & 61 deletions

File tree

.cirrus.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: CI tests
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
workflow_dispatch: # https://docs.github.com/en/actions/how-tos/manage-workflow-runs/manually-run-a-workflow
9+
10+
concurrency:
11+
# group the runs by ref (specific PR or master)
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
# if a PR gets force pushed, cancel the current run and run the new one
14+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
15+
16+
jobs:
17+
unittests:
18+
name: "unittests: Python ${{ matrix.python-version }}"
19+
runs-on: ubuntu-24.04
20+
timeout-minutes: 15
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v6
28+
with:
29+
submodules: true
30+
31+
- name: Set up Python ${{ matrix.python-version }}
32+
uses: actions/setup-python@v6
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
36+
- name: Install packages
37+
run: |
38+
# log pip/setuptools/wheel/etc versions
39+
pip freeze --all
40+
pip install pytest-cov
41+
# TODO: cache building libsecp .so, which is done implicitly in the next step
42+
pip install .
43+
44+
- name: Show environment
45+
run: |
46+
python3 --version
47+
pip freeze --all
48+
python3 -c "import electrum_ecc; print(f'{electrum_ecc.__version__=}'); print(electrum_ecc.ecc_fast.version_info())"
49+
50+
- name: Run pytest
51+
run: pytest tests --cov=electrum_ecc
52+
53+
abi-version:
54+
name: "check: ABI version is self-consistent"
55+
runs-on: ubuntu-24.04
56+
steps:
57+
- name: Checkout
58+
uses: actions/checkout@v6
59+
with:
60+
submodules: true
61+
62+
- uses: actions/setup-python@v6
63+
with:
64+
python-version: "3.13"
65+
66+
- name: install build
67+
run: pip install build
68+
69+
- name: compile libsecp
70+
run: |
71+
python3 -m build --wheel .
72+
ls -la build/temp_libsecp/lib
73+
74+
- name: copy .so into source dir
75+
# Manually copy .so into source dir. Crucially, this .so is versioned (e.g. "*.so.2"),
76+
# and we still expect it to be picked up by our bindings.
77+
run: |
78+
. build/temp_libsecp/lib/libsecp256k1.la
79+
cp "build/temp_libsecp/lib/$dlname" src/electrum_ecc/
80+
ls -la src/electrum_ecc/
81+
82+
- name: import test from src/
83+
working-directory: src
84+
run: python3 -c "import electrum_ecc; print(f'{electrum_ecc.__version__=}'); print(electrum_ecc.ecc_fast.version_info())"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Language: Python (>= 3.10)
77
```
88

99
[![Latest PyPI package](https://badge.fury.io/py/electrum_ecc.svg)](https://pypi.org/project/electrum-ecc/)
10-
[![Build Status](https://api.cirrus-ci.com/github/spesmilo/electrum-ecc.svg)](https://cirrus-ci.com/github/spesmilo/electrum-ecc)
10+
[![Build Status](https://github.com/spesmilo/electrum-ecc/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/spesmilo/electrum-ecc/actions/workflows/ci.yml)
1111

1212

1313
This package provides a pure python interface to

0 commit comments

Comments
 (0)