Skip to content

Commit 2442e1c

Browse files
committed
organize build and deploy with matrix and cibuildwheel
1 parent 637b6fd commit 2442e1c

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

.github/workflows/on-release-main.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
os: [macos-13, windows-latest, ubuntu-latest, macos-14]
14+
python-version: ["3.11", "3.12", "3.13"]
1415
fail-fast: false
1516
runs-on: ${{ matrix.os }}
1617
defaults:
@@ -27,10 +28,13 @@ jobs:
2728
- name: Set up Python
2829
uses: actions/setup-python@v5
2930
with:
30-
python-version: "3.11"
31+
python-version: ${{ matrix.python-version }}
3132

3233
- uses: abatilo/actions-poetry@v3
3334

35+
- name: Install python dependencies
36+
run: poetry install --no-interaction
37+
3438
- name: setup graalvm for static native build
3539
uses: graalvm/setup-graalvm@v1
3640
with:
@@ -42,6 +46,10 @@ jobs:
4246
cache: "maven"
4347
if: ${{ startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'windows') }}
4448

49+
- name: Set MACOSX_DEPLOYMENT_TARGET used by cibuildwheel
50+
if: ${{ startsWith(matrix.os, 'macos') }}
51+
run: echo "MACOSX_DEPLOYMENT_TARGET=${{ matrix.os == 'macos-14' && '14.0' || '13.0' }}" >> $GITHUB_ENV
52+
4553
- name: Run cibuildwheel
4654
run: |
4755
pip install cibuildwheel
@@ -56,18 +64,17 @@ jobs:
5664
export GRAALVM_HOME=/opt/graalvm-ce-23.0.2
5765
export PATH=$GRAALVM_HOME/bin:$PATH
5866
gu install native-image
59-
poetry install --no-interaction
6067
6168
- name: Copy wheels to dist directory
6269
run: |
6370
mkdir -p dist
6471
cp wheelhouse/*.whl dist/
6572
66-
# - name: Publish to PyPI
67-
# run: |
68-
# poetry publish --no-interaction
69-
# env:
70-
# POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
73+
# - name: Publish to PyPI
74+
# run: |
75+
# poetry publish --no-interaction
76+
# env:
77+
# POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
7178

7279
- name: Setup tmate
7380
if: failure()

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ mkdocstrings = {extras = ["python"], version = "^0.27.0"}
4040

4141
[tool.cibuildwheel]
4242
build = "cp3*-manylinux2014_x86_64 cp3*-macosx_x86_64 cp3*-macosx_arm64 cp3*-win_amd64"
43-
skip = "cp36-* cp37-* cp38-* cp310-*"
43+
requires-python = ">=3.11,<4.0"
4444

4545
[tool.setuptools.package-data]
4646
libvcell = ["lib/*"]

0 commit comments

Comments
 (0)