Skip to content

Commit 036d6c8

Browse files
committed
test dpctl built with and without free-threaded Python 3.14 in public CI
1 parent 3bfefae commit 036d6c8

File tree

2 files changed

+95
-31
lines changed

2 files changed

+95
-31
lines changed

.github/workflows/conda-package.yml

Lines changed: 79 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ jobs:
2525
strategy:
2626
matrix:
2727
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
28+
python_spec: ['']
29+
include:
30+
- python: '3.14'
31+
python_spec: '3.14.* *_cp314'
2832
steps:
2933
- name: Cancel Previous Runs
3034
uses: styfle/cancel-workflow-action@3155a141048f8f89c06b4cdae32e7853e97536bc # 0.13.0
@@ -45,9 +49,9 @@ jobs:
4549
with:
4650
path: ~/.conda/pkgs
4751
key:
48-
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('**/meta.yaml') }}
52+
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-spec-${{ matrix.python == '3.14' && matrix.python_spec == '' && 't' || '' }}-${{hashFiles('**/meta.yaml') }}
4953
restore-keys: |
50-
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
54+
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-spec-${{ matrix.python == '3.14' && matrix.python_spec == '' && 't' || '' }}-
5155
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
5256
- name: Add conda to system path
5357
run: echo $CONDA/bin >> $GITHUB_PATH
@@ -61,22 +65,31 @@ jobs:
6165
run: |
6266
# use bootstrap channel to pull NumPy linked with OpenBLAS
6367
CHANNELS="-c conda-forge --override-channels"
64-
VERSIONS="--python ${{ matrix.python }} --numpy 2.0"
6568
TEST="--no-test"
66-
conda build \
67-
$TEST \
68-
$VERSIONS \
69-
$CHANNELS \
70-
conda-recipe
69+
if [ -n "${{ matrix.python_spec }}" ]; then
70+
conda build \
71+
$TEST \
72+
--python "${{ matrix.python_spec }}" \
73+
--numpy 2.0 \
74+
$CHANNELS \
75+
conda-recipe
76+
else
77+
conda build \
78+
$TEST \
79+
--python ${{ matrix.python }} \
80+
--numpy 2.0 \
81+
$CHANNELS \
82+
conda-recipe
83+
fi
7184
- name: Upload artifact
7285
uses: actions/upload-artifact@v6.0.0
7386
with:
74-
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
87+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python == '3.14' && (matrix.python_spec != '' && '3.14' || '3.14t') || matrix.python }}
7588
path: /usr/share/miniconda/conda-bld/linux-64/${{ env.PACKAGE_NAME }}-*.conda
7689
- name: Upload wheels artifact
7790
uses: actions/upload-artifact@v6.0.0
7891
with:
79-
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
92+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python == '3.14' && (matrix.python_spec != '' && '3.14' || '3.14t') || matrix.python }}
8093
path: ${{ env.WHEELS_OUTPUT_FOLDER }}${{ env.PACKAGE_NAME }}-*.whl
8194

8295
build_windows:
@@ -86,6 +99,10 @@ jobs:
8699
strategy:
87100
matrix:
88101
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
102+
python_spec: ['']
103+
include:
104+
- python: '3.14'
105+
python_spec: '3.14.* *_cp314'
89106
steps:
90107
- name: Cancel Previous Runs
91108
uses: styfle/cancel-workflow-action@3155a141048f8f89c06b4cdae32e7853e97536bc # 0.13.0
@@ -118,9 +135,9 @@ jobs:
118135
with:
119136
path: /home/runner/conda_pkgs_dir
120137
key:
121-
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('**/meta.yaml') }}
138+
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-spec-${{ matrix.python == '3.14' && matrix.python_spec == '' && 't' || '' }}-${{hashFiles('**/meta.yaml') }}
122139
restore-keys: |
123-
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
140+
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-spec-${{ matrix.python == '3.14' && matrix.python_spec == '' && 't' || '' }}-
124141
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
125142
126143
- name: Store conda paths as envs
@@ -135,18 +152,23 @@ jobs:
135152
run: |
136153
conda activate
137154
# TODO: roll back use of Intel channel when 2025.1 is available on conda-forge
138-
conda build --no-test --python ${{ matrix.python }} --numpy 2.0 -c ${{ env.INTEL_CHANNEL }} -c conda-forge --override-channels conda-recipe
155+
$PYTHON_SPEC = "${{ matrix.python_spec }}"
156+
if ($PYTHON_SPEC -ne "") {
157+
conda build --no-test --python "$PYTHON_SPEC" --numpy 2.0 -c ${{ env.INTEL_CHANNEL }} -c conda-forge --override-channels conda-recipe
158+
} else {
159+
conda build --no-test --python ${{ matrix.python }} --numpy 2.0 -c ${{ env.INTEL_CHANNEL }} -c conda-forge --override-channels conda-recipe
160+
}
139161
140162
- name: Upload artifact
141163
uses: actions/upload-artifact@v6.0.0
142164
with:
143-
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
165+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python == '3.14' && (matrix.python_spec != '' && '3.14' || '3.14t') || matrix.python }}
144166
path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.conda
145167

