Skip to content

Commit

Permalink
feat: switch to native arm runners for wheel builds (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Jan 17, 2025
1 parent cdefdf7 commit bf7e98b
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ jobs:
contents: write
outputs:
released: ${{ steps.release.outputs.released }}
newest_release_tag: ${{ steps.release_tag.outputs.newest_release_tag }}

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -135,6 +136,15 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Install python-semantic-release
run: python3 -m pip install python-semantic-release==7.34.6

- name: Get Release Tag
id: release_tag
shell: bash
run: |
echo "newest_release_tag=$(semantic-release print-version --current)" >> $GITHUB_OUTPUT
build_wheels:
needs: [release]
if: needs.release.outputs.released == 'true'
Expand All @@ -144,47 +154,41 @@ jobs:
strategy:
matrix:
os:
- ubuntu-24.04-arm
- macos-latest
- ubuntu-latest
- windows-latest
musl: ["", "musllinux"]
exclude:
- os: windows-latest
musl: "musllinux"
- os: macos-latest
musl: "musllinux"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: "v${{ needs.release.outputs.newest_release_tag }}"
fetch-depth: 0
ref: "main"

# Used to host cibuildwheel
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install python-semantic-release
run: python3 -m pip install python-semantic-release==7.34.6

- name: Get Release Tag
id: release_tag
shell: bash
run: |
echo "::set-output name=newest_release_tag::$(semantic-release print-version --current)"
- uses: actions/checkout@v3
with:
ref: "v${{ steps.release_tag.outputs.newest_release_tag }}"
fetch-depth: 0

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

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
# to supply options, put them in 'env', like:
env:
CIBW_SKIP: cp36-* cp37-* cp38-* cp39-* cp310-* pp36-* pp37-* pp38-* pp39-* pp310-*
CIBW_SKIP: cp36-* cp37-* cp38-* cp39-* cp310-* pp36-* pp37-* pp38-* pp39-* pp310-* ${{ matrix.musl == 'musllinux' && '*manylinux*' || '*musllinux*' }}
CIBW_BEFORE_ALL_LINUX: apt-get install -y gcc || yum install -y gcc || apk add gcc
CIBW_BUILD_VERBOSITY: 3
REQUIRE_CYTHON: 1
CIBW_ARCHS_LINUX: ${{ matrix.os == 'ubuntu-24.04-arm' && 'aarch64' || 'auto' }}

- uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit bf7e98b

Please sign in to comment.