3535 cling : Off
3636 cppyy : On
3737 coverage : true
38+ - name : ubu22-x86-gcc12-clang-repl-17-xeus-clang-repl
39+ os : ubuntu-22.04
40+ compiler : gcc-12
41+ clang-runtime : ' 17'
42+ cling : Off
43+ cppyy : On
44+ xeus-clang-repl : On
45+ coverage : true
3846 - name : ubu22-x86-gcc9-clang-repl-16
3947 os : ubuntu-22.04
4048 compiler : gcc-9
4957 cling : Off
5058 cppyy : On
5159 coverage : true
60+ - name : ubu22-x86-gcc9-clang-repl-16-xeus-clang-repl
61+ os : ubuntu-22.04
62+ compiler : gcc-9
63+ clang-runtime : ' 16'
64+ cling : Off
65+ cppyy : On
66+ xeus-clang-repl : On
67+ coverage : true
5268 - name : ubu22-x86-gcc9-clang13-cling
5369 os : ubuntu-22.04
5470 compiler : gcc-9
6581 cling-version : ' 1.0'
6682 cppyy : On
6783 coverage : true
84+ - name : ubu22-x86-gcc9-clang13-cling-xeus-clang-repl
85+ os : ubuntu-22.04
86+ compiler : gcc-9
87+ clang-runtime : ' 13'
88+ cling : On
89+ cling-version : ' 1.0'
90+ cppyy : On
91+ xeus-clang-repl : On
92+ coverage : true
6893 # Commented out until Ubuntu on arm Github runner becomes available
6994 # os key to be replaced once known
7095 # - name: ubu22-arm-gcc12-clang-repl-17
@@ -79,6 +104,13 @@ jobs:
79104 # clang-runtime: '17'
80105 # cling: Off
81106 # cppyy: On
107+ # - name: ubu22-arm-gcc12-clang-repl-17-xeus-clang-repl
108+ # os: ubuntu-22.04-arm
109+ # compiler: gcc-12
110+ # clang-runtime: '17'
111+ # cling: Off
112+ # cppyy: On
113+ # xeus-clang-repl: On
82114 # - name: ubu22-arm-gcc9-clang-repl-16
83115 # os: ubuntu-22.04-arm
84116 # compiler: gcc-9
@@ -93,20 +125,43 @@ jobs:
93125 # cling: Off
94126 # cppyy: On
95127 # coverage: true
128+ # - name: ubu22-arm-gcc9-clang-repl-16-xeus-clang-repl
129+ # os: ubuntu-22.04-arm
130+ # compiler: gcc-9
131+ # clang-runtime: '16'
132+ # cling: Off
133+ # cppyy: On
134+ # xeus-clang-repl: On
96135 # - name: ubu22-arm-gcc9-clang13-cling
97136 # os: ubuntu-22.04-arm
98137 # compiler: gcc-9
99138 # clang-runtime: '13'
100139 # cling: On
101140 # cling-version: '1.0'
102141 # cppyy: Off
142+ # - name: ubu22-arm-gcc9-clang13-cling-xeus-clang-repl
143+ # os: ubuntu-22.04-arm
144+ # compiler: gcc-9
145+ # clang-runtime: '13'
146+ # cling: On
147+ # cling-version: '1.0'
148+ # cppyy: On
149+ # xeus-clang-repl: On
103150 # - name: ubu22-arm-gcc9-clang13-cling-cppyy
104151 # os: ubuntu-22.04-arm
105152 # compiler: gcc-9
106153 # clang-runtime: '13'
107154 # cling: On
108155 # cling-version: '1.0'
109156 # cppyy: On
157+ # - name: ubu22-arm-gcc9-clang13-cling-xeus-clang-repl
158+ # os: ubuntu-22.04-arm
159+ # compiler: gcc-9
160+ # clang-runtime: '13'
161+ # cling: On
162+ # cling-version: '1.0'
163+ # cppyy: On
164+ # xeus-clang-repl: On
110165 - name : win2022-msvc-clang-repl-17
111166 os : windows-2022
112167 compiler : msvc
@@ -160,6 +215,13 @@ jobs:
160215 clang-runtime : ' 17'
161216 cling : Off
162217 cppyy : On
218+ - name : osx13-x86-clang-clang-repl-17-xeus-clang-repl
219+ os : macos-13
220+ compiler : clang
221+ clang-runtime : ' 17'
222+ cling : Off
223+ cppyy : On
224+ xeus-clang-repl : On
163225 - name : osx13-x86-clang-clang-repl-16
164226 os : macos-13
165227 compiler : clang
@@ -172,6 +234,13 @@ jobs:
172234 clang-runtime : ' 16'
173235 cling : Off
174236 cppyy : On
237+ - name : osx13-x86-clang-clang-repl-16-xeus-clang-repl
238+ os : macos-13
239+ compiler : clang
240+ clang-runtime : ' 16'
241+ cling : Off
242+ cppyy : On
243+ xeus-clang-repl : On
175244 - name : osx13-x86-clang-clang13-cling
176245 os : macos-13
177246 compiler : clang
@@ -186,6 +255,14 @@ jobs:
186255 cling : On
187256 cling-version : ' 1.0'
188257 cppyy : On
258+ - name : osx13-x86-clang-clang13-cling-xeus-clang-repl
259+ os : macos-13
260+ compiler : clang
261+ clang-runtime : ' 13'
262+ cling : On
263+ cling-version : ' 1.0'
264+ cppyy : On
265+ xeus-clang-repl : On
189266 # Block commented out until free tier for m1
190267 # exists (expected sometime 2024) and key for os
191268 # can be replaced
@@ -201,6 +278,13 @@ jobs:
201278 # clang-runtime: '17'
202279 # cling: Off
203280 # cppyy: On
281+ # - name: osx13-arm64-clang-clang-repl-17-xeus-clang-repl
282+ # os: macos-13-arm64
283+ # compiler: clang
284+ # clang-runtime: '17'
285+ # cling: Off
286+ # cppyy: On
287+ # xeus-clang-repl: On
204288 # - name: osx13-arm64-clang-clang-repl-16
205289 # os: macos-13-arm64
206290 # compiler: clang
@@ -213,6 +297,13 @@ jobs:
213297 # clang-runtime: '16'
214298 # cling: Off
215299 # cppyy: On
300+ # - name: osx13-arm64-clang-clang-repl-16-xeus-clang-repl
301+ # os: macos-13-arm64
302+ # compiler: clang
303+ # clang-runtime: '16'
304+ # cling: Off
305+ # cppyy: On
306+ # xeus-clang-repl: On
216307 # - name: osx13-arm64-clang-clang13-cling
217308 # os: macos-13-arm64
218309 # compiler: clang
@@ -227,7 +318,15 @@ jobs:
227318 # cling: On
228319 # cling-version: '1.0'
229320 # cppyy: On
230-
321+ # - name: osx13-arm64-clang-clang13-cling-xeus-clang-repl
322+ # os: macos-13-arm64
323+ # compiler: clang
324+ # clang-runtime: '13'
325+ # cling: On
326+ # cling-version: '1.0'
327+ # cppyy: On
328+ # xeus-clang-repl: On
329+
231330 steps :
232331 - uses : actions/checkout@v3
233332 with :
@@ -385,9 +484,8 @@ jobs:
385484 # Install deps
386485 sudo apt update
387486 sudo apt install git g++ debhelper devscripts gnupg python3 valgrind
388- conda install -y -q -c conda-forge \
389- distro \
390- pytest
487+ sudo apt autoremove
488+ sudo apt clean
391489
392490 - name : Install deps on MacOS
393491 if : runner.os == 'macOS'
@@ -687,10 +785,10 @@ jobs:
687785 cd cppyy-backend
688786 mkdir -p $CPPINTEROP_DIR/lib build && cd build
689787 # Install CppInterOp
690- (cd $CPPINTEROP_BUILD_DIR && cmake --build . --target install --parallel $(nproc --all) )
788+ (cd $CPPINTEROP_BUILD_DIR && cmake --build . --target install --parallel ${{ env.ncpus }} )
691789 # Build and Install cppyy-backend
692790 cmake -DCppInterOp_DIR=$CPPINTEROP_DIR ..
693- cmake --build . --parallel $(nproc --all)
791+ cmake --build . --parallel ${{ env.ncpus }}
694792 OS=$(uname -s)
695793 if [[ "$OS" == "Darwin" ]]; then
696794 cp libcppyy-backend.dylib $CPPINTEROP_DIR/lib/
@@ -702,15 +800,50 @@ jobs:
702800 - name : Install CPyCppyy on Unix Systems
703801 if : ${{ (runner.os != 'windows') && (matrix.cppyy == 'On') }}
704802 run : |
705- # Setup virtual environment
706- python3 -m venv .venv
707- source .venv/bin/activate
803+ # Setup and activate virtual environment (mamba envirnoment if building xeus-clang-repl)
804+ xeus_clang_repl_on=$(echo "${{ matrix.xeus-clang-repl }}" | tr '[:lower:]' '[:upper:]')
805+ if [[ "$xeus_clang_repl_on" == "ON" ]]; then
806+ echo "Installing dependencies related to xeus-clang-repl build"
807+ wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
808+ bash Miniforge3.sh -b -p "${HOME}/conda"
809+ source "${HOME}/conda/etc/profile.d/conda.sh"
810+ source "${HOME}/conda/etc/profile.d/mamba.sh"
811+ mamba create -y -n .venv python=3.10.6
812+ mamba activate .venv
813+ mamba install --quiet --yes -c conda-forge \
814+ cmake \
815+ 'xeus>=2.0' \
816+ xeus-zmq \
817+ 'nlohmann_json>=3.9.1,<3.10' \
818+ 'cppzmq>=4.6.0,<5' \
819+ 'xtl>=0.7,<0.8' \
820+ 'openssl<4' \
821+ ipykernel \
822+ pugixml \
823+ zlib \
824+ libxml2 \
825+ 'cxxopts>=2.2.1,<2.3' \
826+ libuuid \
827+ pytest \
828+ jupyter_kernel_test
829+ mamba install -y jupyter
830+ hash -r
831+ pip install ipython
832+ jupyter notebook --generate-config -y
833+ mamba clean --all -f -y
834+ npm cache clean --force
835+ jupyter lab clean
836+ else
837+ python3 -m venv .venv
838+ source .venv/bin/activate
839+ fi
840+
708841 # Install CPyCppyy
709842 git clone --depth=1 https://github.com/compiler-research/CPyCppyy.git
710843 mkdir CPyCppyy/build
711844 cd CPyCppyy/build
712845 cmake ..
713- cmake --build . --parallel $(nproc --all)
846+ cmake --build . --parallel ${{ env.ncpus }}
714847 #
715848 export CPYCPPYY_DIR=$PWD
716849 cd ../..
@@ -720,7 +853,14 @@ jobs:
720853 if : ${{ (runner.os != 'windows') && (matrix.cppyy == 'On') }}
721854 run : |
722855 # source virtual environment
723- source .venv/bin/activate
856+ xeus_clang_repl_on=$(echo "${{ matrix.xeus-clang-repl }}" | tr '[:lower:]' '[:upper:]')
857+ if [[ "$xeus_clang_repl_on" == "ON" ]]; then
858+ source "${HOME}/conda/etc/profile.d/conda.sh"
859+ source "${HOME}/conda/etc/profile.d/mamba.sh"
860+ mamba activate .venv
861+ else
862+ source .venv/bin/activate
863+ fi
724864 # Install cppyy
725865 git clone --depth=1 https://github.com/compiler-research/cppyy.git
726866 cd cppyy
@@ -730,14 +870,21 @@ jobs:
730870 if : ${{ (runner.os != 'windows') && (matrix.cppyy == 'On') }}
731871 run : |
732872 # Run cppyy
733- source .venv/bin/activate
873+ xeus_clang_repl_on=$(echo "${{ matrix.xeus-clang-repl }}" | tr '[:lower:]' '[:upper:]')
874+ if [[ "$xeus_clang_repl_on" == "ON" ]]; then
875+ source "${HOME}/conda/etc/profile.d/conda.sh"
876+ source "${HOME}/conda/etc/profile.d/mamba.sh"
877+ mamba activate .venv
878+ else
879+ source .venv/bin/activate
880+ fi
734881 export PYTHONPATH=$PYTHONPATH:$CPYCPPYY_DIR:$CB_PYTHON_DIR
735882 python -c "import cppyy"
736883 # We need PYTHONPATH later
737884 echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV
738885 - name : Run the tests on Unix Systems
739886 continue-on-error : true
740- if : ${{ (runner.os != 'windows') && (matrix.cppyy == 'On') }}
887+ if : ${{ (runner.os != 'windows') && (matrix.cppyy == 'On') && (matrix.xeus-clang-repl != 'On') }}
741888 run : |
742889 # Run the tests
743890 source .venv/bin/activate
@@ -782,6 +929,28 @@ jobs:
782929 echo "Return Code: ${RETCODE}"
783930 exit $RETCODE
784931
932+ - name : Build xeus-clang-repl on Unix Systems
933+ if : ${{ (runner.os != 'windows') && (matrix.xeus-clang-repl == 'On') }}
934+ run : |
935+ source "${HOME}/conda/etc/profile.d/conda.sh"
936+ source "${HOME}/conda/etc/profile.d/mamba.sh"
937+ mamba activate .venv
938+ #Build xeus-clang-repl
939+ LLVM_BUILD_DIR="$(pwd)/llvm-project/build"
940+ git clone --depth=1 https://github.com/compiler-research/xeus-clang-repl.git
941+ mkdir ./xeus-clang-repl/build/
942+ cd ./xeus-clang-repl/build/
943+ cmake -DCMAKE_BUILD_TYPE=Release \
944+ -DLLVM_CMAKE_DIR=$LLVM_BUILD_DIR \
945+ -DCMAKE_PREFIX_PATH=$(python -m site --user-site) \
946+ -DCMAKE_INSTALL_PREFIX=$(python -m site --user-site) \
947+ -DCMAKE_INSTALL_LIBDIR=lib \
948+ -DLLVM_CONFIG_EXTRA_PATH_HINTS=$LLVM_BUILD_DIR/lib \
949+ -DCPPINTEROP_DIR=$CPPINTEROP_BUILD_DIR \
950+ -DLLVM_USE_LINKER=lld \
951+ ..
952+ make install -j ${{ env.ncpus }}
953+
785954 - name : Show debug info
786955 if : ${{ failure() && (runner.os != 'windows') }}
787956 run : |
0 commit comments