@@ -4,10 +4,14 @@ on: push
4
4
5
5
env :
6
6
PACKAGE_NAME : dpctl
7
+ MODULE_NAME : dpctl
7
8
8
9
jobs :
9
10
build :
10
11
runs-on : ubuntu-latest
12
+ strategy :
13
+ matrix :
14
+ python : [3.8]
11
15
steps :
12
16
- uses : actions/checkout@v2
13
17
with :
23
27
with :
24
28
path : ~/.conda/pkgs
25
29
key :
26
- ${{ runner.os }}-conda-build-${{ env.CACHE_NUMBER }}-${{hashFiles('**/meta.yaml') }}
30
+ ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('**/meta.yaml') }}
31
+ restore-keys : |
32
+ ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
33
+ ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
27
34
28
35
- name : Add conda to system path
29
36
run : echo $CONDA/bin >> $GITHUB_PATH
32
39
- name : Build conda package
33
40
run : |
34
41
CHANNELS="-c intel -c defaults --override-channels"
35
- VERSIONS="--python 3.8 "
42
+ VERSIONS="--python ${{ matrix.python }} "
36
43
TEST="--no-test"
37
44
38
45
conda build \
@@ -43,17 +50,31 @@ jobs:
43
50
- name : Upload artifact
44
51
uses : actions/upload-artifact@v2
45
52
with :
46
- name : ${{ env.PACKAGE_NAME }} ${{ runner.os }}
53
+ name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
47
54
path : /usr/share/miniconda/conda-bld/linux-64/${{ env.PACKAGE_NAME }}-*.tar.bz2
48
55
49
56
test :
50
57
needs : build
51
- runs-on : ubuntu-latest
58
+ runs-on : ${{ matrix.runner }}
59
+
60
+ strategy :
61
+ matrix :
62
+ python : [3.8]
63
+ experimental : [false]
64
+ runner : [ubuntu-latest]
65
+ include :
66
+ - python : 3.8
67
+ experimental : true
68
+ runner : [self-hosted, gen9]
69
+ continue-on-error : ${{ matrix.experimental }}
70
+ env :
71
+ CHANNELS : -c intel -c defaults --override-channels
72
+
52
73
steps :
53
74
- name : Download artifact
54
75
uses : actions/download-artifact@v2
55
76
with :
56
- name : ${{ env.PACKAGE_NAME }} ${{ runner.os }}
77
+ name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
57
78
- name : Add conda to system path
58
79
run : echo $CONDA/bin >> $GITHUB_PATH
59
80
- name : Install conda-build
@@ -65,10 +86,11 @@ jobs:
65
86
conda index $GITHUB_WORKSPACE/channel
66
87
# Test channel
67
88
conda search $PACKAGE_NAME -c $GITHUB_WORKSPACE/channel --override-channels
89
+
68
90
- name : Collect dependencies
69
91
run : |
70
- CHANNELS="-c $GITHUB_WORKSPACE/channel -c intel -c defaults --override-channels "
71
- conda install $PACKAGE_NAME $CHANNELS --only-deps --dry-run > lockfile
92
+ CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }} "
93
+ conda install $PACKAGE_NAME python=${{ matrix.python }} $CHANNELS --only-deps --dry-run > lockfile
72
94
- name : Set pkgs_dirs
73
95
run : |
74
96
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc
@@ -79,28 +101,36 @@ jobs:
79
101
with :
80
102
path : ~/.conda/pkgs
81
103
key :
82
- ${{ runner.os }}-conda-test-${{ env.CACHE_NUMBER }}-${{hashFiles('lockfile') }}
83
- - name : Install ${{ env.PACKAGE_NAME }}
104
+ ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-${{hashFiles('lockfile') }}
105
+ restore-keys : |
106
+ ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
107
+ ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
108
+
109
+ - name : Install dpctl
84
110
run : |
85
- CHANNELS="-c $GITHUB_WORKSPACE/channel -c intel -c defaults --override-channels "
86
- conda install $PACKAGE_NAME pytest $CHANNELS
111
+ CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }} "
112
+ conda install $PACKAGE_NAME pytest python=${{ matrix.python }} $CHANNELS
87
113
# Test installed packages
88
114
conda list
89
115
- name : Run tests
90
116
run : |
91
117
# echo "libintelocl.so" | tee /etc/OpenCL/vendors/intel-cpu.icd
92
118
export OCL_ICD_FILENAMES=libintelocl.so
93
- python -m pytest --pyargs $PACKAGE_NAME
119
+ # clinfo -l
120
+ python -m pytest --pyargs $MODULE_NAME
94
121
95
122
upload :
96
123
needs : test
97
124
if : ${{ github.ref == 'refs/heads/master' }}
98
125
runs-on : ubuntu-latest
126
+ strategy :
127
+ matrix :
128
+ python : [3.8]
99
129
steps :
100
130
- name : Download artifact
101
131
uses : actions/download-artifact@v2
102
132
with :
103
- name : ${{ env.PACKAGE_NAME }} ${{ runner.os }}
133
+ name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
104
134
105
135
- name : Install anaconda-client
106
136
run : conda install anaconda-client
0 commit comments