-
Notifications
You must be signed in to change notification settings - Fork 204
61 lines (57 loc) · 1.81 KB
/
build_wheels.yaml
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
name: Build & Test
on:
push:
branches: [ "github" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "github" ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PYTHON_VERSION: "3.10"
COUNTERPARTY_RS_DIR: "./counterparty-rs"
jobs:
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
architecture: x64
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
default: true
- name: Build wheels - x86_64
uses: messense/maturin-action@v1
with:
target: x86_64
args: --release --out dist --sdist -m ${{ env.COUNTERPARTY_RS_DIR }}/Cargo.toml
maturin-version: "v0.14.3"
- name: Install built wheel - x86_64
run: |
cd ${{ env.COUNTERPARTY_RS_DIR }}
pip install dist/counterparty_rs-*.whl --force-reinstall
pip install pytest
pytest -v
- name: Build wheels - universal2
uses: messense/maturin-action@v1
with:
args: --release --universal2 --out dist -m ${{ env.COUNTERPARTY_RS_DIR }}/Cargo.toml
maturin-version: "v0.14.3"
- name: Install built wheel - universal2
working-directory: ${{ env.COUNTERPARTY_RS_DIR }}
run: |
cd ${{ env.COUNTERPARTY_RS_DIR }}
pip install dist/counterparty_rs-*universal2.whl --force-reinstall
pip install pytest
pytest -v
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: ${{ env.COUNTERPARTY_RS_DIR }}/dist