2424 VER_SCRIPT2 : " d = j['dpnp'][0]; print('='.join((d[s] for s in ('version', 'build'))))"
2525
2626jobs :
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 }}']
3329
3430 strategy :
3531 matrix :
3632 python : ['3.8', '3.9']
33+ os : [ubuntu-latest, windows-latest]
34+ include :
35+ - python : ' 3.10'
36+ os : ubuntu-latest
3737
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 }}
9039
9140 defaults :
9241 run :
93- shell : cmd /C CALL {0}
42+ shell : ${{ matrix.os == 'windows-latest' && ' cmd /C CALL {0}' || 'bash -l {0}' } }
9443
95- strategy :
96- matrix :
97- python : ['3.8', '3.9']
98-
99- env :
100- conda-pkgs : ' C:\Users\runneradmin\conda_pkgs_dir\'
44+ continue-on-error : false
10145
10246 steps :
10347 - name : Cancel Previous Runs
@@ -119,26 +63,31 @@ jobs:
11963 activate-environment : ' build'
12064 use-only-tar-bz2 : true
12165
122- - name : Store conda paths as envs
66+ - if : matrix.os == 'ubuntu-latest'
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
12372 run : |
12473 @echo on
12574 (echo CONDA_BLD=%CONDA_PREFIX%\conda-bld\win-64\) >> %GITHUB_ENV%
12675
76+ - name : Install conda-build
77+ run : conda install conda-build
78+
12779 - name : Cache conda packages
1288012981 env :
13082 CACHE_NUMBER : 1 # Increase to reset cache
13183 with :
132- path : ${{ env.conda-pkgs }}
84+ path : ${{ env.CONDA_PKGS_DIR }}
13385 key :
13486 ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('**/meta.yaml') }}
13587 restore-keys : |
13688 ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
13789 ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
13890
139- - name : Install conda-build
140- run : conda install conda-build
141-
14291 - name : Build conda package
14392 run : conda build --no-test --python ${{ matrix.python }} ${{ env.CHANNELS }} conda-recipe
14493
14998 path : ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.tar.bz2
15099
151100 test_linux :
152- needs : build_linux
101+ name : Test ['ubuntu-latest', python='${{ matrix.python }}']
102+
103+ needs : build
153104
154105 runs-on : ubuntu-latest
155106
@@ -250,7 +201,9 @@ jobs:
250201 working-directory : ${{ env.tests-path }}
251202
252203 test_windows :
253- needs : build_windows
204+ name : Test ['windows-latest', python='${{ matrix.python }}']
205+
206+ needs : build
254207
255208 runs-on : windows-latest
256209
@@ -422,61 +375,28 @@ jobs:
422375 python -m pytest -q -ra --disable-warnings -vv ${{ env.TEST_SCOPE }}
423376 working-directory : ${{ env.tests-path }}
424377
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
378+ upload :
379+ name : Upload ['${{ matrix.os }}', python='${{ matrix.python }}']
433380
434- defaults :
435- run :
436- shell : bash -l {0}
381+ needs : [test_linux, test_windows]
437382
438383 strategy :
439384 matrix :
440385 python : ['3.8', '3.9']
386+ os : [ubuntu-latest, windows-latest]
441387
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'
388+ runs-on : ${{ matrix.os }}
455389
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 }}
390+ defaults :
391+ run :
392+ shell : ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -l {0}' }}
463393
464- upload_windows :
465- needs : test_windows
394+ continue-on-error : false
466395
467396 if : |
468397 (github.repository == 'IntelPython/dpnp') &&
469398 (github.ref == 'refs/heads/master' || (startsWith(github.ref, 'refs/heads/release') == true) || github.event_name == 'push' && contains(github.ref, 'refs/tags/'))
470399
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']
480400 steps :
481401 - name : Download artifact
482402
0 commit comments