13
13
# Follow oneAPI installation instruction for conda, since intel channel is not longer available
14
14
# CHANNELS: '-c dppy/label/dev -c intel -c conda-forge --override-channels'
15
15
CHANNELS : ' -c dppy/label/dev -c https://software.repos.intel.com/python/conda/ -c conda-forge --override-channels'
16
+ CONDA_BUILD_INDEX_ENV_PY_VER : ' 3.12' # conda does not support python 3.13
16
17
CONDA_BUILD_VERSION : ' 24.11.2'
17
18
CONDA_INDEX_VERSION : ' 0.5.0'
18
19
RERUN_TESTS_ON_FAILURE : ' true'
24
25
25
26
jobs :
26
27
build :
27
- name : Build ['${{ matrix.os }}', python='${{ matrix.python }}']
28
+ name : Build
28
29
29
30
strategy :
31
+ fail-fast : false
30
32
matrix :
31
- python : ['3.9', '3.10', '3.11', '3.12']
33
+ python : ['3.9', '3.10', '3.11', '3.12', '3.13' ]
32
34
os : [ubuntu-22.04, windows-2019]
33
35
34
36
permissions :
41
43
run :
42
44
shell : ${{ matrix.os == 'windows-2019' && 'cmd /C CALL {0}' || 'bash -el {0}' }}
43
45
44
- continue-on-error : true
45
-
46
46
steps :
47
47
- name : Cancel Previous Runs
48
48
uses : styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
@@ -55,18 +55,27 @@ jobs:
55
55
fetch-depth : 0
56
56
57
57
- name : Setup miniconda
58
+ id : setup_miniconda
59
+ continue-on-error : true
58
60
uses : conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
59
61
with :
60
62
miniforge-version : latest
61
63
use-mamba : ' true'
62
64
channels : conda-forge
63
65
conda-remove-defaults : ' true'
64
- python-version : ${{ matrix.python }}
66
+ python-version : ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER }}
65
67
activate-environment : ' build'
66
68
67
- # Sometimes `mamba install ...` fails due to slow download speed rate, so disable the check in mamba
68
- - name : Disable speed limit check in mamba
69
- run : echo "MAMBA_NO_LOW_SPEED_LIMIT=1" >> $GITHUB_ENV
69
+ - name : ReSetup miniconda
70
+ if : steps.setup_miniconda.outcome == 'failure'
71
+ uses : conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
72
+ with :
73
+ miniforge-version : latest
74
+ use-mamba : ' true'
75
+ channels : conda-forge
76
+ conda-remove-defaults : ' true'
77
+ python-version : ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER}}
78
+ activate-environment : ' build'
70
79
71
80
- name : Store conda paths as envs
72
81
shell : bash -el {0}
75
84
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE${{ runner.os == 'Linux' && '/' || '\\' }}" >> $GITHUB_ENV
76
85
77
86
- name : Install conda-build
87
+ id : install_conda_build
88
+ continue-on-error : true
89
+ run : mamba install conda-build=${{ env.CONDA_BUILD_VERSION}}
90
+
91
+ - name : ReInstall conda-build
92
+ if : steps.install_conda_build.outcome == 'failure'
78
93
run : mamba install conda-build=${{ env.CONDA_BUILD_VERSION}}
79
94
80
95
- name : Build conda package
@@ -83,33 +98,33 @@ jobs:
83
98
MAX_BUILD_CMPL_MKL_VERSION : ' 2025.1a0'
84
99
85
100
- name : Upload artifact
86
- uses : actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5 .0
101
+ uses : actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6 .0
87
102
with :
88
103
name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
89
104
path : ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.tar.bz2
90
105
91
106
- name : Upload wheels artifact
92
- uses : actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5 .0
107
+ uses : actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6 .0
93
108
with :
94
109
name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
95
110
path : ${{ env.WHEELS_OUTPUT_FOLDER }}${{ env.PACKAGE_NAME }}-*.whl
96
111
97
112
test_linux :
98
- name : Test ['ubuntu-latest', python='${{ matrix.python }}']
113
+ name : Test
99
114
100
115
needs : build
101
116
102
- runs-on : ubuntu-latest
117
+ runs-on : ${{ matrix.os }}
103
118
104
119
defaults :
105
120
run :
106
121
shell : bash -el {0}
107
122
108
123
strategy :
124
+ fail-fast : false
109
125
matrix :
110
- python : ['3.9', '3.10', '3.11', '3.12']
111
-
112
- continue-on-error : true
126
+ python : ['3.9', '3.10', '3.11', '3.12', '3.13']
127
+ os : [ubuntu-latest]
113
128
114
129
env :
115
130
channel-path : ' ${{ github.workspace }}/channel/'
@@ -130,13 +145,26 @@ jobs:
130
145
tar -xvf ${{ env.pkg-path-in-channel }}/${{ env.PACKAGE_NAME }}-*.tar.bz2 -C ${{ env.extracted-pkg-path }}
131
146
132
147
- name : Setup miniconda
148
+ id : setup_miniconda
149
+ continue-on-error : true
133
150
uses : conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
134
151
with :
135
152
miniforge-version : latest
136
153
use-mamba : ' true'
137
154
channels : conda-forge
138
155
conda-remove-defaults : ' true'
139
- python-version : ${{ matrix.python }}
156
+ python-version : ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER}}
157
+ activate-environment : ${{ env.TEST_ENV_NAME }}
158
+
159
+ - name : ReSetup miniconda
160
+ if : steps.setup_miniconda.outcome == 'failure'
161
+ uses : conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
162
+ with :
163
+ miniforge-version : latest
164
+ use-mamba : ' true'
165
+ channels : conda-forge
166
+ conda-remove-defaults : ' true'
167
+ python-version : ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER}}
140
168
activate-environment : ${{ env.TEST_ENV_NAME }}
141
169
142
170
- name : Install conda-index
@@ -158,11 +186,24 @@ jobs:
158
186
echo PACKAGE_VERSION=${PACKAGE_VERSION}
159
187
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
160
188
189
+ # conda-index does not support python 3.13
190
+ - name : Remove conda-index
191
+ run : mamba remove conda-index
192
+
161
193
- name : Install dpnp
162
- run : mamba install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest python=${{ matrix.python }} ${{ env.TEST_CHANNELS }}
194
+ id : install_dpnp
195
+ continue-on-error : true
196
+ run : |
197
+ mamba install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest python=${{ matrix.python }} ${{ env.TEST_CHANNELS }}
198
+ env :
199
+ TEST_CHANNELS : ' -c ${{ env.channel-path }} ${{ env.CHANNELS }}'
200
+
201
+ - name : ReInstall dpnp
202
+ if : steps.install_dpnp.outcome == 'failure'
203
+ run : |
204
+ mamba install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest python=${{ matrix.python }} ${{ env.TEST_CHANNELS }}
163
205
env :
164
206
TEST_CHANNELS : ' -c ${{ env.channel-path }} ${{ env.CHANNELS }}'
165
- MAMBA_NO_LOW_SPEED_LIMIT : 1
166
207
167
208
- name : List installed packages
168
209
run : mamba list
@@ -193,21 +234,21 @@ jobs:
193
234
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
194
235
195
236
test_windows :
196
- name : Test ['windows-2019', python='${{ matrix.python }}']
237
+ name : Test
197
238
198
239
needs : build
199
240
200
- runs-on : windows-2019
241
+ runs-on : ${{ matrix.os }}
201
242
202
243
defaults :
203
244
run :
204
245
shell : cmd /C CALL {0}
205
246
206
247
strategy :
248
+ fail-fast : false
207
249
matrix :
208
- python : ['3.9', '3.10', '3.11', '3.12']
209
-
210
- continue-on-error : true
250
+ python : ['3.9', '3.10', '3.11', '3.12', '3.13']
251
+ os : [windows-2019]
211
252
212
253
env :
213
254
channel-path : ' ${{ github.workspace }}\channel\'
@@ -244,7 +285,7 @@ jobs:
244
285
use-mamba : ' true'
245
286
channels : conda-forge
246
287
conda-remove-defaults : ' true'
247
- python-version : ${{ matrix.python }}
288
+ python-version : ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER }}
248
289
activate-environment : ${{ env.TEST_ENV_NAME }}
249
290
250
291
- name : Store conda paths as envs
@@ -279,6 +320,10 @@ jobs:
279
320
echo PACKAGE_VERSION: %PACKAGE_VERSION%
280
321
(echo PACKAGE_VERSION=%PACKAGE_VERSION%) >> %GITHUB_ENV%
281
322
323
+ # conda-index does not support python 3.13
324
+ - name : Remove conda-index
325
+ run : mamba remove conda-index
326
+
282
327
- name : Install dpnp
283
328
run : |
284
329
@echo on
@@ -325,13 +370,13 @@ jobs:
325
370
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
326
371
327
372
upload :
328
- name : Upload ['${{ matrix.os }}', python='${{ matrix.python }}']
373
+ name : Upload
329
374
330
375
needs : [test_linux, test_windows]
331
376
332
377
strategy :
333
378
matrix :
334
- python : ['3.9', '3.10', '3.11', '3.12']
379
+ python : ['3.9', '3.10', '3.11', '3.12', '3.13' ]
335
380
os : [ubuntu-22.04, windows-2019]
336
381
337
382
runs-on : ${{ matrix.os }}
@@ -406,7 +451,7 @@ jobs:
406
451
channels : conda-forge
407
452
conda-remove-defaults : ' true'
408
453
run-post : ' false'
409
- python-version : ' 3.12 '
454
+ python-version : ' 3.13 '
410
455
activate-environment : ' cleanup'
411
456
412
457
- name : Install anaconda-client
0 commit comments