Skip to content

Commit 9172306

Browse files
committed
Build in parallel
1 parent e464488 commit 9172306

File tree

3 files changed

+103
-131
lines changed

3 files changed

+103
-131
lines changed

.github/workflows/build_linux_v2.yml

-57
This file was deleted.

.github/workflows/build_linux_v3.yml

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Build Wheels (Linux v3)
2+
3+
on:
4+
workflow_dispatch:
5+
inputs: {}
6+
7+
jobs:
8+
define-matrix:
9+
runs-on: ubuntu-latest
10+
outputs:
11+
matrix: ${{ steps.set-matrix.outputs.matrix }}
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
submodules: true
16+
17+
- name: Setup python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.13'
21+
22+
- run: python -m pip install -U pip wheel setuptools
23+
- run: python -m pip install -U 'cibuildwheel==2.*'
24+
25+
- id: set-matrix
26+
run: |
27+
TARGETS="$(python -m cibuildwheel --archs "x86_64 i686 aarch64 ppc64le armv7l" --print-build-identifiers)"
28+
echo 'matrix=["'$(echo $TARGETS | sed -e 's/ /","/g')'"]' >> $GITHUB_OUTPUT
29+
env:
30+
CIBW_BUILD_FRONTEND: build
31+
CIBW_SKIP: 'cp27-* pp*'
32+
CIBW_DEPENDENCY_VERSIONS: pinned
33+
CIBW_PLATFORM: linux
34+
35+
build:
36+
runs-on: ubuntu-latest
37+
38+
needs:
39+
- define-matrix
40+
strategy:
41+
matrix:
42+
only: ${{ fromJSON(needs.define-matrix.outputs.matrix) }}
43+
44+
steps:
45+
- uses: actions/checkout@v4
46+
with:
47+
submodules: true
48+
49+
- name: Set up QEMU
50+
uses: docker/setup-qemu-action@v3
51+
with:
52+
platforms: all
53+
54+
- name: Cache pip
55+
uses: actions/cache@v4
56+
with:
57+
key: cache--${{ hashFiles('./requirements-dev.txt') }}
58+
path: ~/.cache/pip
59+
60+
- name: Setup python
61+
uses: actions/setup-python@v5
62+
with:
63+
python-version: '3.13'
64+
65+
- run: python -m pip install -U pip wheel setuptools
66+
- run: python -m pip install -Ur requirements-dev.txt
67+
- run: python -m pip install -U 'cibuildwheel==2.*'
68+
69+
- run: make prepare
70+
71+
- run: python -m cibuildwheel --output-dir wheelhouse --only ${{ matrix.only }}
72+
env:
73+
CIBW_BUILD_FRONTEND: build
74+
CIBW_SKIP: 'cp27-* pp*'
75+
CIBW_DEPENDENCY_VERSIONS: pinned
76+
CIBW_PLATFORM: linux
77+
CIBW_TEST_COMMAND: python {project}/scripts/run-tests.py
78+
79+
- uses: actions/upload-artifact@v4
80+
with:
81+
name: ${{ matrix.only }}
82+
path: ./wheelhouse
83+
retention-days: 1
84+
85+
combine:
86+
runs-on: ubuntu-latest
87+
needs:
88+
- define-matrix
89+
- build
90+
steps:
91+
- uses: actions/download-artifact@v4
92+
with:
93+
path: ./wheelhouse
94+
- run: |
95+
find -name '*.zip' -exec unzip '{}' ';'
96+
find -name '*.zip' -exec rm '{}' +
97+
find -name '*.whl' -exec mv -t. '{}' +
98+
find -type d -delete
99+
working-directory: ./wheelhouse
100+
- uses: actions/upload-artifact@v4
101+
with:
102+
name: wheelhouse
103+
path: ./wheelhouse

.github/workflows/build_wheels_linux.yml

-74
This file was deleted.

0 commit comments

Comments
 (0)