146168
- name: Upload wheels artifact
147169
uses: actions/upload-artifact@v6.0.0
148170
with:
149-
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
171+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python == '3.14' && (matrix.python_spec != '' && '3.14' || '3.14t') || matrix.python }}
150172
path: ${{ env.WHEELS_OUTPUT_FOLDER }}${{ env.PACKAGE_NAME }}-*.whl
151173

152174
test_linux:
@@ -157,6 +179,10 @@ jobs:
157179
strategy:
158180
matrix:
159181
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
182+
python_spec: ['']
183+
include:
184+
- python: '3.14'
185+
python_spec: '3.14.* *_cp314'
160186
experimental: [false]
161187
runner: [ubuntu-22.04]
162188
continue-on-error: ${{ matrix.experimental }}
@@ -171,7 +197,7 @@ jobs:
171197
- name: Download artifact
172198
uses: actions/download-artifact@v7
173199
with:
174-
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
200+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python == '3.14' && (matrix.python_spec != '' && '3.14' || '3.14t') || matrix.python }}
175201
- name: Add conda to system path
176202
run: echo $CONDA/bin >> $GITHUB_PATH
177203
- name: Install conda-index
@@ -192,7 +218,11 @@ jobs:
192218
run: |
193219
CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
194220
export PACKAGE_VERSION=$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")
195-
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${PACKAGE_VERSION} python=${{ matrix.python }} $CHANNELS --only-deps --dry-run > lockfile
221+
PYTHON_SPEC="${{ matrix.python_spec }}"
222+
if [ -z "${PYTHON_SPEC}" ]; then
223+
PYTHON_SPEC="${{ matrix.python }}"
224+
fi
225+
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${PACKAGE_VERSION} python="${PYTHON_SPEC}" $CHANNELS --only-deps --dry-run > lockfile
196226
cat lockfile
197227
- name: Set pkgs_dirs
198228
run: |
@@ -204,16 +234,20 @@ jobs:
204234
with:
205235
path: ~/.conda/pkgs
206236
key:
207-
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('lockfile') }}
237+
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-spec-${{ matrix.python == '3.14' && matrix.python_spec == '' && 't' || '' }}-${{hashFiles('lockfile') }}
208238
restore-keys: |
209-
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
239+
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-spec-${{ matrix.python == '3.14' && matrix.python_spec == '' && 't' || '' }}-
210240
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
211241
- name: Install dpctl
212242
run: |
213243
export CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
214244
export TEST_DEPENDENCIES="pytest cython setuptools"
215245
export PACKAGE_VERSION=$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")
216-
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${PACKAGE_VERSION} ${TEST_DEPENDENCIES} python=${{ matrix.python }} ${CHANNELS}
246+
PYTHON_SPEC="${{ matrix.python_spec }}"
247+
if [ -z "${PYTHON_SPEC}" ]; then
248+
PYTHON_SPEC="${{ matrix.python }}"
249+
fi
250+
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${PACKAGE_VERSION} ${TEST_DEPENDENCIES} python="${PYTHON_SPEC}" ${CHANNELS}
217251
# Test installed packages
218252
conda list -n ${{ env.TEST_ENV_NAME }}
219253
- name: Smoke test
@@ -253,6 +287,10 @@ jobs:
253287
strategy:
254288
matrix:
255289
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
290+
python_spec: ['']
291+
include:
292+
- python: '3.14'
293+
python_spec: '3.14.* *_cp314'
256294
experimental: [false]
257295
runner: [windows-latest]
258296
continue-on-error: ${{ matrix.experimental }}
@@ -272,7 +310,7 @@ jobs:
272310
- name: Download artifact
273311
uses: actions/download-artifact@v7
274312
with:
275-
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
313+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python == '3.14' && (matrix.python_spec != '' && '3.14' || '3.14t') || matrix.python }}
276314

