Skip to content

Commit 7f1d253

Browse files
committed
Streamline workflow steps
1 parent 30035cb commit 7f1d253

File tree

2 files changed

+39
-144
lines changed

2 files changed

+39
-144
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: 'cibuildwheel-impl'
2+
description: 'Run cibuildwheel to produce a wheel depending on input tag'
3+
inputs:
4+
build-tag:
5+
description: 'The tag for this build'
6+
required: true
7+
8+
runs:
9+
using: "composite"
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
with:
14+
ref: ${{ inputs.branch }}
15+
16+
- name: Build wheel
17+
uses: pypa/[email protected]
18+
env:
19+
CIBW_BUILD: ${{ inputs.build-tag }}
20+
21+
- name: Upload wheel
22+
uses: actions/upload-artifact@v4
23+
with:
24+
name: ${{ inputs.build-tag }}
25+
path: wheelhouse/*

.github/workflows/python_wheel_build.yml

Lines changed: 14 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -14,164 +14,34 @@ on:
1414
- cron: '01 1 * * *'
1515

1616
jobs:
17-
cp38-manylinux_x86_64:
17+
build-wheels:
1818
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
target: [cp38-manylinux_x86_64, cp39-manylinux_x86_64, cp310-manylinux_x86_64, cp311-manylinux_x86_64, cp312-manylinux_x86_64, cp313-manylinux_x86_64]
22+
name: ${{ matrix.target }}
1923
steps:
20-
- name: Checkout
21-
uses: actions/checkout@v4
24+
- uses: .github/workflows/cibuildwheel-impl
2225
with:
23-
ref: ${{ inputs.branch }}
26+
build-tag: ${{ matrix.target }}
2427

25-
- name: Build wheel
26-
uses: pypa/[email protected]
27-
env:
28-
CIBW_BUILD: cp38-manylinux_x86_64
29-
30-
- name: Upload wheel
31-
uses: actions/upload-artifact@v4
32-
with:
33-
name: cp38-manylinux_x86_64
34-
path: wheelhouse/*
35-
36-
cp39-manylinux_x86_64:
37-
runs-on: ubuntu-latest
38-
steps:
39-
- name: Checkout
40-
uses: actions/checkout@v4
41-
with:
42-
ref: ${{ inputs.branch }}
43-
44-
- name: Build wheel
45-
uses: pypa/[email protected]
46-
env:
47-
CIBW_BUILD: cp39-manylinux_x86_64
48-
49-
- name: Upload wheel
50-
uses: actions/upload-artifact@v4
51-
with:
52-
name: cp39-manylinux_x86_64
53-
path: wheelhouse/*
54-
55-
cp310-manylinux_x86_64:
56-
runs-on: ubuntu-latest
57-
steps:
58-
- name: Checkout
59-
uses: actions/checkout@v4
60-
with:
61-
ref: ${{ inputs.branch }}
62-
63-
- name: Build wheel
64-
uses: pypa/[email protected]
65-
env:
66-
CIBW_BUILD: cp310-manylinux_x86_64
67-
68-
- name: Upload wheel
69-
uses: actions/upload-artifact@v4
70-
with:
71-
name: cp310-manylinux_x86_64
72-
path: wheelhouse/*
73-
74-
cp311-manylinux_x86_64:
75-
runs-on: ubuntu-latest
76-
steps:
77-
- name: Checkout
78-
uses: actions/checkout@v4
79-
with:
80-
ref: ${{ inputs.branch }}
81-
82-
- name: Build wheel
83-
uses: pypa/[email protected]
84-
env:
85-
CIBW_BUILD: cp311-manylinux_x86_64
86-
87-
- name: Upload wheel
88-
uses: actions/upload-artifact@v4
89-
with:
90-
name: cp311-manylinux_x86_64
91-
path: wheelhouse/*
92-
93-
cp312-manylinux_x86_64:
94-
runs-on: ubuntu-latest
95-
steps:
96-
- name: Checkout
97-
uses: actions/checkout@v4
98-
with:
99-
ref: ${{ inputs.branch }}
100-
101-
- name: Build wheel
102-
uses: pypa/[email protected]
103-
env:
104-
CIBW_BUILD: cp312-manylinux_x86_64
105-
106-
- name: Upload wheel
107-
uses: actions/upload-artifact@v4
108-
with:
109-
name: cp312-manylinux_x86_64
110-
path: wheelhouse/*
111-
112-
cp313-manylinux_x86_64:
113-
runs-on: ubuntu-latest
114-
steps:
115-
- name: Checkout
116-
uses: actions/checkout@v4
117-
with:
118-
ref: ${{ inputs.branch }}
119-
120-
- name: Build wheel
121-
uses: pypa/[email protected]
122-
env:
123-
CIBW_BUILD: cp313-manylinux_x86_64
124-
125-
- name: Upload wheel
126-
uses: actions/upload-artifact@v4
127-
with:
128-
name: cp313-manylinux_x86_64
129-
path: wheelhouse/*
130-
131-
create_and_upload_wheel_registry:
132-
needs: [cp38-manylinux_x86_64, cp39-manylinux_x86_64, cp310-manylinux_x86_64, cp311-manylinux_x86_64, cp312-manylinux_x86_64, cp313-manylinux_x86_64]
28+
create-and-upload-wheel-registry:
29+
needs: build-wheels
13330
runs-on: ubuntu-latest
13431
steps:
13532

136-
- name: Download artifact
137-
uses: actions/download-artifact@v4
138-
with:
139-
name: cp38-manylinux_x86_64
140-
141-
- name: Download artifact
33+
- name: Download produced wheels
14234
uses: actions/download-artifact@v4
143-
with:
144-
name: cp39-manylinux_x86_64
145-
146-
- name: Download artifact
147-
uses: actions/download-artifact@v4
148-
with:
149-
name: cp310-manylinux_x86_64
150-
151-
- name: Download artifact
152-
uses: actions/download-artifact@v4
153-
with:
154-
name: cp311-manylinux_x86_64
155-
156-
- name: Download artifact
157-
uses: actions/download-artifact@v4
158-
with:
159-
name: cp312-manylinux_x86_64
160-
161-
- name: Download artifact
162-
uses: actions/download-artifact@v4
163-
with:
164-
name: cp313-manylinux_x86_64
165-
166-
- name: Setup Python
167-
uses: actions/setup-python@v5
16835

16936
- name: Install Kerberos utilities
17037
run: sudo apt-get install -y krb5-user
17138

17239
- name: Install XRootD client
17340
run: sudo apt-get -y install xrootd-client
17441

42+
- name: Setup Python
43+
uses: actions/setup-python@v5
44+
17545
- name: Create PEP503-compliant wheel registry
17646
run: |
17747
mkdir -p wheelhouse
@@ -202,4 +72,4 @@ jobs:
20272
echo +++ Creating the token
20373
kinit -p ${{ secrets.KRB5USER }}@${{ secrets.KRB5REALM }} -kt ${KT_FILE_NAME}
20474
echo +++ Running the copy
205-
xrdcp -rf wheelhouse/* ${EOS_ENDPOINT}/${EOS_PATH}/
75+
xrdcp --parallel 6 -rf wheelhouse/* ${EOS_ENDPOINT}/${EOS_PATH}/

0 commit comments

Comments
 (0)