Skip to content

Commit 9f8351c

Browse files
committed
[CI] Bring back cibuildwheel - embedd java in container
1 parent b0d4ee8 commit 9f8351c

1 file changed

Lines changed: 25 additions & 11 deletions

File tree

.github/workflows/wheel.yml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,30 @@ jobs:
3131

3232
#- python_version: '3.8'
3333
# python: 38
34+
# cibuildwheel: "cibuildwheel<3"
3435
- python_version: '3.9'
3536
python: 39
37+
cibuildwheel: "cibuildwheel<3"
3638
#- python_version: '3.10'
3739
# python: 310
40+
# cibuildwheel: "cibuildwheel<3"
3841
#- python_version: '3.11'
3942
# python: 311
43+
# cibuildwheel: "cibuildwheel<4"
4044
#- python_version: '3.12'
4145
# python: 312
46+
# cibuildwheel: "cibuildwheel<4"
4247
#- python_version: '3.13'
4348
# python: 313
49+
# cibuildwheel: "cibuildwheel<4"
4450

4551
runs-on: ${{ matrix.os }}
4652

4753
steps:
4854
- uses: actions/checkout@v4
4955

5056
- name: Setup Java JDK
57+
if: ${{ matrix.os != 'ubuntu-latest' }}
5158
uses: actions/setup-java@v3
5259
with:
5360
distribution: "temurin"
@@ -68,16 +75,23 @@ jobs:
6875
pip install "numpy<2"
6976
pip install -e .
7077

71-
- name: Build Python package
72-
run: python setup.py bdist_wheel
78+
- name: Install cibuildwheel
79+
run: python -m pip install "${{ matrix.cibuildwheel }}"
7380

74-
- name: Inspect
75-
run: |
76-
find dist/
81+
- name: Build wheels
82+
run: python -m cibuildwheel --output-dir wheelhouse
83+
env:
84+
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
85+
CIBW_ARCHS: all
86+
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }}
87+
CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }}
88+
CIBW_ENVIRONMENT: 'JAVA_HOME="${{ env.JAVA_HOME }}"'
89+
CIBW_BEFORE_ALL_LINUX: |
90+
yum install -y java-11-openjdk-devel
91+
echo $JAVA_HOME
7792
78-
#- name: Upload a Build Artifact
79-
# uses: actions/upload-artifact@v4
80-
# with:
81-
# # Artifact name
82-
# name: prokaryote-2.4.4-py2.py3-none-any.whl
83-
# path: dist/
93+
- name: Store artifacts
94+
uses: actions/upload-artifact@v4
95+
with:
96+
name: cibw-wheels-cp${{ matrix.python }}-${{ matrix.platform_id }}
97+
path: ./wheelhouse/*.whl

0 commit comments

Comments
 (0)