Skip to content

Build wheels

Build wheels #2

Workflow file for this run

name: Build wheels
on:
workflow_dispatch:
push:
tags:
- v*
schedule:
- cron: '5 5 5/15 * *' # On the 5th and 20th of each month at 5:05
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-11, windows-2019]
steps:
- uses: actions/checkout@v3
# From https://github.com/insarlab/PySolid/blob/18dcc0ffdc1aed88d9f4d87d9307284df14d26a7/.github/workflows/build-and-publish-to-pypi.yml
- name: Provide gfortran (macOS)
if: runner.os == 'macOS'
run: |
# https://github.com/actions/virtual-environments/issues/2524
# https://github.com/cbg-ethz/dce/blob/master/.github/workflows/pkgdown.yaml
sudo ln -s /usr/local/bin/gfortran-11 /usr/local/bin/gfortran
sudo mkdir /usr/local/gfortran
sudo ln -s /usr/local/Cellar/gcc@11/*/lib/gcc/11 /usr/local/gfortran/lib
gfortran --version
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_SKIP: "pp* *i686* *musllinux* *win32*"
# Package the DLL dependencies in the wheel for windows (done by default for the other platforms).
# delvewheel cannot mangle the libraries, stripping does not work.
CIBW_BEFORE_BUILD_WINDOWS: pip install delvewheel
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel show {wheel} && delvewheel repair -w {dest_dir} {wheel} --no-mangle-all"
# with:
# package-dir: .
# output-dir: wheelhouse
# config-file: "{package}/pyproject.toml"
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl