prophet/.github/workflows/wheel.yml
2022-06-24 21:45:23 +10:00

52 lines
1.3 KiB
YAML

name: "Create Python Wheels"
on:
release:
types: [ created ]
workflow_dispatch: {}
env:
STAN_BACKEND: "CMDSTANPY"
jobs:
make-wheels:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["macos-latest", "ubuntu-latest", "windows-latest"]
fail-fast: false
steps:
- name: "Checkout repo"
uses: actions/checkout@v3
- name: "Restore RTools40"
if: startsWith(runner.os, 'Windows')
id: cache-rtools
uses: actions/cache@v2
with:
path: C:/rtools40
key: ${{ runner.os }}-${{ env.OS_VERSION }}-rtools-v1
- name: "Build wheels"
uses: pypa/cibuildwheel@v2.6.0
with:
package-dir: python
env:
CIBW_ENVIRONMENT: >
STAN_BACKEND="${{ env.STAN_BACKEND }}"
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BUILD: cp37-* cp38-* cp39-* cp310-*
CIBW_SKIP: "*musllinux*"
CIBW_ARCHS: native
CIBW_BUILD_FRONTEND: build
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest --pyargs prophet
- name: "Upload wheel as artifact"
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}-wheel
path: "./**/*.whl"