Skip to content

Commit 0c77e43

Browse files
committed
- adapted CI
1 parent b01f3bd commit 0c77e43

File tree

2 files changed

+62
-47
lines changed

2 files changed

+62
-47
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: build-linux-wheels
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
build-manylinux-python:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
python-version: ["cp38-manylinux_x86_64", "cp39-manylinux_x86_64", "cp310-manylinux_x86_64", "cp311-manylinux_x86_64", "cp312-manylinux_x86_64", "cp313-manylinux_x86_64"]
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Set up Python (runner)
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.12'
22+
23+
- name: Install build tooling
24+
run: |
25+
python -m pip install --upgrade pip
26+
python -m pip install --upgrade cibuildwheel twine
27+
28+
- name: Build manylinux wheels with cibuildwheel
29+
env:
30+
# Target CPython versions (align with former matrix)
31+
CIBW_BUILD: ${{ matrix.python-version }}
32+
# CIBW_BUILD: "cp310-manylinux_x86_64"
33+
# Skip PyPy & musllinux for now
34+
CIBW_SKIP: "pp* *musllinux*"
35+
# Install system deps (runs inside manylinux container)
36+
CIBW_BEFORE_ALL_LINUX: >-
37+
yum install -y epel-release &&
38+
yum install -y cmake3 libXrandr-devel libXinerama-devel libXcursor-devel libXi-devel mesa-libGLU-devel
39+
# Provide flags similar to prior pip-wheel-args (handled via env; setup.py could be adapted to read these)
40+
EXTRA_CMAKE_DEFINES: "-DUSE_AVX=Off -DCI_BUILD=On"
41+
# Verbosity
42+
CIBW_BUILD_VERBOSITY: "1"
43+
run: |
44+
# If needed, adapt setup.py to consume EXTRA_CMAKE_DEFINES; for now rely on defaults.
45+
python -m cibuildwheel --output-dir wheelhouse
46+
47+
- name: Upload wheels artifact
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: pypbd-${{matrix.python-version}}
51+
path: wheelhouse
52+
if: always()
53+
54+
- name: Publish wheels to PyPI
55+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
56+
env:
57+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
58+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
59+
run: |
60+
twine upload wheelhouse/*-manylinux*.whl --skip-existing

.github/workflows/build-linux.yml

Lines changed: 2 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414
- name: apt-get update
1515
run: sudo apt-get update --fix-missing
1616
- name: Install packages
@@ -20,49 +20,4 @@ jobs:
2020
- name: build
2121
run: cmake --build build-release
2222

23-
build-manylinux-python:
24-
25-
runs-on: ubuntu-latest
26-
strategy:
27-
matrix:
28-
# python-version: [3.7]
29-
python-version: [cp36-cp36m, cp37-cp37m, cp38-cp38, cp39-cp39, cp310-cp310]
30-
31-
steps:
32-
- uses: actions/checkout@v3
33-
34-
# Set up python
35-
- name: Set up Python 3.8
36-
uses: actions/setup-python@v4
37-
with:
38-
python-version: 3.8
39-
40-
# Install dependencies
41-
- name: Install dependencies
42-
run: python -m pip install --upgrade twine
43-
44-
- name: Build manylinux Python wheels
45-
uses: digitalillusions/python-wheels-manylinux-build@master
46-
with:
47-
# python-versions: 'cp37-cp37m'
48-
python-versions: '${{ matrix.python-version }}'
49-
build-requirements: ''
50-
system-packages: 'cmake3 libXrandr-devel libXinerama-devel libXcursor-devel libXi-devel'
51-
package-path: ''
52-
pip-wheel-args: '--manylinux-build'
53-
54-
# Upload artifacts
55-
- name: Upload compiled wheel
56-
uses: actions/upload-artifact@master
57-
with:
58-
name: pypbd-linux-${{ matrix.python-version }}
59-
path: wheelhouse
60-
if: always()
61-
62-
# Publish to pypi
63-
- name: Publish wheels to PyPI
64-
env:
65-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
66-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
67-
run: |
68-
twine upload wheelhouse/*-manylinux*.whl --skip-existing --verbose
23+

0 commit comments

Comments
 (0)