Skip to content

Commit 80dc1b3

Browse files
authored
Merge pull request #3 from UG4/feature-sdist
Moved to v0.3.0. Supporting all OSes and cp312, cp314
2 parents a68cd1c + 1d24310 commit 80dc1b3

2 files changed

Lines changed: 58 additions & 21 deletions

File tree

.github/workflows/wheels.yml

Lines changed: 52 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,13 @@ on: workflow_dispatch
55

66
jobs:
77
######################
8-
# Job: Build wheel
8+
# Job: Build sdist
99
######################
10-
build-wheels:
11-
name: Build wheels on ${{ matrix.os }}
12-
runs-on: ${{ matrix.os }}
13-
strategy:
14-
matrix:
15-
#os: [macos-15-intel, macos-latest, ubuntu-latest, windows-latest] # 12 oldest
16-
#os: [macos-15-intel, macos-latest, ubuntu-latest] # 12 oldest
17-
os: [ubuntu-latest]
18-
19-
10+
build-sdist:
11+
runs-on: ubuntu-latest
2012
steps:
21-
22-
## Used to host cibuildwheel
23-
# - uses: actions/setup-python@v5
2413
- name: Checkout self
25-
uses: actions/checkout@v4
14+
uses: actions/checkout@v6
2615

2716
- name: Checkout ughub
2817
run: |
@@ -40,6 +29,43 @@ jobs:
4029
- name: Switch to Pybind feature branch(es), if any.
4130
run: python3 ughub/ughub.py git checkout feature-pybind11
4231
continue-on-error: true
32+
33+
- name: Install Python
34+
run: |
35+
pip3 install build
36+
python3 -m build --sdist
37+
38+
- uses: actions/upload-artifact@v4
39+
with:
40+
name: sdist
41+
path: dist/*.tar.gz
42+
43+
44+
######################
45+
# Job: Build wheel
46+
######################
47+
build-wheels:
48+
needs: build-sdist
49+
name: Build wheels on ${{ matrix.os }}
50+
runs-on: ${{ matrix.os }}
51+
strategy:
52+
matrix:
53+
os: [macos-15-intel, macos-latest, ubuntu-latest, windows-latest] # 12 oldest
54+
#os: [macos-15-intel, macos-latest, windows-latest] # 12 oldest
55+
#os: [ubuntu-latest]
56+
57+
58+
steps:
59+
60+
## Used to host cibuildwheel
61+
# - uses: actions/setup-python@v5
62+
- name: Checkout self
63+
uses: actions/checkout@v6
64+
- name: Download sdist.
65+
uses: actions/download-artifact@v8
66+
with:
67+
name: sdist
68+
path: dist
4369

4470
# We would need MPI in CIBW - no here...
4571
# - name: Checkout MPI.
@@ -50,8 +76,8 @@ jobs:
5076
env:
5177
CIBW_BUILD_VERBOSITY: 1
5278
# CIBW_REPAIR_WHEEL_COMMAND: ''
53-
# CIBW_BUILD: cp311-*
54-
CIBW_BUILD: cp312-* cp314-*
79+
CIBW_BUILD: cp314-*
80+
# CIBW_BUILD: cp312-* cp314-*
5581
# Skip builds for 32-bit builds and some others...
5682
CIBW_SKIP: "*-win32 *-musllinux_* *linux_i686 *linux_s390x *linux_aarch64 *linux_s390x"
5783

@@ -66,7 +92,7 @@ jobs:
6692
# CIBW_ENVIRONMENT_PASS_LINUX: CFLAGS CXXFLAGS
6793

6894
with:
69-
package-dir: .
95+
package-dir: dist/ug4py_base-0.3.0.tar.gz
7096
output-dir: wheelhouse
7197
# config-file: "pyproject.toml"
7298
config-file: "{package}/pyproject.toml"
@@ -92,8 +118,14 @@ jobs:
92118
id-token: write
93119
steps:
94120
# retrieve your distributions here
95-
- name: Download all wheels
96-
uses: actions/download-artifact@v4
121+
- name: Download sdist.
122+
uses: actions/download-artifact@v8
123+
with:
124+
name: sdist
125+
path: dist/
126+
127+
- name: Download wheels.
128+
uses: actions/download-artifact@v8
97129
with:
98130
pattern: ug4py-basic-wheels-*
99131
merge-multiple: true

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ build-backend = "scikit_build_core.build"
99

1010
[project]
1111
name = "ug4py-base"
12-
version = "0.2.3"
12+
version = "0.3.0"
1313
description = "This is a basic python package for UG4."
1414
readme = {file = "README.md", content-type = "text/markdown"}
1515

@@ -27,3 +27,8 @@ cmake.version = ">=3.15"
2727
cmake.args=['-DCMAKE_POLICY_VERSION_MINIMUM=3.5', '-DCMAKE_POSITION_INDEPENDENT_CODE=ON', '-DTARGET=libug4','-DPARALLEL:BOOL=OFF','-DUSE_PYBIND11:BOOL=ON', '-DSTATIC_BUILD:BOOL=ON', '-DDIM="1;2;3"', '-DCPU=1','-DConvectionDiffusion:BOOL=ON', '-DLimex:BOOL=ON', '-DUtil:BOOL=ON']
2828

2929
logging.level = "DEBUG"
30+
31+
# Explicitly include all cpp
32+
sdist.include = [
33+
"**/*.cpp"
34+
]

0 commit comments

Comments
 (0)