From cdc2e6f4a89648ee31163e1267c2c159a62e7314 Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Tue, 12 Mar 2024 10:47:51 +0100 Subject: [PATCH 1/3] Add manual CI action for custom wheels For now only ARM64 wheels for MacOS --- .github/workflows/nmodl-wheel.yml | 52 +++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/nmodl-wheel.yml diff --git a/.github/workflows/nmodl-wheel.yml b/.github/workflows/nmodl-wheel.yml new file mode 100644 index 0000000000..986f48319c --- /dev/null +++ b/.github/workflows/nmodl-wheel.yml @@ -0,0 +1,52 @@ +name: Build custom wheels + +concurrency: + group: ${{ github.workflow }}#${{ github.ref }} + cancel-in-progress: true + +on: + workflow_dispatch: + +jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + timeout-minutes: 45 + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macOS-14] + + 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 + + - name: Upload wheels + uses: actions/upload-artifact@v4 + with: + name: cibw-wheels-${{ matrix.os }} + path: ./wheelhouse/*.whl From 6f0c9ad23f7682bb9a4711394dd2bb786b5f4d0c Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Wed, 13 Mar 2024 11:36:26 +0100 Subject: [PATCH 2/3] WIP universal2 arch --- .github/workflows/nmodl-wheel.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nmodl-wheel.yml b/.github/workflows/nmodl-wheel.yml index 986f48319c..b107b53587 100644 --- a/.github/workflows/nmodl-wheel.yml +++ b/.github/workflows/nmodl-wheel.yml @@ -14,7 +14,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macOS-14] + os: [macOS-13] steps: - name: Setup Flex and Bison @@ -44,6 +44,8 @@ jobs: 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 From ff31c84ce7c052849d45de440352d9fae0f9a99a Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Wed, 13 Mar 2024 11:37:20 +0100 Subject: [PATCH 3/3] Activate CI on PR as well --- .github/workflows/nmodl-wheel.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/nmodl-wheel.yml b/.github/workflows/nmodl-wheel.yml index b107b53587..0876772222 100644 --- a/.github/workflows/nmodl-wheel.yml +++ b/.github/workflows/nmodl-wheel.yml @@ -6,6 +6,9 @@ concurrency: on: workflow_dispatch: + pull_request: + branches: + - master jobs: build_wheels: