Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Add manual CI action for custom wheels #1216

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/nmodl-wheel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build custom wheels

concurrency:
group: ${{ github.workflow }}#${{ github.ref }}
cancel-in-progress: true

on:
workflow_dispatch:
pull_request:
branches:
- master

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
timeout-minutes: 45
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-13]

steps:
- name: Setup Flex and Bison
# reserved for future use
if: runner.os == 'Windows'
run: |
choco install winflexbison3 -y

- name: Setup Flex and Bison
if: runner.os == 'macOS'
run: |
brew install flex bison

- name: Checkout code
uses: actions/checkout@v4
with:
fetch: 0

# Used to host cibuildwheel
- name: Set up Python
uses: actions/setup-python@v3

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.5

- name: Build all wheels
run: |
export SETUPTOOLS_SCM_PRETEND_VERSION="$(git describe --tags | cut -d '-' -f 1,2 | tr - .)"
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ARCHS: 'universal2'

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl