Skip to content
Merged
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
43 changes: 24 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
os:
- ubuntu-latest
- macOS-latest
Expand Down Expand Up @@ -74,6 +75,8 @@ jobs:
release:
runs-on: ubuntu-latest
environment: release
outputs:
newest_release_tag: ${{ steps.release_tag.outputs.newest_release_tag }}
if: github.ref == 'refs/heads/main'
needs:
- test
Expand All @@ -97,6 +100,15 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
pypi_token: ${{ secrets.PYPI_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]

Expand All @@ -105,47 +117,40 @@ 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.10"

- 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.16.2
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-* pp36-* pp37-* pp38-* pp39-*
CIBW_SKIP: cp36-* cp37-* cp38-* cp39-* pp36-* pp37-* pp38-* pp39-* ${{ 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