Skip to content

Commit 351a5be

Browse files
committed
- updated CI scripts
1 parent 0c77e43 commit 351a5be

File tree

2 files changed

+55
-41
lines changed

2 files changed

+55
-41
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: build-windows-wheels
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
# Build the python wheel in parallel
9+
build-windows-wheels:
10+
runs-on: windows-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
# python-version: [3.7]
15+
python-version: ['cp38-win_amd64', 'cp39-win_amd64', 'cp310-win_amd64', 'cp311-win_amd64', 'cp312-win_amd64', 'cp313-win_amd64']
16+
17+
steps:
18+
# Checkout repo
19+
- uses: actions/checkout@v3
20+
21+
# Checkout repo
22+
- name: Set up Python (runner)
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: '3.12'
26+
27+
- name: Install build tooling
28+
run: |
29+
python -m pip install --upgrade pip
30+
python -m pip install --upgrade cibuildwheel twine
31+
32+
- name: Build manylinux wheels with cibuildwheel
33+
env:
34+
EXTRA_CMAKE_DEFINES: "-DUSE_AVX=On"
35+
# Verbosity
36+
CIBW_BUILD_VERBOSITY: "1"
37+
CIBW_BUILD: ${{matrix.python-version}}
38+
run: |
39+
# If needed, adapt setup.py to consume EXTRA_CMAKE_DEFINES; for now rely on defaults.
40+
python -m cibuildwheel --output-dir wheelhouse
41+
42+
- name: Upload wheels artifact
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: pypbd-${{matrix.python-version}}
46+
path: wheelhouse
47+
if: always()
48+
49+
# Upload wheel to pypi
50+
- name: Upload wheel to pypi
51+
env:
52+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
53+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
54+
run: |
55+
twine upload wheelhouse/*.whl --skip-existing

.github/workflows/build-windows.yml

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -29,44 +29,3 @@ jobs:
2929
- name: build
3030
run: cmake --build build-release --config Release
3131

32-
33-
# Build the python wheel in parallel
34-
build-windows-python:
35-
runs-on: windows-latest
36-
strategy:
37-
matrix:
38-
# python-version: [3.7]
39-
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
40-
41-
steps:
42-
# Checkout repo
43-
- uses: actions/checkout@v3
44-
45-
# Set up python
46-
- name: Set up Python ${{ matrix.python-version }}
47-
uses: actions/setup-python@v4
48-
with:
49-
python-version: ${{ matrix.python-version }}
50-
51-
# Install python dependencies
52-
- name: Install dependencies
53-
run: python -m pip install --upgrade pip setuptools wheel twine
54-
55-
# Change directory and run setup py
56-
- name: Run setup py
57-
run: python setup.py bdist_wheel
58-
59-
# Upload artifacts
60-
- name: Upload compiled wheel
61-
uses: actions/upload-artifact@master
62-
with:
63-
name: pypbd-windows-${{ matrix.python-version }}
64-
path: build/dist
65-
if: always()
66-
67-
# Upload wheel to pypi
68-
- name: Upload wheel to pypi
69-
env:
70-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
71-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
72-
run: twine upload build/dist/* --skip-existing

0 commit comments

Comments
 (0)