Skip to content

Commit 9796efd

Browse files
Add building of native Python extension written in C to test_linux_examples
This serves the purpose of verifying that dpctl headers can be compiled by C compiler.
1 parent 4c37773 commit 9796efd

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

.github/workflows/conda-package.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ jobs:
393393
conda install -n examples -y ninja $CHANNELS || exit 1
394394
conda install -n examples -y pybind11 cython scikit-build $CHANNELS || exit 1
395395
conda install -n examples -y mkl-dpcpp mkl-devel-dpcpp dpcpp_cpp_rt $CHANNELS || exit 1
396-
conda create -y -n build_env -c intel dpcpp_linux-64
396+
conda create -y -n build_env -c intel gcc_linux-64 gxx_linux-64 dpcpp_linux-64
397397
- name: Install dpctl
398398
shell: bash -l {0}
399399
run: |
@@ -424,7 +424,7 @@ jobs:
424424
-DMKL_INCLUDE_DIR=${MKLROOT}/include \
425425
-DTBB_INCLUDE_DIR=${TBBROOT}/include || exit 1
426426
else
427-
CC=dpcpp CXX=dpcpp LD_SHARED="dpcpp -shared" \
427+
CC=dpcpp CXX=dpcpp LDSHARED="dpcpp -shared" \
428428
python setup.py build_ext --inplace || exit 1
429429
fi
430430
conda deactivate
@@ -441,12 +441,22 @@ jobs:
441441
do
442442
pushd $d
443443
conda activate --stack build_env
444-
CC=dpcpp CXX=dpcpp LD_SHARED="dpcpp -shared" \
444+
CC=dpcpp CXX=dpcpp LDSHARED="dpcpp -shared" \
445445
python setup.py build_ext --inplace || exit 1
446446
conda deactivate
447447
LD_LIBRARY_PATH=${CONDA_PREFIX}/lib python run.py || exit 1
448448
popd
449449
done
450+
cd ../c
451+
for d in $(ls)
452+
do
453+
pushd $d
454+
conda activate --stack build_env
455+
python setup.py build_ext --inplace || exit 1
456+
conda deactivate
457+
python -m pytest tests || exit 1
458+
popd
459+
done
450460
- name: Run Python examples
451461
shell: bash -l {0}
452462
run: |

0 commit comments

Comments
 (0)