Skip to content

Add Windows build to CI #41

Add Windows build to CI

Add Windows build to CI #41

Workflow file for this run

name: build wheels
on:
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
windows:
name: Build Windows
runs-on: windows-latest
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: rust-toolchain
uses: actions-rs/toolchain@v1.0.6
with:
profile: minimal
toolchain: stable
default: true
- name: Setup Python ${{ matrix.python-version }} environment
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
args: -i python --release --out dist
- name: Install built wheel (x86_64)
run: |
pip install pycoverm --no-index --find-links dist --force-reinstall --no-dependencies
python -c "import pycoverm"
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist
macos:
name: Build macOS
runs-on: macos-latest
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: rust-toolchain
uses: actions-rs/toolchain@v1.0.6
with:
profile: minimal
toolchain: stable
default: true
- name: Setup Python ${{ matrix.python-version }} environment
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Build wheels (x86_64)
uses: messense/maturin-action@v1
with:
target: x86_64
maturin-version: v0.10.6
args: --interpreter python${{ matrix.python-version }} --release --out dist
- name: Install built wheel (x86_64)
run: |
pip install pycoverm --no-index --find-links dist --force-reinstall --no-dependencies
python -c "import pycoverm"
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist
linux:
name: Build Linux
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Build Wheels
uses: messense/maturin-action@v1
with:
target: x86_64
maturin-version: v0.10.6
manylinux: auto
args: --interpreter python${{ matrix.python-version }} --release --out dist
before-script-linux: |
# If we're running on rhel centos, install needed packages.
if command -v yum &> /dev/null; then
yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic
# If we're running on i686 we need to symlink libatomic
# in order to build openssl with -latomic flag.
if [[ ! -d "/usr/lib64" ]]; then
ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
fi
else
# If we're running on debian-based system.
apt update -y && apt-get install -y libssl-dev openssl pkg-config
fi
- name: Install built wheel
run: |
pip install pycoverm --no-index --find-links dist --force-reinstall --no-dependencies
python -c "import pycoverm"
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist