@@ -317,7 +317,7 @@ jobs:
317
317
runs-on : ${{ matrix.runner }}
318
318
strategy :
319
319
matrix :
320
- python : [3.8 ]
320
+ python : [3.9 ]
321
321
experimental : [false]
322
322
runner : [ubuntu-latest]
323
323
continue-on-error : ${{ matrix.experimental }}
@@ -363,39 +363,58 @@ jobs:
363
363
restore-keys : |
364
364
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
365
365
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
366
- - name : Install dpctl
366
+ - name : Install example requirements
367
367
shell : bash -l {0}
368
368
run : |
369
+ CHANNELS="${{ env.CHANNELS }}"
369
370
source $CONDA/etc/profile.d/conda.sh
370
- conda activate
371
- CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
372
- conda install -y $PACKAGE_NAME pytest python=${{ matrix.python }} $CHANNELS
373
- # Test installed packages
374
- conda list
375
- - name : Install example requirements
371
+ conda create -n examples -y pytest python=${{ matrix.python }} $CHANNELS
372
+ conda install -n examples -y cmake">=3.22" $CHANNELS || exit 1
373
+ conda install -n examples -y ninja $CHANNELS || exit 1
374
+ conda install -n examples -y pybind11 cython scikit-build $CHANNELS || exit 1
375
+ conda install -n examples -y mkl-dpcpp mkl-devel-dpcpp dpcpp_cpp_rt $CHANNELS || exit 1
376
+ conda create -y -n build_env -c intel dpcpp_linux-64
377
+ - name : Install dpctl
376
378
shell : bash -l {0}
377
379
run : |
378
380
source $CONDA/etc/profile.d/conda.sh
379
- conda install -y pybind11 cython
380
- conda install -y -c intel mkl-dpcpp mkl-devel-dpcpp numba-dppy
381
- conda create -y -n build_env -c intel dpcpp_linux-64
381
+ conda activate
382
+ CHANNELS="-c $GITHUB_WORKSPACE/channel -c dppy/label/dev -c intel --override-channels"
383
+ conda install -n examples -y $CHANNELS numba-dppy dpctl || exit 1
382
384
- name : Build and run examples with native extensions
383
385
shell : bash -l {0}
384
386
run : |
385
387
source $CONDA/etc/profile.d/conda.sh
386
388
export OCL_ICD_FILENAMES=libintelocl.so
387
389
export SYCL_ENABLE_HOST_DEVICE=1
388
- conda activate
390
+ conda activate examples
391
+ conda list
389
392
cd examples/pybind11
390
- export CC=dpcpp
391
- export CXX=dpcpp
392
393
for d in $(ls)
393
394
do
394
395
pushd $d
396
+ export MKLROOT=${CONDA_PREFIX}
397
+ export TBBROOT=${CONDA_PREFIX}
395
398
conda activate --stack build_env
396
- python setup.py build_ext --inplace || exit 1
399
+ if [ -e CMakeLists.txt ]
400
+ then
401
+ python setup.py build_ext --inplace -- -G Ninja \
402
+ -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icpx \
403
+ -DTBB_LIBRARY_DIR=${TBBROOT}/lib \
404
+ -DMKL_LIBRARY_DIR=${MKLROOT}/lib \
405
+ -DMKL_INCLUDE_DIR=${MKLROOT}/include \
406
+ -DTBB_INCLUDE_DIR=${TBBROOT}/include || exit 1
407
+ else
408
+ CC=dpcpp CXX=dpcpp LD_SHARED="dpcpp -shared" \
409
+ python setup.py build_ext --inplace || exit 1
410
+ fi
397
411
conda deactivate
398
- python example.py
412
+ if [ -e tests ]
413
+ then
414
+ LD_LIBRARY_PATH=${CONDA_PREFIX}/lib python -m pytest tests || exit 1
415
+ else
416
+ LD_LIBRARY_PATH=${CONDA_PREFIX}/lib python example.py || exit 1
417
+ fi
399
418
popd
400
419
done
401
420
cd ../cython
@@ -405,7 +424,7 @@ jobs:
405
424
conda activate --stack build_env
406
425
python setup.py build_ext --inplace || exit 1
407
426
conda deactivate
408
- python run.py
427
+ LD_LIBRARY_PATH=${CONDA_PREFIX}/lib python run.py || exit 1
409
428
popd
410
429
done
411
430
- name : Run Python examples
0 commit comments