277315
- uses: conda-incubator/setup-miniconda@v3
278316
with:
@@ -329,7 +367,9 @@ jobs:
329367
FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
330368
SET PACKAGE_VERSION=%%F
331369
)
332-
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
370+
SET "PYTHON_SPEC=${{ matrix.python_spec }}"
371+
IF "%PYTHON_SPEC%"=="" SET "PYTHON_SPEC=${{ matrix.python }}"
372+
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python="%PYTHON_SPEC%" -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
333373
334374
- name: Display lockfile content
335375
shell: pwsh
@@ -342,9 +382,9 @@ jobs:
342382
with:
343383
path: /home/runner/conda_pkgs_dir
344384
key:
345-
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('lockfile') }}
385+
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-spec-${{ matrix.python == '3.14' && matrix.python_spec == '' && 't' || '' }}-${{hashFiles('lockfile') }}
346386
restore-keys: |
347-
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
387+
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-spec-${{ matrix.python == '3.14' && matrix.python_spec == '' && 't' || '' }}-
348388
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
349389
350390
- name: Install opencl_rt
@@ -362,8 +402,10 @@ jobs:
362402
FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
363403
SET PACKAGE_VERSION=%%F
364404
)
405+
SET "PYTHON_SPEC=${{ matrix.python_spec }}"
406+
IF "%PYTHON_SPEC%"=="" SET "PYTHON_SPEC=${{ matrix.python }}"
365407
SET TEST_DEPENDENCIES=pytest"<8" cython setuptools
366-
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %TEST_DEPENDENCIES% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }}
408+
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %TEST_DEPENDENCIES% python="%PYTHON_SPEC%" -c ${{ env.workdir }}/channel ${{ env.CHANNELS }}
367409
368410
- name: Report content of test environment
369411
shell: cmd /C CALL {0}
@@ -424,16 +466,20 @@ jobs:
424466
strategy:
425467
matrix:
426468
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
469+
python_spec: ['']
470+
include:
471+
- python: '3.14'
472+
python_spec: '3.14.* *_cp314'
427473
steps:
428474
- name: Download conda artifact
429475
uses: actions/download-artifact@v7
430476
with:
431-
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
477+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python == '3.14' && (matrix.python_spec != '' && '3.14' || '3.14t') || matrix.python }}
432478

433479
- name: Download wheel artifact
434480
uses: actions/download-artifact@v7
435481
with:
436-
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
482+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python == '3.14' && (matrix.python_spec != '' && '3.14' || '3.14t') || matrix.python }}
437483

438484
- name: Install anaconda-client
439485
run: conda install anaconda-client -c conda-forge --override-channels
@@ -468,16 +514,20 @@ jobs:
468514
strategy:
469515
matrix:
470516
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
517+
python_spec: ['']
518+
include:
519+
- python: '3.14'
520+
python_spec: '3.14.* *_cp314'
471521
steps:
472522
- name: Download artifact
473523
uses: actions/download-artifact@v7
474524
with:
475-
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
525+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python == '3.14' && (matrix.python_spec != '' && '3.14' || '3.14t') || matrix.python }}
476526

477527
- name: Download wheel artifact
478528
uses: actions/download-artifact@v7
479529
with:
480-
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
530+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python == '3.14' && (matrix.python_spec != '' && '3.14' || '3.14t') || matrix.python }}
481531

482532
- uses: conda-incubator/setup-miniconda@v3
483533
with:

.github/workflows/run-tests-from-dppy-bits.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ jobs:
2828
strategy:
2929
matrix:
3030
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
31+
python_spec: ['']
32+
include:
33+
- python: '3.14'
34+
python_spec: '3.14.* *_cp314'
3135
experimental: [false]
3236
runner: [ubuntu-22.04, ubuntu-24.04]
3337
continue-on-error: ${{ matrix.experimental }}
@@ -47,7 +51,11 @@ jobs:
4751
4852
- name: Install dpctl
4953
run: |
50-
conda create -n ${{ env.TEST_ENV_NAME }} -c dppy/label/dev ${{ env.CHANNELS }} dpctl pytest cython setuptools c-compiler cxx-compiler
54+
PYTHON_SPEC="${{ matrix.python_spec }}"
55+
if [ -z "${PYTHON_SPEC}" ]; then
56+
PYTHON_SPEC="${{ matrix.python }}"
57+
fi
58+
conda create -n ${{ env.TEST_ENV_NAME }} -c dppy/label/dev ${{ env.CHANNELS }} dpctl pytest cython setuptools c-compiler cxx-compiler python="${PYTHON_SPEC}"
5159
5260
- name: Smoke test
5361
run: |
@@ -79,6 +87,10 @@ jobs:
7987
strategy:
8088
matrix:
8189
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
90+
python_spec: ['']
91+
include:
92+
- python: '3.14'
93+
python_spec: '3.14.* *_cp314'
8294
experimental: [false]
8395
runner: [windows-latest]
8496

@@ -106,7 +118,9 @@ jobs:
106118

107119
- name: Install dpctl
108120
run: |
109-
conda install -n ${{ env.TEST_ENV_NAME }} -c dppy/label/dev ${{ env.CHANNELS }} dpctl pytest cython setuptools c-compiler cxx-compiler
121+
SET "PYTHON_SPEC=${{ matrix.python_spec }}"
122+
IF "%PYTHON_SPEC%"=="" SET "PYTHON_SPEC=${{ matrix.python }}"
123+
conda install -n ${{ env.TEST_ENV_NAME }} -c dppy/label/dev ${{ env.CHANNELS }} dpctl pytest cython setuptools c-compiler cxx-compiler python="%PYTHON_SPEC%"
110124
111125
# intel-opencl-rt is not being installed when running conda install dpctl, so do it manually
112126
- name: Install intel-opencl-rt

0 commit comments

Comments
 (0)