Skip to content

Commit 679fbbd

Browse files
Arm wheels and sdist (#182)
* enable arm wheels * enable sdist building
1 parent 359185c commit 679fbbd

4 files changed

Lines changed: 65 additions & 4 deletions

File tree

.github/workflows/sdist.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: SDist
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build_wheels:
7+
name: Build wheels on ${{ matrix.os }}
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
os: [ubuntu-22.04,]
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
submodules: recursive
17+
fetch-depth: 0 # needed for history/tags
18+
19+
# Used to host cibuildwheel
20+
- name: Set up Python 3.12
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.12'
24+
25+
- name: Get python_ics version
26+
uses: mtkennerly/dunamai-action@v1
27+
with:
28+
env-var: PYTHON_ICS_VERSION
29+
args: --format "v{base}-{commit}-{timestamp}"
30+
- name: Print python_ics version
31+
run: echo $PYTHON_ICS_VERSION
32+
33+
- name: Install requirements for sdist building
34+
run: python -m pip install -r requirements.txt
35+
36+
- name: Compiling sdist
37+
run: python setup.py sdist
38+
39+
- name: Upload Artifacts
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: python_ics-sdist-${{ matrix.os }}-${{ env.PYTHON_ICS_VERSION }}
43+
path: ./dist/*.tar.gz
44+
if-no-files-found: error
45+
46+
- name: Download artifacts
47+
uses: actions/download-artifact@v4
48+
with:
49+
pattern: python_ics-sdist-*
50+
merge-multiple: true
51+
path: ./dist/

.github/workflows/wheels.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,21 @@ jobs:
88
runs-on: ${{ matrix.os }}
99
strategy:
1010
matrix:
11-
os: [ubuntu-22.04, windows-2022, macOS-14]
11+
os: [ubuntu-24.04, windows-2022, macOS-14]
1212

1313
steps:
1414
- uses: actions/checkout@v4
1515
with:
1616
submodules: recursive
1717
fetch-depth: 0 # needed for history/tags
1818

19+
# Enable emulation for aarch64
20+
- name: Set up QEMU
21+
if: runner.os == 'Linux'
22+
uses: docker/setup-qemu-action@v3
23+
with:
24+
platforms: all
25+
1926
# Used to host cibuildwheel
2027
- name: Set up Python 3.12
2128
uses: actions/setup-python@v5
@@ -31,7 +38,7 @@ jobs:
3138
run: echo $PYTHON_ICS_VERSION
3239

3340
- name: Install cibuildwheel
34-
run: python -m pip install cibuildwheel
41+
run: python -m pip install cibuildwheel==2.18.1
3542

3643
- name: Build wheels
3744
run: python -m cibuildwheel --output-dir wheelhouse

MANIFEST.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
recursive-include include *.h
22
include extract_icsneo40_defines.py
3-
include generate_icsneo40_structs.py
3+
include generate_icsneo40_structs.py
4+
include ics_utility.py

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ requires = [
4545
[tool.cibuildwheel]
4646
build = "{*-win32,*-win_amd64,*-macosx_universal2,*-manylinux_x86_64,*-manylinux_aarch64}"
4747
skip = "cp36-* pp* *-manylinux_i686 *-musllinux_*"
48-
environment = {DISTUTILS_DEBUG=1, MACOSX_DEPLOYMENT_TARGET="10.13"}
48+
environment = {DISTUTILS_DEBUG=1, MACOSX_DEPLOYMENT_TARGET="10.13", CIBW_ARCHS_LINUX="auto aarch64"}
4949
before-build = "python -m pip install wheel"
5050
manylinux-x86_64-image = "quay.io/pypa/manylinux_2_28_x86_64"
51+
manylinux-aarch64-image = "quay.io/pypa/manylinux_2_28_aarch64"
5152

5253
[tool.cibuildwheel.linux]
5354
before-build = "dnf install -y cmake clang clang-tools-extra flex bison"
55+
archs = "auto aarch64"
5456

5557
[tool.cibuildwheel.macos]
5658
archs = ["universal2"]

0 commit comments

Comments
 (0)