15
15
required : false
16
16
type : boolean
17
17
description : " Force build even if wheels exist"
18
+ manylinux :
19
+ required : false
20
+ type : boolean
21
+ description : " Build Linux wheels in manylinux container"
18
22
version :
19
23
required : false
20
24
type : string
52
56
53
57
- name : Fetch build matrix
54
58
run : |
55
- ${{ inputs.force-build }} && extra_args="--force-build"
56
- MATRIX="$(uv run tools/fetch_matrix ${{ inputs.name }} ${extra_args} \
57
- --store build.json --runs-on ubuntu-22.04 --runs-on windows-2019)"
59
+ fetch_args="--store build.json --runs-on ubuntu-22.04"
60
+ ${{ inputs.manylinux }} || fetch_args="${fetch_args} --runs-on windows-2019"
61
+ ${{ inputs.force-build }} && fetch_args="${fetch_args} --force-build"
62
+ MATRIX="$(uv run tools/fetch_matrix ${{ inputs.name }} ${fetch_args})"
58
63
echo "MATRIX=${MATRIX}" >>$GITHUB_ENV
59
64
echo "${MATRIX}" | yq -P -o yaml
60
65
71
76
72
77
runs-on : ${{ matrix.runs-on }}
73
78
79
+ container :
80
+ ${{ fromJSON(inputs.manylinux) && 'quay.io/pypa/manylinux_2_28_x86_64' || null }}
81
+
74
82
continue-on-error : true
75
83
76
84
defaults :
@@ -102,10 +110,10 @@ jobs:
102
110
# Move src to avoid pyproject conflicts. SRC_DIR is set relative to GITHUB_WORKSPACE to
103
111
# preserve the "D:\" prefix on Windows. (Pure Linux paths aren't supported as arguments
104
112
# to 'working-directory'.)
105
- mv src ../../ && echo "SRC_DIR=${{ github.workspace } }/../../src" >>$GITHUB_ENV
113
+ mv src ../../ && echo "SRC_DIR=${GITHUB_WORKSPACE }/../../src" >>$GITHUB_ENV
106
114
107
115
# Keep MKL directory short as it ends up in the final build.
108
- echo "MKL_DIR=$(realpath "${{ github.workspace } }"/../../mkl)" >>$GITHUB_ENV
116
+ echo "MKL_DIR=$(realpath "${GITHUB_WORKSPACE }"/../../mkl)" >>$GITHUB_ENV
109
117
110
118
- name : Install uv
111
119
uses : astral-sh/setup-uv@v5
@@ -129,7 +137,7 @@ jobs:
129
137
130
138
# Fetch MKL license.
131
139
cat "$(python tools/get_file_in_pkg LICENSE.txt --pkg mkl-devel)" \
132
- >>"${{ github.workspace } }/patches/LICENSE_MKL.txt"
140
+ >>"${GITHUB_WORKSPACE }/patches/LICENSE_MKL.txt"
133
141
134
142
# Add .so -> .so.2 symlinks to fix linking for mkl-service.
135
143
if [[ "${{ runner.os }}" == "Linux" ]]; then
@@ -155,18 +163,18 @@ jobs:
155
163
echo "----" >>LICENSE.txt
156
164
echo "" >>LICENSE.txt
157
165
cat LICENSES_bundled.txt >>LICENSE.txt
158
- cat "${{ github.workspace } }/patches/LICENSE_MKL.txt" >>LICENSE.txt
166
+ cat "${GITHUB_WORKSPACE }/patches/LICENSE_MKL.txt" >>LICENSE.txt
159
167
if : inputs.name != 'mkl-service'
160
168
161
169
- name : Apply patches
162
170
run : |
163
171
# Apply patches.
164
172
cd "${{ env.SRC_DIR }}"
165
- git apply "${{ github.workspace } }"/patches/${{ inputs.name }}/*.patch
173
+ git apply "${GITHUB_WORKSPACE }"/patches/${{ inputs.name }}/*.patch
166
174
167
175
# Fix MKL pkg-config on Windows.
168
176
if [[ "${{ runner.os }}" == "Windows" ]]; then
169
- cp "${{ github.workspace } }"/patches/mkl/*.pc "${PKG_CONFIG_PATH}/"
177
+ cp "${GITHUB_WORKSPACE }"/patches/mkl/*.pc "${PKG_CONFIG_PATH}/"
170
178
fi
171
179
172
180
- name : Install Windows build dependencies
@@ -186,6 +194,15 @@ jobs:
186
194
esac
187
195
if : runner.os == 'windows'
188
196
197
+ - name : Install manylinux build dependencies
198
+ run : |
199
+ case "${{ inputs.name }}" in
200
+ mkl-service)
201
+ dnf -y install clang
202
+ ;&
203
+ esac
204
+ if : inputs.manylinux
205
+
189
206
- name : Build wheel
190
207
working-directory : ${{ env.SRC_DIR }}
191
208
run : |
0 commit comments