Skip to content

GA-167 | public release prep #12

GA-167 | public release prep

GA-167 | public release prep #12

Workflow file for this run

name: Build Phenolrs Wheel
on:
pull_request:
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libssl-dev
pip install build maturin twine
- name: Build the package
run: python -m build
- name: ls
run: ls dist/*
- name: Pip install from wheel
run: pip install dist/*.whl
build-windows:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install build maturin twine
- name: Build the package
run: python -m build
- name: ls
run: ls dist/*
- name: Pip install from wheel
run: Get-ChildItem -Path dist -Filter *.whl | ForEach-Object { pip install $_.FullName }
shell: powershell
build-macos:
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
architecture: [x86_64, arm64] # Only applied to macOS
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
brew install openssl
pip install build maturin twine
- name: Build the package
run: |
if [[ "${{ matrix.architecture }}" == "x86_64" ]]; then
rustup target add x86_64-apple-darwin
RUSTFLAGS="-C target-cpu=x86-64" cargo build --release --target x86_64-apple-darwin
maturin build --release --strip --target x86_64-apple-darwin --out dist
elif [[ "${{ matrix.architecture }}" == "arm64" ]]; then
rustup target add aarch64-apple-darwin
RUSTFLAGS="-C target-cpu=apple-m1" cargo build --release --target aarch64-apple-darwin
maturin build --release --strip --target aarch64-apple-darwin --out dist
fi
- name: ls
run: ls dist/*
- name: Pip install from wheel
run: pip install dist/*.whl