@@ -16,108 +16,51 @@ env:
1616 MODULE_NAME : dpcpp_llvm_spirv
1717
1818jobs :
19- build_linux :
20- runs-on : ubuntu-latest
21-
19+ build :
2220 strategy :
2321 matrix :
2422 python : ["3.9", "3.10", "3.11"]
25-
23+ os : ["ubuntu-latest", "windows-latest"]
24+ runs-on : ${{ matrix.os }}
25+ defaults :
26+ run :
27+ shell : ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -l {0}' }}
2628 steps :
2729 - uses : actions/checkout@v3
2830 with :
2931 fetch-depth : 0
3032
3133 - name : Setup conda-build
32- uses : ./.github/actions/setup-conda-build
33-
34- - name : Build conda package
35- env :
36- CHANNELS : -c intel -c main --override-channels
37- run : conda build --python ${{ matrix.python }} ${{ env.CHANNELS }} conda-recipe
38-
39- - name : Upload artifact
40- uses : actions/upload-artifact@v3
41- with :
42- name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
43- path : /usr/share/miniconda/conda-bld/linux-64/${{ env.PACKAGE_NAME }}-*.tar.bz2
44-
45- build_windows :
46- runs-on : windows-latest
47-
48- strategy :
49- matrix :
50- python : ["3.9", "3.10", "3.11"]
51-
52- env :
53- CHANNELS : -c intel -c main --override-channels
54- conda-bld : C:\Miniconda\conda-bld\win-64\
55-
56- steps :
57- - uses : actions/checkout@v3
58- with :
59- fetch-depth : 0
60- - uses : conda-incubator/setup-miniconda@v2
34+ uses : conda-incubator/setup-miniconda@v3
6135 with :
6236 auto-activate-base : true
6337 activate-environment : " "
6438
65- - name : Cache conda packages
66- uses : actions/cache@v3
67- env :
68- CACHE_NUMBER : 0 # Increase to reset cache
69- with :
70- path : /home/runner/conda_pkgs_dir
71- key :
72- ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('**/meta.yaml') }}
73- restore-keys : |
74- ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
75- ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
7639 - name : Install conda-build
7740 run : conda install conda-build
41+
7842 - name : Build conda package
43+ env :
44+ CHANNELS : -c intel -c conda-forge --override-channels
7945 run : conda build --python ${{ matrix.python }} ${{ env.CHANNELS }} conda-recipe
46+
8047 - name : Upload artifact
8148 uses : actions/upload-artifact@v3
82- with :
83- name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }} ${{ matrix.artifact_name }}
84- path : ${{ env.conda-bld }}${{ env.PACKAGE_NAME }}-*.tar.bz2
85-
86- upload_linux :
87- needs : build_linux
88- if : ${{github.ref == 'refs/heads/main' || (startsWith(github.ref, 'refs/heads/release') == true)}}
89- runs-on : ubuntu-latest
90- strategy :
91- matrix :
92- python : ["3.9", "3.10", "3.11"]
93- steps :
94- - name : Download artifact
95- uses : actions/download-artifact@v3
9649 with :
9750 name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
51+ path : /usr/share/miniconda/conda-bld/linux-64/${{ env.PACKAGE_NAME }}-*.tar.bz2
9852
99- - uses : conda-incubator/setup-miniconda@v2
100- with :
101- auto-activate-base : true
102- activate-environment : " "
103- - name : Install anaconda-client
104- run : conda install anaconda-client
105-
106- - name : Upload
107- env :
108- ANACONDA_TOKEN : ${{ secrets.ANACONDA_TOKEN }}
109- run : |
110- source /usr/share/miniconda/etc/profile.d/conda.sh
111- conda activate
112- anaconda --token $ANACONDA_TOKEN upload --user dppy --label dev ${PACKAGE_NAME}-*.tar.bz2
113-
114- upload_windows :
115- needs : build_windows
53+ upload :
54+ needs : build
11655 if : ${{github.ref == 'refs/heads/main' || (startsWith(github.ref, 'refs/heads/release') == true)}}
117- runs-on : windows-latest
11856 strategy :
11957 matrix :
12058 python : ["3.9", "3.10", "3.11"]
59+ os : ["ubuntu-latest", "windows-latest"]
60+ runs-on : ${{ matrix.os }}
61+ defaults :
62+ run :
63+ shell : ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -l {0}' }}
12164 steps :
12265 - name : Download artifact
12366 uses : actions/download-artifact@v3
13275 run : conda install anaconda-client
13376
13477 - name : Upload
135- env :
136- ANACONDA_TOKEN : ${{ secrets.ANACONDA_TOKEN }}
137- run : |
138- anaconda --token ${{ env.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2
78+ run : anaconda --token ${{ secrets.ANACONDA_TOKEN }} upload --user dppy --label dev ${{ env.PACKAGE_NAME }}-*.tar.bz2
0 commit comments