From 2bc23ca1f690746cc785b3d3d7ec7a934802481d Mon Sep 17 00:00:00 2001 From: Thomas Finnie Date: Fri, 2 Aug 2024 17:59:15 +0100 Subject: [PATCH] First test of actions building wheels. --- .github/workflows/main.yml | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 455fdb2..f5a106f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,15 +17,15 @@ env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true jobs: - build: + test: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest] # macos-latest + os: [ubuntu-latest, windows-latest, macos-13, macos-14] # macos-latest python-version: ["3.9", "3.10", "3.11"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions/cache@v1 if: startsWith(runner.os, 'Linux') @@ -89,3 +89,30 @@ jobs: echo "backend: TkAgg" >> ~/.matplotlib/matplotlibrc - name: Test and coverage run: python setup.py test + + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-13, macos-14] + + steps: + - uses: actions/checkout@v4 + + # Used to host cibuildwheel + - uses: actions/setup-python@v5 + + - name: Install cibuildwheel + run: python -m pip install cibuildwheel==2.19.2 + + - name: Build wheels + run: python -m cibuildwheel --output-dir wheelhouse + # to supply options, put them in 'env', like: + # env: + # CIBW_SOME_OPTION: value + + - uses: actions/upload-artifact@v4 + with: + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} + path: ./wheelhouse/*.whl