14
14
CHANNELS : ' -c dppy/label/dev -c intel -c conda-forge --override-channels'
15
15
CONDA_BUILD_VERSION : ' 24.1.2'
16
16
CONDA_INDEX_VERSION : ' 0.4.0'
17
+ TEST_ENV_NAME : ' test'
17
18
# TODO: to add test_arraymanipulation.py back to the scope once crash on Windows is gone
18
19
TEST_SCOPE : >-
19
20
test_arraycreation.py
@@ -81,12 +82,12 @@ jobs:
81
82
access_token : ${{ github.token }}
82
83
83
84
- name : Checkout DPNP repo
84
- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
85
+ uses : actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
85
86
with :
86
87
fetch-depth : 0
87
88
88
89
- name : Setup miniconda
89
- uses : conda-incubator/setup-miniconda@11b562958363ec5770fef326fe8ef0366f8cbf8a # v3.0.1
90
+ uses : conda-incubator/setup-miniconda@030178870c779d9e5e1b4e563269f3aa69b04081 # v3.0.3
90
91
with :
91
92
auto-update-conda : true
92
93
python-version : ${{ matrix.python }}
@@ -107,7 +108,7 @@ jobs:
107
108
run : conda install conda-build=${{ env.CONDA_BUILD_VERSION}}
108
109
109
110
- name : Cache conda packages
110
- uses : actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
111
+ uses : actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
111
112
env :
112
113
CACHE_NUMBER : 1 # Increase to reset cache
113
114
with :
@@ -155,7 +156,7 @@ jobs:
155
156
156
157
steps :
157
158
- name : Download artifact
158
- uses : actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
159
+ uses : actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
159
160
with :
160
161
name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
161
162
path : ${{ env.pkg-path-in-channel }}
@@ -166,15 +167,15 @@ jobs:
166
167
tar -xvf ${{ env.pkg-path-in-channel }}/${{ env.PACKAGE_NAME }}-*.tar.bz2 -C ${{ env.extracted-pkg-path }}
167
168
168
169
- name : Setup miniconda
169
- uses : conda-incubator/setup-miniconda@11b562958363ec5770fef326fe8ef0366f8cbf8a # v3.0.1
170
+ uses : conda-incubator/setup-miniconda@030178870c779d9e5e1b4e563269f3aa69b04081 # v3.0.3
170
171
with :
171
172
auto-update-conda : true
172
173
python-version : ${{ matrix.python }}
173
174
miniconda-version : ' latest'
174
- activate-environment : ' test '
175
+ activate-environment : ${{ env.TEST_ENV_NAME }}
175
176
176
177
- name : Install conda-index
177
- run : conda install conda-index=${{ env.CONDA_INDEX_VERSION}}
178
+ run : conda install conda-index=${{ env.CONDA_INDEX_VERSION }}
178
179
179
180
- name : Create conda channel
180
181
run : |
@@ -198,7 +199,7 @@ jobs:
198
199
TEST_CHANNELS : ' -c ${{ env.channel-path }} ${{ env.CHANNELS }}'
199
200
200
201
- name : Cache conda packages
201
- uses : actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
202
+ uses : actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
202
203
env :
203
204
CACHE_NUMBER : 1 # Increase to reset cache
204
205
with :
@@ -223,10 +224,25 @@ jobs:
223
224
python -c "import dpnp; print(dpnp.__version__)"
224
225
225
226
# TODO: run the whole scope once the issues on CPU are resolved
227
+ # - name: Run tests
228
+ # run: |
229
+ # python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
230
+ # working-directory: ${{ env.tests-path }}
231
+
232
+ # TODO: remove once 2024.2 release is published
226
233
- name : Run tests
227
- run : |
228
- python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
229
- working-directory : ${{ env.tests-path }}
234
+ id : run_tests_linux
235
+ uses : nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
236
+ with :
237
+ shell : bash
238
+ timeout_minutes : 10
239
+ max_attempts : 5
240
+ retry_on : any
241
+ command : |
242
+ . $CONDA/etc/profile.d/conda.sh
243
+ conda activate ${{ env.TEST_ENV_NAME }}
244
+ cd ${{ env.tests-path }}
245
+ python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
230
246
231
247
test_windows :
232
248
name : Test ['windows-latest', python='${{ matrix.python }}']
@@ -252,11 +268,10 @@ jobs:
252
268
extracted-pkg-path : ' ${{ github.workspace }}\pkg'
253
269
tests-path : ' ${{ github.workspace }}\pkg\info\test\tests\'
254
270
ver-json-path : ' ${{ github.workspace }}\version.json'
255
- active-env-name : ' test'
256
271
257
272
steps :
258
273
- name : Download artifact
259
- uses : actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
274
+ uses : actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
260
275
with :
261
276
name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
262
277
path : ${{ env.pkg-path-in-channel }}
@@ -276,12 +291,12 @@ jobs:
276
291
dir ${{ env.extracted-pkg-path }}
277
292
278
293
- name : Setup miniconda
279
- uses : conda-incubator/setup-miniconda@11b562958363ec5770fef326fe8ef0366f8cbf8a # v3.0.1
294
+ uses : conda-incubator/setup-miniconda@030178870c779d9e5e1b4e563269f3aa69b04081 # v3.0.3
280
295
with :
281
296
auto-update-conda : true
282
297
python-version : ${{ matrix.python }}
283
298
miniconda-version : ' latest'
284
- activate-environment : ${{ env.active-env-name }}
299
+ activate-environment : ${{ env.TEST_ENV_NAME }}
285
300
286
301
- name : Store conda paths as envs
287
302
run : |
@@ -323,7 +338,7 @@ jobs:
323
338
run : more lockfile
324
339
325
340
- name : Cache conda packages
326
- uses : actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
341
+ uses : actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
327
342
env :
328
343
CACHE_NUMBER : 1 # Increase to reset cache
329
344
with :
@@ -334,9 +349,6 @@ jobs:
334
349
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
335
350
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
336
351
337
- - name : Install opencl_rt
338
- run : conda install opencl_rt -c intel --override-channels
339
-
340
352
- name : Install dpnp
341
353
run : |
342
354
@echo on
@@ -362,10 +374,24 @@ jobs:
362
374
python -c "import dpnp; print(dpnp.__version__)"
363
375
364
376
# TODO: run the whole scope once the issues on CPU are resolved
377
+ # - name: Run tests
378
+ # run: |
379
+ # python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
380
+ # working-directory: ${{ env.tests-path }}
381
+
382
+ # TODO: remove once 2024.2 release is published
365
383
- name : Run tests
366
- run : |
367
- python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
368
- working-directory : ${{ env.tests-path }}
384
+ id : run_tests_win
385
+ uses : nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
386
+ with :
387
+ shell : cmd
388
+ timeout_minutes : 15
389
+ max_attempts : 5
390
+ retry_on : any
391
+ command : >-
392
+ conda activate ${{ env.TEST_ENV_NAME }}
393
+ & cd ${{ env.tests-path }}
394
+ & python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
369
395
370
396
upload :
371
397
name : Upload ['${{ matrix.os }}', python='${{ matrix.python }}']
@@ -391,12 +417,12 @@ jobs:
391
417
392
418
steps :
393
419
- name : Download artifact
394
- uses : actions/download-artifact@eaceaf801fd36c7dee90939fad912460b18a1ffe # v4.1.2
420
+ uses : actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
395
421
with :
396
422
name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
397
423
398
424
- name : Setup miniconda
399
- uses : conda-incubator/setup-miniconda@11b562958363ec5770fef326fe8ef0366f8cbf8a # v3.0.1
425
+ uses : conda-incubator/setup-miniconda@030178870c779d9e5e1b4e563269f3aa69b04081 # v3.0.3
400
426
with :
401
427
auto-update-conda : true
402
428
python-version : ${{ matrix.python }}
@@ -419,7 +445,7 @@ jobs:
419
445
run :
420
446
shell : bash -el {0}
421
447
steps :
422
- - uses : conda-incubator/setup-miniconda@11b562958363ec5770fef326fe8ef0366f8cbf8a # v3.0.1
448
+ - uses : conda-incubator/setup-miniconda@030178870c779d9e5e1b4e563269f3aa69b04081 # v3.0.3
423
449
with :
424
450
run-post : false
425
451
channel-priority : " disabled"
@@ -430,7 +456,7 @@ jobs:
430
456
run : conda install anaconda-client
431
457
432
458
- name : Checkout repo
433
- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
459
+ uses : actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
434
460
with :
435
461
repository : IntelPython/devops-tools
436
462
fetch-depth : 0
0 commit comments