-
-
Notifications
You must be signed in to change notification settings - Fork 48
101 lines (86 loc) · 2.37 KB
/
verify_conda_build.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
name: conda_build
on:
push:
tags:
- v*
branches:
- master
pull_request:
branches:
- master
concurrency:
group: build_conda-${{ github.head_ref }}
cancel-in-progress: true
env:
COINCURVE_UPSTREAM_REF: __no_upstream__
COINCURVE_IGNORE_SYSTEM_LIB: 'OFF'
COINCURVE_SECP256K1_STATIC: 'OFF'
COINCURVE_CROSS_HOST: ''
CIBW_ENVIRONMENT_PASS_LINUX: >
COINCURVE_UPSTREAM_REF
COINCURVE_IGNORE_SYSTEM_LIB
COINCURVE_SECP256K1_STATIC
COINCURVE_CROSS_HOST
CIBW_PROJECT_REQUIRES_PYTHON: '>=3.8'
CIBW_BEFORE_ALL_MACOS: ./.github/scripts/install-macos-build-deps.sh
CIBW_TEST_REQUIRES: pytest pytest-benchmark
CIBW_TEST_COMMAND: >
python -c
"from coincurve import PrivateKey;
a=PrivateKey();
b=PrivateKey();
assert a.ecdh(b.public_key.format())==b.ecdh(a.public_key.format())
" &&
python -m pytest {project}
CIBW_SKIP: >
pp*
jobs:
test:
name: Test with Conda libsecp256k1
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
env:
PYTHON_VERSION: '3.12'
steps:
- uses: actions/checkout@v4
- name: Install Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
environment-file: ./.conda/environment-dev.yml
activate-environment: coincurve-with-conda
python-version: ${{ env.PYTHON_VERSION }}
auto-activate-base: false
- name: Check style and typing
run: tox -e lint,typing
- name: Run tests
run: LD_LIBRARY_PATH=$CONDA_PREFIX/lib tox -e ${PYTHON_VERSION} -vvv
- name: Run benchmarks
run: LD_LIBRARY_PATH=$CONDA_PREFIX/lib tox -e bench
linux-wheels-standard:
name: Build Linux wheels
needs:
- test
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
- name: Install Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
environment-file: ./.conda/environment-dev.yml
activate-environment: coincurve-with-conda
python-version: ${{ env.PYTHON_VERSION }}
auto-activate-base: false
- name: Build sdist & wheel
run: |
conda install python-build
python -m build --outdir conda_dist
- name: Test wheel in a clean environment
run: |
conda install pip
pip install conda_dist/*.whl
python -m pytest tests