Skip to content

Build distribution files #18

Build distribution files

Build distribution files #18

Workflow file for this run

name: Build package wheels
on: [workflow_dispatch]
jobs:
build-wheels:
name: macOS
runs-on: ${{ matrix.os }}
strategy:
matrix:
# macos-13 is x86, 14 is arm64 (https://cibuildwheel.pypa.io/en/stable/setup/#github-actions)
os: [windows-latest, ubuntu-latest, macos-13, macos-14]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install cibuildwheel
run: pip install cibuildwheel==2.17.0
- uses: ilammy/msvc-dev-cmd@v1
if: startsWith(matrix.os, "windows")

Check failure on line 23 in .github/workflows/build.yaml

View workflow run for this annotation

GitHub Actions / Build package wheels

Invalid workflow file

The workflow is not valid. .github/workflows/build.yaml (Line: 23, Col: 13): Unexpected symbol: '"windows"'. Located at position 23 within expression: startsWith(matrix.os, "windows") .github/workflows/build.yaml (Line: 28, Col: 13): Unexpected symbol: '"macos"'. Located at position 23 within expression: startsWith(matrix.os, "macos")
with:
arch: x64
- name: Enable Xcode SDK
if: startsWith(matrix.os, "macos")
# See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
# See https://stackoverflow.com/a/65277351 about SDKROOT variable
run: echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> "$GITHUB_ENV"
- name: Build wheels
# See https://stackoverflow.com/a/65277351 about SDKROOT if: startsWith(matrix.os, 'ubuntu')
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD_VERBOSITY: 1
- uses: actions/upload-artifact@v4
with:
name: wheels
path: ./wheelhouse/*.whl