Skip to content

Commit 6c5b7f3

Browse files
committed
Remove the need of cibuildwheel
1 parent f2331e0 commit 6c5b7f3

File tree

1 file changed

+17
-23
lines changed

1 file changed

+17
-23
lines changed

.github/workflows/python-client-build-artifacts.yml

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -39,25 +39,23 @@ on:
3939

4040
jobs:
4141
build-artifacts:
42-
name: Build artifacts on ${{ matrix.os }}
42+
name: Build artifacts on ${{ matrix.os }} with Python ${{ matrix.python-version }}
4343
runs-on: ${{ matrix.os }}
4444
strategy:
4545
matrix:
4646
os: [ ubuntu-24.04, macos-14, macos-15] # current build script is not compatible with windows
47+
python-version: [ "3.10", "3.11", "3.12", "3.13" ]
4748

4849
steps:
4950
- uses: actions/checkout@v5
5051
with:
5152
fetch-depth: 1
5253

53-
- name: Set up Python
54+
- name: Set up Python ${{ matrix.python-version }}
5455
uses: actions/setup-python@v6
5556
with:
56-
python-version: |
57-
3.10
58-
3.11
59-
3.12
60-
3.13
57+
python-version: ${{ matrix.python-version }}
58+
6159
- name: Set up JDK for openapi-generator-cli
6260
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
6361
with:
@@ -71,30 +69,26 @@ jobs:
7169
run: make client-set-version VERSION="${{ env.VERSION }}"
7270

7371
- name: Build source distribution
72+
if: matrix.python-version == '3.13' && startsWith(matrix.os, 'ubuntu-24.04')
7473
run: |
7574
make client-build FORMAT=sdist
7675
77-
- name: Build wheels
78-
uses: pypa/[email protected]
79-
with:
80-
output-dir: wheelhouse
81-
package-dir: "./client/python"
82-
config-file: "{package}/pyproject.toml"
83-
env:
84-
# Ignore 32 bit architectures
85-
CIBW_ARCHS: "auto64"
86-
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.10,<3.14"
87-
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "" # Disable wheel repair since there will be no binary in the wheel
88-
CIBW_REPAIR_WHEEL_COMMAND_LINUX: ""
89-
CIBW_ENVIRONMENT: POLARIS_CLI_SKIP_CLIENT_GENERATION="true" # java is not available in linux containers during wheel build, skip client generation
76+
- name: Build wheel
77+
run: |
78+
make client-build FORMAT=wheel
79+
80+
- name: Prepare artifacts directory
81+
run: |
82+
mkdir -p wheelhouse
83+
cp ./client/python/dist/*.whl wheelhouse/
9084
9185
- name: Add source distribution
92-
if: startsWith(matrix.os, 'ubuntu-24.04')
93-
run: ls -lah ./client/python/dist/* && cp ./client/python/dist/* wheelhouse/
86+
if: matrix.python-version == '3.13' && startsWith(matrix.os, 'ubuntu-24.04')
87+
run: cp ./client/python/dist/*.tar.gz wheelhouse/
9488

9589
- uses: actions/upload-artifact@v4
9690
with:
97-
name: "python-client-artifacts-${{ matrix.os }}"
91+
name: "python-client-artifacts-${{ matrix.os }}-py${{ matrix.python-version }}"
9892
path: ./wheelhouse/*
9993

10094
merge-artifacts:

0 commit comments

Comments
 (0)