Skip to content

Commit

Permalink
github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Ouziel committed Mar 5, 2024
1 parent 0a6ef89 commit f763998
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/build_wheels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
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
working-directory: ${{ env.COUNTERPARTY_RS_DIR }}
uses: messense/maturin-action@v1
with:
target: x86_64
args: --release --out dist --sdist
maturin-version: "v0.14.3"
- name: Install built wheel - x86_64
working-directory: ${{ env.COUNTERPARTY_RS_DIR }}
run: |
pip install dist/counterparty-rs-*.whl --force-reinstall
pip install pytest
pytest -v
- name: Build wheels - universal2
working-directory: ${{ env.COUNTERPARTY_RS_DIR }}
uses: messense/maturin-action@v1
with:
args: --release --universal2 --out dist
maturin-version: "v0.14.3"
- name: Install built wheel - universal2
working-directory: ${{ env.COUNTERPARTY_RS_DIR }}
run: |
pip install dist/counterparty-rs-*universal2.whl --force-reinstall
pip install pytest
pytest -v
- name: Upload wheels
working-directory: ${{ env.COUNTERPARTY_RS_DIR }}
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist

0 comments on commit f763998

Please sign in to comment.