9
9
env :
10
10
PACKAGE_NAME : dpnp
11
11
MODULE_NAME : dpnp
12
- CHANNELS : ' -c dppy/label/dev -c intel -c defaults --override-channels'
12
+ CHANNELS : ' -c dppy/label/dev -c intel -c main --override-channels'
13
13
TEST_SCOPE : >-
14
14
test_arraycreation.py
15
15
test_dparray.py
24
24
VER_SCRIPT2 : " d = j['dpnp'][0]; print('='.join((d[s] for s in ('version', 'build'))))"
25
25
26
26
jobs :
27
- build_linux :
28
- runs-on : ubuntu-latest
29
-
30
- defaults :
31
- run :
32
- shell : bash -l {0}
27
+ build :
28
+ name : Build ['${{ matrix.os }}', python='${{ matrix.python }}']
33
29
34
30
strategy :
35
31
matrix :
36
32
python : ['3.8', '3.9']
33
+ os : [ubuntu-20.04, windows-latest]
34
+ include :
35
+ - python : ' 3.10'
36
+ os : ubuntu-20.04
37
37
38
- env :
39
- conda-pkgs : ' /home/runner/conda_pkgs_dir/'
40
-
41
- steps :
42
- - name : Cancel Previous Runs
43
-
44
- with :
45
- access_token : ${{ github.token }}
46
-
47
- - name : Checkout DPNP repo
48
-
49
- with :
50
- fetch-depth : 0
51
-
52
- - name : Setup miniconda
53
- uses :
conda-incubator/[email protected]
54
- with :
55
- auto-update-conda : true
56
- python-version : ${{ matrix.python }}
57
- miniconda-version : ' latest'
58
- activate-environment : ' build'
59
- use-only-tar-bz2 : true
60
-
61
- - name : Store conda paths as envs
62
- run : echo "CONDA_BLD=$CONDA_PREFIX/conda-bld/linux-64/" >> $GITHUB_ENV
63
-
64
- - name : Install conda-build
65
- run : conda install conda-build
66
-
67
- - name : Cache conda packages
68
-
69
- env :
70
- CACHE_NUMBER : 1 # Increase to reset cache
71
- with :
72
- path : ${{ env.conda-pkgs }}
73
- key :
74
- ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('**/meta.yaml') }}
75
- restore-keys : |
76
- ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
77
- ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
78
-
79
- - name : Build conda package
80
- run : conda build --no-test --python ${{ matrix.python }} ${{ env.CHANNELS }} conda-recipe
81
-
82
- - name : Upload artifact
83
-
84
- with :
85
- name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
86
- path : ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.tar.bz2
87
-
88
- build_windows :
89
- runs-on : windows-latest
38
+ runs-on : ${{ matrix.os }}
90
39
91
40
defaults :
92
41
run :
93
- shell : cmd /C CALL {0}
94
-
95
- strategy :
96
- matrix :
97
- python : ['3.8', '3.9']
42
+ shell : ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -l {0}' }}
98
43
99
- env :
100
- conda-pkgs : ' C:\Users\runneradmin\conda_pkgs_dir\'
44
+ continue-on-error : false
101
45
102
46
steps :
103
47
- name : Cancel Previous Runs
@@ -119,26 +63,31 @@ jobs:
119
63
activate-environment : ' build'
120
64
use-only-tar-bz2 : true
121
65
122
- - name : Store conda paths as envs
66
+ - if : matrix.os == 'ubuntu-20.04'
67
+ name : Store conda paths as envs on Linux
68
+ run : echo "CONDA_BLD=$CONDA_PREFIX/conda-bld/linux-64/" >> $GITHUB_ENV
69
+
70
+ - if : matrix.os == 'windows-latest'
71
+ name : Store conda paths as envs on Win
123
72
run : |
124
73
@echo on
125
74
(echo CONDA_BLD=%CONDA_PREFIX%\conda-bld\win-64\) >> %GITHUB_ENV%
126
75
76
+ - name : Install conda-build
77
+ run : conda install conda-build
78
+
127
79
- name : Cache conda packages
128
80
129
81
env :
130
82
CACHE_NUMBER : 1 # Increase to reset cache
131
83
with :
132
- path : ${{ env.conda-pkgs }}
84
+ path : ${{ env.CONDA_PKGS_DIR }}
133
85
key :
134
86
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('**/meta.yaml') }}
135
87
restore-keys : |
136
88
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
137
89
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
138
90
139
- - name : Install conda-build
140
- run : conda install conda-build
141
-
142
91
- name : Build conda package
143
92
run : conda build --no-test --python ${{ matrix.python }} ${{ env.CHANNELS }} conda-recipe
144
93
@@ -149,9 +98,11 @@ jobs:
149
98
path : ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.tar.bz2
150
99
151
100
test_linux :
152
- needs : build_linux
101
+ name : Test ['${{ matrix.os }}', python='${{ matrix.python }}']
153
102
154
- runs-on : ubuntu-latest
103
+ needs : build
104
+
105
+ runs-on : ${{ matrix.os }}
155
106
156
107
defaults :
157
108
run :
@@ -160,6 +111,8 @@ jobs:
160
111
strategy :
161
112
matrix :
162
113
python : ['3.8', '3.9']
114
+ os : [ubuntu-20.04, ubuntu-latest]
115
+
163
116
experimental : [false]
164
117
165
118
continue-on-error : ${{ matrix.experimental }}
@@ -250,7 +203,9 @@ jobs:
250
203
working-directory : ${{ env.tests-path }}
251
204
252
205
test_windows :
253
- needs : build_windows
206
+ name : Test ['windows-latest', python='${{ matrix.python }}']
207
+
208
+ needs : build
254
209
255
210
runs-on : windows-latest
256
211
@@ -422,61 +377,28 @@ jobs:
422
377
python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
423
378
working-directory : ${{ env.tests-path }}
424
379
425
- upload_linux :
426
- needs : test_linux
427
-
428
- if : |
429
- (github.repository == 'IntelPython/dpnp') &&
430
- (github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
431
-
432
- runs-on : ubuntu-latest
380
+ upload :
381
+ name : Upload ['${{ matrix.os }}', python='${{ matrix.python }}']
433
382
434
- defaults :
435
- run :
436
- shell : bash -l {0}
383
+ needs : [test_linux, test_windows]
437
384
438
385
strategy :
439
386
matrix :
440
387
python : ['3.8', '3.9']
388
+ os : [ubuntu-20.04, windows-latest]
441
389
442
- steps :
443
- - name : Download artifact
444
-
445
- with :
446
- name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
447
-
448
- - name : Setup miniconda
449
- uses :
conda-incubator/[email protected]
450
- with :
451
- auto-update-conda : true
452
- python-version : ${{ matrix.python }}
453
- miniconda-version : ' latest'
454
- activate-environment : ' upload'
390
+ runs-on : ${{ matrix.os }}
455
391
456
- - name : Install anaconda-client
457
- run : conda install anaconda-client
458
-
459
- - name : Upload
460
- run : anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2
461
- env :
462
- ANACONDA_TOKEN : ${{ secrets.ANACONDA_TOKEN }}
392
+ defaults :
393
+ run :
394
+ shell : ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -l {0}' }}
463
395
464
- upload_windows :
465
- needs : test_windows
396
+ continue-on-error : false
466
397
467
398
if : |
468
399
(github.repository == 'IntelPython/dpnp') &&
469
400
(github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
470
401
471
- runs-on : windows-latest
472
-
473
- defaults :
474
- run :
475
- shell : cmd /C CALL {0}
476
-
477
- strategy :
478
- matrix :
479
- python : ['3.8', '3.9']
480
402
steps :
481
403
- name : Download artifact
482
404
0 commit comments