ci-build #125
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci-build | |
on: | |
# Schedule and workflow_dispatch (manual) only work on default branch | |
schedule: | |
- cron: "0 6 * * *" # Fire at 06:00 AM every day | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- develop | |
release: | |
types: | |
- published | |
permissions: | |
contents: read | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- windows-2019 | |
- windows-2022 | |
- macos-14 | |
mpi: | |
- msmpi | |
- mpich | |
exclude: | |
- os: windows-2019 | |
mpi: mpich | |
- os: windows-2022 | |
mpi: mpich | |
- os: macos-14 | |
mpi: msmpi | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup MPI (${{ matrix.mpi }}) | |
uses: mpi4py/setup-mpi@v1 | |
with: | |
mpi: ${{ matrix.mpi }} | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
cache: pip | |
- name: Upgrade pip | |
run: python -m pip install -U pip | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel==2.17.0 | |
- name: Build wheels | |
run: python -m cibuildwheel --output-dir wheelhouse | |
env: | |
CIBW_ARCHS_WINDOWS: "AMD64 x86" | |
CIBW_ARCHS_MACOS: "arm64" | |
CIBW_ENVIRONMENT_MACOS: "CC=mpicxx CXX=mpicxx" | |
CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* cp311-* | |
# Disable building PyPy wheels on all platforms | |
CIBW_SKIP: pp* | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
path: ./wheelhouse/*.whl |