Skip to content

Commit 31c68e4

Browse files
committed
test dpctl built with and without free-threaded Python 3.14 in public CI
1 parent c5d69b8 commit 31c68e4

2 files changed

Lines changed: 95 additions & 31 deletions

File tree

.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@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1
@@ -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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
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:
@@ -89,6 +102,10 @@ jobs:
89102
strategy:
90103
matrix:
91104
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
105+
python_spec: ['']
106+
include:
107+
- python: '3.14'
108+
python_spec: '3.14.* *_cp314'
92109
steps:
93110
- name: Cancel Previous Runs
94111
uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1
@@ -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
@@ -134,18 +151,23 @@ jobs:
134151
OVERRIDE_INTEL_IPO: 1 # IPO requires more resources that GH actions VM provides
135152
run: |
136153
# TODO: roll back use of Intel channel when 2025.1 is available on conda-forge
137-
conda build --no-test --python ${{ matrix.python }} --numpy 2.0 -c ${{ env.INTEL_CHANNEL }} -c conda-forge --override-channels conda-recipe
154+
set PYTHON_VER="${{ matrix.python_spec }}"
155+
if "%PYTHON_VER%" NEQ "" (
156+
conda build --no-test --python "%PYTHON_VER%" --numpy 2.0 -c ${{ env.INTEL_CHANNEL }} -c conda-forge --override-channels conda-recipe
157+
) else (
158+
conda build --no-test --python ${{ matrix.python }} --numpy 2.0 -c ${{ env.INTEL_CHANNEL }} -c conda-forge --override-channels conda-recipe
159+
)
138160
139161
- name: Upload artifact
140162
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
141163
with:
142-
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
164+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python == '3.14' && (matrix.python_spec != '' && '3.14' || '3.14t') || matrix.python }}
143165
path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.conda
144166

145167
- name: Upload wheels artifact
146168
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
147169
with:
148-
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
170+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python == '3.14' && (matrix.python_spec != '' && '3.14' || '3.14t') || matrix.python }}
149171
path: ${{ env.WHEELS_OUTPUT_FOLDER }}${{ env.PACKAGE_NAME }}-*.whl
150172

151173
test_linux:
@@ -156,6 +178,10 @@ jobs:
156178
strategy:
157179
matrix:
158180
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
181+
python_spec: ['']
182+
include:
183+
- python: '3.14'
184+
python_spec: '3.14.* *_cp314'
159185
experimental: [false]
160186
runner: [ubuntu-22.04]
161187
continue-on-error: ${{ matrix.experimental }}
@@ -170,7 +196,7 @@ jobs:
170196
- name: Download artifact
171197
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
172198
with:
173-
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
199+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python == '3.14' && (matrix.python_spec != '' && '3.14' || '3.14t') || matrix.python }}
174200
- name: Add conda to system path
175201
run: echo $CONDA/bin >> $GITHUB_PATH
176202
- name: Install conda-index
@@ -191,7 +217,11 @@ jobs:
191217
run: |
192218
CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
193219
export PACKAGE_VERSION=$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")
194-
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${PACKAGE_VERSION} python=${{ matrix.python }} $CHANNELS --only-deps --dry-run > lockfile
220+
PYTHON_VER="${{ matrix.python_spec }}"
221+
if [ -z "${PYTHON_VER}" ]; then
222+
PYTHON_VER="${{ matrix.python }}"
223+
fi
224+
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${PACKAGE_VERSION} python="${PYTHON_VER}" $CHANNELS --only-deps --dry-run > lockfile
195225
cat lockfile
196226
- name: Set pkgs_dirs
197227
run: |
@@ -203,16 +233,20 @@ jobs:
203233
with:
204234
path: ~/.conda/pkgs
205235
key:
206-
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('lockfile') }}
236+
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-spec-${{ matrix.python == '3.14' && matrix.python_spec == '' && 't' || '' }}-${{hashFiles('lockfile') }}
207237
restore-keys: |
208-
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
238+
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-spec-${{ matrix.python == '3.14' && matrix.python_spec == '' && 't' || '' }}-
209239
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
210240
- name: Install dpctl
211241
run: |
212242
export CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
213243
export TEST_DEPENDENCIES="pytest cython setuptools"
214244
export PACKAGE_VERSION=$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")
215-
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${PACKAGE_VERSION} ${TEST_DEPENDENCIES} python=${{ matrix.python }} ${CHANNELS}
245+
PYTHON_VER="${{ matrix.python_spec }}"
246+
if [ -z "${PYTHON_VER}" ]; then
247+
PYTHON_VER="${{ matrix.python }}"
248+
fi
249+
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${PACKAGE_VERSION} ${TEST_DEPENDENCIES} python="${PYTHON_VER}" ${CHANNELS}
216250
# Test installed packages
217251
conda list -n ${{ env.TEST_ENV_NAME }}
218252
- name: Smoke test
@@ -252,6 +286,10 @@ jobs:
252286
strategy:
253287
matrix:
254288
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
289+
python_spec: ['']
290+
include:
291+
- python: '3.14'
292+
python_spec: '3.14.* *_cp314'
255293
experimental: [false]
256294
runner: [windows-latest]
257295
continue-on-error: ${{ matrix.experimental }}
@@ -271,7 +309,7 @@ jobs:
271309
- name: Download artifact
272310
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
273311
with:
274-
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
312+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python == '3.14' && (matrix.python_spec != '' && '3.14' || '3.14t') || matrix.python }}
275313

