From 2e81c626ec0bb70d006a42a3888f40e55f3af38a Mon Sep 17 00:00:00 2001 From: Josh Levy-Kramer Date: Thu, 3 Oct 2024 10:36:58 +0100 Subject: [PATCH] Udate github actions --- .github/workflows/build_wheels.yml | 68 +++++++++--------------------- 1 file changed, 20 insertions(+), 48 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 283d07b..510cc2c 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -12,67 +12,39 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true -# Template from: https://github.com/pypa/cibuildwheel/blob/main/examples/github-with-qemu.yml + jobs: build_wheels: - name: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.python }} + name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: matrix: - # macos-13 is an intel runner, macos-14 is apple silicon - #os: [ubuntu-latest, macos-13, macos-14, windows-latest] - python: [cp310, cp311, cp312, cp313] - #arch: [x86_64, aarch64, AMD64, arm64] - # Included archs: - # Ubuntu: x86_64, aarch64 - # macos-13: x86_64, arm64 - # macos-13: arm64 - # Windows: AMD64 - include: - - os: ubuntu-latest - arch: x86_64 - - os: ubuntu-latest - arch: aarch64 - - os: macos-13 - arch: x86_64 - - os: macos-14 - arch: arm64 + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: ["3.10", "3.11", "3.12", "3.13"] + architecture: [x86_64, aarch64] + exclude: + # Windows doesn't support ARM builds directly in GitHub Actions - os: windows-latest - arch: AMD64 - # exclude: - # - os: ubuntu-latest - # arch: AMD64 - # - os: ubuntu-latest - # arch: arm64 - # - os: macos-12 - # arch: aarch64 - # - os: macos-12 - # arch: AMD64 - # - os: windows-latest - # arch: x86_64 - # - os: windows-latest - # arch: aarch64 - # - os: windows-latest - # arch: arm64 - fail-fast: false + architecture: aarch64 steps: + - uses: actions/checkout@v4 + - name: Set up QEMU if: runner.os == 'Linux' uses: docker/setup-qemu-action@v3 with: platforms: arm64 - - uses: actions/checkout@v4 - - name: Build and test wheels - uses: pypa/cibuildwheel@v2.21.2 + + - name: Build wheels + uses: pypa/cibuildwheel@v2.16.5 env: - CIBW_BEFORE_ALL: "pip install --upgrade pip && pip install --upgrade -r requirements-dev.txt" - CIBW_ARCHS: ${{ matrix.arch }} - CIBW_BUILD: "${{ matrix.python }}*" - CIBW_SKIP: "*musllinux*" - CIBW_BEFORE_TEST: "pip install -r requirements-dev.txt" - CIBW_TEST_COMMAND: "pytest {project}/tests" + CIBW_BUILD: cp{310,311,312,313}-* + CIBW_ARCHS_LINUX: ${{ matrix.architecture }} + CIBW_ARCHS_MACOS: ${{ matrix.architecture }} + CIBW_ARCHS_WINDOWS: ${{ matrix.architecture }} + - uses: actions/upload-artifact@v4 with: - path: ./wheelhouse/*.whl - + name: wheels-${{ matrix.os }}-${{ matrix.architecture }} + path: ./wheelhouse/*.whl \ No newline at end of file