Skip to content

Add cibuildwheel workflow based on @mzecc's work #6

Add cibuildwheel workflow based on @mzecc's work

Add cibuildwheel workflow based on @mzecc's work #6

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-13, macos-14]
# os: [ubuntu-latest]
steps:
- uses: actions/checkout@v5
- name: Install Fortran compiler
# When building from source, ensure we have a Fortran compiler
if: ${{ startsWith(matrix.os, 'macos') }}
uses: fortran-lang/setup-fortran@v1
id: setup-fortran
with:
# TODO: figure out whether we need to use other compilers too
compiler: "gcc"
version: "13"
- name: Build wheels
uses: pypa/cibuildwheel@v3.1.4
# env:
# CIBW_SOME_OPTION: value
# ...
with:
package-dir: .
output-dir: wheelhouse
config-file: "{package}/pyproject.toml"
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl