Skip to content

Commit c493fac

Browse files
Update wheel action
1 parent ee64f7a commit c493fac

2 files changed

Lines changed: 57 additions & 43 deletions

File tree

.github/workflows/wheel.yml

Lines changed: 53 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
name: Wheel
22

33
on:
4-
# push:
5-
# branches:
6-
# - pymem
7-
# pull_request:
8-
# branches:
9-
# - pymem
10-
workflow_dispatch:
11-
inputs:
12-
upload_pypi:
13-
description: 'True to upload to pypi'
14-
required: true
15-
type: boolean
4+
push:
5+
branches:
6+
- pymem-release
7+
pull_request:
8+
branches:
9+
- pymem-release
1610

1711
concurrency:
1812
group: ${{ github.workflow }}-${{ github.ref }}
@@ -23,6 +17,12 @@ jobs:
2317
name: Make SDist
2418
runs-on: ubuntu-latest
2519
steps:
20+
- name: Print env
21+
run: |
22+
echo github.ref: ${{github.ref}}
23+
echo github.event.action: ${{github.event.action}}
24+
echo github.event_name: ${{github.event_name}}
25+
echo runner.os: ${{runner.os}}
2626
- uses: actions/checkout@v4
2727
with:
2828
fetch-depth: 0
@@ -34,6 +34,7 @@ jobs:
3434
path: dist/*.tar.gz
3535

3636
# reference https://github.com/scikit-learn/scikit-learn/blob/main/.github/workflows/wheels.yml
37+
# github runners https://docs.github.com/en/actions/reference/runners/github-hosted-runners
3738
build_wheels:
3839
name: Build wheel for cp${{ matrix.python }}-${{ matrix.platform_id }}-${{ matrix.manylinux_image }}
3940
runs-on: ${{ matrix.os }}
@@ -42,7 +43,7 @@ jobs:
4243
fail-fast: false
4344
matrix:
4445
include:
45-
# Window 64 bit
46+
## Window 64 bit
4647
- os: windows-latest
4748
python: 311
4849
platform_id: win_amd64
@@ -56,7 +57,7 @@ jobs:
5657
python: 314
5758
platform_id: win_amd64
5859

59-
# Linux 64 bit manylinux_2_28
60+
## Linux manylinux_2_28
6061
- os: ubuntu-latest
6162
python: 311
6263
platform_id: manylinux_x86_64
@@ -74,7 +75,7 @@ jobs:
7475
platform_id: manylinux_x86_64
7576
manylinux_image: manylinux_2_28
7677

77-
# Linux 64 bit manylinux_2_28
78+
## Linux ARM manylinux_2_28
7879
- os: ubuntu-24.04-arm
7980
python: 311
8081
platform_id: manylinux_aarch64
@@ -92,36 +93,44 @@ jobs:
9293
platform_id: manylinux_aarch64
9394
manylinux_image: manylinux_2_28
9495

95-
## MacOS x86_64
96-
#- os: macos-13
97-
# python: 310
98-
# platform_id: macosx_x86_64
99-
#- os: macos-13
100-
# python: 311
101-
# platform_id: macosx_x86_64
102-
#- os: macos-13
103-
# python: 312
104-
# platform_id: macosx_x86_64
105-
#- os: macos-13
106-
# python: 313
107-
# platform_id: macosx_x86_64
96+
## MacOS x86_64
97+
- os: macos-15-intel
98+
python: 311
99+
platform_id: macosx_x86_64
100+
manylinux_image: none
101+
- os: macos-15-intel
102+
python: 312
103+
platform_id: macosx_x86_64
104+
manylinux_image: none
105+
- os: macos-15-intel
106+
python: 313
107+
platform_id: macosx_x86_64
108+
manylinux_image: none
109+
- os: macos-15-intel
110+
python: 314
111+
platform_id: macosx_x86_64
112+
manylinux_image: none
108113

109114
## MacOS arm64
110-
#- os: macos-14
111-
# python: 310
112-
# platform_id: macosx_arm64
113-
#- os: macos-14
114-
# python: 311
115-
# platform_id: macosx_arm64
116-
#- os: macos-14
117-
# python: 312
118-
# platform_id: macosx_arm64
119-
#- os: macos-14
120-
# python: 313
121-
# platform_id: macosx_arm64
115+
- os: macos-15
116+
python: 311
117+
platform_id: macosx_arm64
118+
manylinux_image: none
119+
- os: macos-15
120+
python: 312
121+
platform_id: macosx_arm64
122+
manylinux_image: none
123+
- os: macos-15
124+
python: 313
125+
platform_id: macosx_arm64
126+
manylinux_image: none
127+
- os: macos-15
128+
python: 314
129+
platform_id: macosx_arm64
130+
manylinux_image: none
122131

123132
steps:
124-
- uses: actions/checkout@v4
133+
- uses: actions/checkout@v6
125134
with:
126135
fetch-depth: 25
127136

@@ -130,13 +139,14 @@ jobs:
130139
# https://cibuildwheel.pypa.io/en/stable/
131140
# https://github.com/pypa/manylinux
132141
- name: Build wheels
133-
uses: pypa/cibuildwheel@v2.23.3
142+
uses: pypa/cibuildwheel@v3.3.0
134143
env:
135144
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
136145
CIBW_ARCHS: all
137146
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }}
138147
CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }}
139148
CIBW_MANYLINUX_AARCH64_IMAGE: ${{ matrix.manylinux_image }}
149+
MACOSX_DEPLOYMENT_TARGET: 10.15
140150

141151
- uses: actions/upload-artifact@v4
142152
with:
@@ -146,7 +156,7 @@ jobs:
146156
upload_all:
147157
needs: [build_wheels, make_sdist]
148158
runs-on: ubuntu-latest
149-
if: ${{ inputs.upload_pypi }}
159+
if: contains(github.ref, 'release')
150160
steps:
151161
- uses: actions/download-artifact@v4
152162
with:

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ select = "*-musllinux*"
4040
before-all = "apk add eigen"
4141
# TODO install nlohmann-json
4242

43+
[[tool.cibuildwheel.overrides]]
44+
select = "*-macosx_*"
45+
before-build = "brew install eigen nlohmann-json"
46+
4347
# windows
4448
[[tool.scikit-build.overrides]]
4549
if.platform-system = "^win32"

0 commit comments

Comments
 (0)