Fix minor build issues (#4) #28
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: Build | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'The version of COFFE to release' | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-13, macos-14] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup all external dependencies | |
if: runner.os == 'macOS' | |
run: | | |
brew install automake | |
# Used to host cibuildwheel | |
- uses: actions/setup-python@v3 | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel==2.16.5 conan | |
# if we're not doing a release version (manual!), only build one python version | |
- name: Setup versions | |
if: ${{ ! (github.event_name == 'workflow_dispatch' && github.event.inputs.version) }} | |
run: | | |
echo "CIBW_BUILD=cp311-*" >> "$GITHUB_ENV" | |
# pretend version so setuptools doesn't fail | |
echo "SETUPTOOLS_SCM_PRETEND_VERSION=0.1.0" >> "$GITHUB_ENV" | |
- name: SCM | |
if: github.event_name == 'workflow_dispatch' && github.event.inputs.version | |
run: echo "SETUPTOOLS_SCM_PRETEND_VERSION=${{ github.event.input.version }}" >> "$GITHUB_ENV" | |
- name: Build wheels | |
run: python -m cibuildwheel --output-dir wheelhouse | |
# to supply options, put them in 'env', like: | |
env: | |
# we skip tests in CI to save time | |
CIBW_TEST_COMMAND: 'true' | |
CIBW_ENVIRONMENT_PASS_LINUX: 'SETUPTOOLS_SCM_PRETEND_VERSION' | |
CUBA_INSTALL_DIR: ${{ github.workspace }}/cuba_install | |
CLASS_INSTALL_DIR: ${{ github.workspace }}/class_install | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
path: ./wheelhouse/*.whl |