276314
- uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.0
277315
with:
@@ -327,7 +365,9 @@ jobs:
327365
FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
328366
SET PACKAGE_VERSION=%%F
329367
)
330-
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
368+
SET "PYTHON_VER=${{ matrix.python_spec }}"
369+
IF "%PYTHON_VER%"=="" SET "PYTHON_VER=${{ matrix.python }}"
370+
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python="%PYTHON_VER%" -c ${{ env.workdir }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
331371
332372
- name: Display lockfile content
333373
shell: pwsh
@@ -340,9 +380,9 @@ jobs:
340380
with:
341381
path: /home/runner/conda_pkgs_dir
342382
key:
343-
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('lockfile') }}
383+
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-spec-${{ matrix.python == '3.14' && matrix.python_spec == '' && 't' || '' }}-${{hashFiles('lockfile') }}
344384
restore-keys: |
345-
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
385+
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-spec-${{ matrix.python == '3.14' && matrix.python_spec == '' && 't' || '' }}-
346386
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
347387
348388
- name: Install opencl_rt
@@ -360,8 +400,10 @@ jobs:
360400
FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
361401
SET PACKAGE_VERSION=%%F
362402
)
403+
SET "PYTHON_VER=${{ matrix.python_spec }}"
404+
IF "%PYTHON_VER%"=="" SET "PYTHON_VER=${{ matrix.python }}"
363405
SET TEST_DEPENDENCIES=pytest"<8" cython setuptools
364-
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %TEST_DEPENDENCIES% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }}
406+
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %TEST_DEPENDENCIES% python="%PYTHON_VER%" -c ${{ env.workdir }}/channel ${{ env.CHANNELS }}
365407
366408
- name: Report content of test environment
367409
shell: cmd /C CALL {0}
@@ -422,16 +464,20 @@ jobs:
422464
strategy:
423465
matrix:
424466
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
467+
python_spec: ['']
468+
include:
469+
- python: '3.14'
470+
python_spec: '3.14.* *_cp314'
425471
steps:
426472
- name: Download conda artifact
427473
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
428474
with:
429-
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
475+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python == '3.14' && (matrix.python_spec != '' && '3.14' || '3.14t') || matrix.python }}
430476

431477
- name: Download wheel artifact
432478
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
433479
with:
434-
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
480+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python == '3.14' && (matrix.python_spec != '' && '3.14' || '3.14t') || matrix.python }}
435481

436482
- name: Install anaconda-client
437483
run: conda install anaconda-client -c conda-forge --override-channels
@@ -469,16 +515,20 @@ jobs:
469515
strategy:
470516
matrix:
471517
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
518+
python_spec: ['']
519+
include:
520+
- python: '3.14'
521+
python_spec: '3.14.* *_cp314'
472522
steps:
473523
- name: Download artifact
474524
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
475525
with:
476-
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
526+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python == '3.14' && (matrix.python_spec != '' && '3.14' || '3.14t') || matrix.python }}
477527

478528
- name: Download wheel artifact
479529
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
480530
with:
481-
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
531+
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python == '3.14' && (matrix.python_spec != '' && '3.14' || '3.14t') || matrix.python }}
482532

483533
- uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.0
484534
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)