@@ -4,10 +4,14 @@ on: push
44
55env :
66 PACKAGE_NAME : dpctl
7+ MODULE_NAME : dpctl
78
89jobs :
910 build :
1011 runs-on : ubuntu-latest
12+ strategy :
13+ matrix :
14+ python : [3.8]
1115 steps :
1216 - uses : actions/checkout@v2
1317 with :
2327 with :
2428 path : ~/.conda/pkgs
2529 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 }}-
2734
2835 - name : Add conda to system path
2936 run : echo $CONDA/bin >> $GITHUB_PATH
3239 - name : Build conda package
3340 run : |
3441 CHANNELS="-c intel -c defaults --override-channels"
35- VERSIONS="--python 3.8 "
42+ VERSIONS="--python ${{ matrix.python }} "
3643 TEST="--no-test"
3744
3845 conda build \
@@ -43,17 +50,31 @@ jobs:
4350 - name : Upload artifact
4451 uses : actions/upload-artifact@v2
4552 with :
46- name : ${{ env.PACKAGE_NAME }} ${{ runner.os }}
53+ name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
4754 path : /usr/share/miniconda/conda-bld/linux-64/${{ env.PACKAGE_NAME }}-*.tar.bz2
4855
4956 test :
5057 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+
5273 steps :
5374 - name : Download artifact
5475 uses : actions/download-artifact@v2
5576 with :
56- name : ${{ env.PACKAGE_NAME }} ${{ runner.os }}
77+ name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
5778 - name : Add conda to system path
5879 run : echo $CONDA/bin >> $GITHUB_PATH
5980 - name : Install conda-build
@@ -65,10 +86,11 @@ jobs:
6586 conda index $GITHUB_WORKSPACE/channel
6687 # Test channel
6788 conda search $PACKAGE_NAME -c $GITHUB_WORKSPACE/channel --override-channels
89+
6890 - name : Collect dependencies
6991 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
7294 - name : Set pkgs_dirs
7395 run : |
7496 echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc
@@ -79,28 +101,36 @@ jobs:
79101 with :
80102 path : ~/.conda/pkgs
81103 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
84110 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
87113 # Test installed packages
88114 conda list
89115 - name : Run tests
90116 run : |
91117 # echo "libintelocl.so" | tee /etc/OpenCL/vendors/intel-cpu.icd
92118 export OCL_ICD_FILENAMES=libintelocl.so
93- python -m pytest --pyargs $PACKAGE_NAME
119+ # clinfo -l
120+ python -m pytest --pyargs $MODULE_NAME
94121
95122 upload :
96123 needs : test
97124 if : ${{ github.ref == 'refs/heads/master' }}
98125 runs-on : ubuntu-latest
126+ strategy :
127+ matrix :
128+ python : [3.8]
99129 steps :
100130 - name : Download artifact
101131 uses : actions/download-artifact@v2
102132 with :
103- name : ${{ env.PACKAGE_NAME }} ${{ runner.os }}
133+ name : ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
104134
105135 - name : Install anaconda-client
106136 run : conda install anaconda-client
0 commit comments