Skip to content

Commit d7917d9

Browse files
authored
Add xeus-cpp build to ci + remove xeus-clang-repl builds from ci (#258)
Fixes #257
1 parent 1b463c9 commit d7917d9

File tree

2 files changed

+34
-196
lines changed

2 files changed

+34
-196
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 196 deletions
Original file line numberDiff line numberDiff line change
@@ -475,44 +475,20 @@ jobs:
475475
cling: Off
476476
cppyy: On
477477
coverage: true
478-
- name: ubu22-x86-gcc12-clang-repl-18-xeus-clang-repl
479-
os: ubuntu-22.04
480-
compiler: gcc-12
481-
clang-runtime: '18'
482-
cling: Off
483-
cppyy: On
484-
xeus-clang-repl: On
485-
coverage: true
486478
- name: ubu22-x86-gcc12-clang-repl-17-cppyy
487479
os: ubuntu-22.04
488480
compiler: gcc-12
489481
clang-runtime: '17'
490482
cling: Off
491483
cppyy: On
492484
coverage: true
493-
- name: ubu22-x86-gcc12-clang-repl-17-xeus-clang-repl
494-
os: ubuntu-22.04
495-
compiler: gcc-12
496-
clang-runtime: '17'
497-
cling: Off
498-
cppyy: On
499-
xeus-clang-repl: On
500-
coverage: true
501485
- name: ubu22-x86-gcc12-clang-repl-16-cppyy
502486
os: ubuntu-22.04
503487
compiler: gcc-12
504488
clang-runtime: '16'
505489
cling: Off
506490
cppyy: On
507491
coverage: true
508-
- name: ubu22-x86-gcc12-clang-repl-16-xeus-clang-repl
509-
os: ubuntu-22.04
510-
compiler: gcc-12
511-
clang-runtime: '16'
512-
cling: Off
513-
cppyy: On
514-
xeus-clang-repl: On
515-
coverage: true
516492
- name: ubu22-x86-gcc9-clang13-cling-cppyy
517493
os: ubuntu-22.04
518494
compiler: gcc-9
@@ -521,15 +497,6 @@ jobs:
521497
cling-version: '1.0'
522498
cppyy: On
523499
coverage: true
524-
- name: ubu22-x86-gcc9-clang13-cling-xeus-clang-repl
525-
os: ubuntu-22.04
526-
compiler: gcc-9
527-
clang-runtime: '13'
528-
cling: On
529-
cling-version: '1.0'
530-
cppyy: On
531-
xeus-clang-repl: On
532-
coverage: true
533500
#Commented out until Ubuntu on arm Github runner becomes available
534501
#os key to be replaced once known
535502
#- name: ubu22-arm-gcc12-clang-repl-18-cppyy
@@ -538,55 +505,26 @@ jobs:
538505
# clang-runtime: '18'
539506
# cling: Off
540507
# cppyy: On
541-
#- name: ubu22-arm-gcc12-clang-repl-18-xeus-clang-repl
542-
# os: ubuntu-22.04-arm
543-
# compiler: gcc-12
544-
# clang-runtime: '18'
545-
# cling: Off
546-
# cppyy: On
547-
# xeus-clang-repl: On
548508
#- name: ubu22-arm-gcc12-clang-repl-17-cppyy
549509
# os: ubuntu-22.04-arm
550510
# compiler: gcc-12
551511
# clang-runtime: '17'
552512
# cling: Off
553513
# cppyy: On
554-
#- name: ubu22-arm-gcc12-clang-repl-17-xeus-clang-repl
555-
# os: ubuntu-22.04-arm
556-
# compiler: gcc-12
557-
# clang-runtime: '17'
558-
# cling: Off
559-
# cppyy: On
560-
# xeus-clang-repl: On
561514
#- name: ubu22-arm-gcc9-clang-repl-16-cppyy
562515
# os: ubuntu-22.04-arm
563516
# compiler: gcc-9
564517
# clang-runtime: '16'
565518
# cling: Off
566519
# cppyy: On
567520
# coverage: true
568-
#- name: ubu22-arm-gcc9-clang-repl-16-xeus-clang-repl
569-
# os: ubuntu-22.04-arm
570-
# compiler: gcc-9
571-
# clang-runtime: '16'
572-
# cling: Off
573-
# cppyy: On
574-
# xeus-clang-repl: On
575521
#- name: ubu22-arm-gcc9-clang13-cling-cppyy
576522
# os: ubuntu-22.04-arm
577523
# compiler: gcc-9
578524
# clang-runtime: '13'
579525
# cling: On
580526
# cling-version: '1.0'
581527
# cppyy: On
582-
#- name: ubu22-arm-gcc9-clang13-cling-xeus-clang-repl
583-
# os: ubuntu-22.04-arm
584-
# compiler: gcc-9
585-
# clang-runtime: '13'
586-
# cling: On
587-
# cling-version: '1.0'
588-
# cppyy: On
589-
# xeus-clang-repl: On
590528
#FIXME: Windows CppInterOp tests expected to fail
591529
#until https://github.com/compiler-research/CppInterOp/issues/188 is solved
592530
- name: win2022-msvc-clang-repl-18
@@ -639,108 +577,50 @@ jobs:
639577
clang-runtime: '18'
640578
cling: Off
641579
cppyy: On
642-
- name: osx14-arm-clang-clang-repl-18-xeus-clang-repl
643-
os: macos-14
644-
compiler: clang
645-
clang-runtime: '18'
646-
cling: Off
647-
cppyy: On
648-
xeus-clang-repl: On
649580
- name: osx14-arm-clang-clang-repl-17-cppyy
650581
os: macos-14
651582
compiler: clang
652583
clang-runtime: '17'
653584
cling: Off
654585
cppyy: On
655-
- name: osx14-arm-clang-clang-repl-17-xeus-clang-repl
656-
os: macos-14
657-
compiler: clang
658-
clang-runtime: '17'
659-
cling: Off
660-
cppyy: On
661-
xeus-clang-repl: On
662586
- name: osx14-arm-clang-clang-repl-16-cppyy
663587
os: macos-14
664588
compiler: clang
665589
clang-runtime: '16'
666590
cling: Off
667591
cppyy: On
668-
- name: osx14-arm-clang-clang-repl-16-xeus-clang-repl
669-
os: macos-14
670-
compiler: clang
671-
clang-runtime: '16'
672-
cling: Off
673-
cppyy: On
674-
xeus-clang-repl: On
675592
- name: osx14-arm-clang-clang13-cling-cppyy
676593
os: macos-14
677594
compiler: clang
678595
clang-runtime: '13'
679596
cling: On
680597
cling-version: '1.0'
681598
cppyy: On
682-
- name: osx14-arm-clang-clang13-cling-xeus-clang-repl
683-
os: macos-14
684-
compiler: clang
685-
clang-runtime: '13'
686-
cling: On
687-
cling-version: '1.0'
688-
cppyy: On
689-
xeus-clang-repl: On
690599
- name: osx13-x86-clang-clang-repl-18-cppyy
691600
os: macos-13
692601
compiler: clang
693602
clang-runtime: '18'
694603
cling: Off
695604
cppyy: On
696-
- name: osx13-x86-clang-clang-repl-18-xeus-clang-repl
697-
os: macos-13
698-
compiler: clang
699-
clang-runtime: '18'
700-
cling: Off
701-
cppyy: On
702-
xeus-clang-repl: On
703605
- name: osx13-x86-clang-clang-repl-17-cppyy
704606
os: macos-13
705607
compiler: clang
706608
clang-runtime: '17'
707609
cling: Off
708610
cppyy: On
709-
- name: osx13-x86-clang-clang-repl-17-xeus-clang-repl
710-
os: macos-13
711-
compiler: clang
712-
clang-runtime: '17'
713-
cling: Off
714-
cppyy: On
715-
xeus-clang-repl: On
716611
- name: osx13-x86-clang-clang-repl-16-cppyy
717612
os: macos-13
718613
compiler: clang
719614
clang-runtime: '16'
720615
cling: Off
721616
cppyy: On
722-
- name: osx13-x86-clang-clang-repl-16-xeus-clang-repl
723-
os: macos-13
724-
compiler: clang
725-
clang-runtime: '16'
726-
cling: Off
727-
cppyy: On
728-
xeus-clang-repl: On
729617
- name: osx13-x86-clang-clang13-cling-cppyy
730618
os: macos-13
731619
compiler: clang
732620
clang-runtime: '13'
733621
cling: On
734622
cling-version: '1.0'
735623
cppyy: On
736-
- name: osx13-x86-clang-clang13-cling-xeus-clang-repl
737-
os: macos-13
738-
compiler: clang
739-
clang-runtime: '13'
740-
cling: On
741-
cling-version: '1.0'
742-
cppyy: On
743-
xeus-clang-repl: On
744624

745625
steps:
746626
- uses: actions/checkout@v4
@@ -1082,44 +962,8 @@ jobs:
1082962
- name: Install CPyCppyy on Unix Systems
1083963
if: ${{ (runner.os != 'windows') && (matrix.cppyy == 'On') }}
1084964
run: |
1085-
# Setup and activate virtual environment (mamba envirnoment if building xeus-clang-repl)
1086-
xeus_clang_repl_on=$(echo "${{ matrix.xeus-clang-repl }}" | tr '[:lower:]' '[:upper:]')
1087-
if [[ "$xeus_clang_repl_on" == "ON" ]]; then
1088-
echo "Installing dependencies related to xeus-clang-repl build"
1089-
wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
1090-
bash Miniforge3.sh -b -p "${HOME}/conda"
1091-
source "${HOME}/conda/etc/profile.d/conda.sh"
1092-
source "${HOME}/conda/etc/profile.d/mamba.sh"
1093-
mamba create -y -n .venv python=3.10.6
1094-
mamba activate .venv
1095-
mamba install --quiet --yes -c conda-forge \
1096-
cmake \
1097-
'xeus>=2.0' \
1098-
xeus-zmq \
1099-
'nlohmann_json>=3.9.1,<3.10' \
1100-
'cppzmq>=4.6.0,<5' \
1101-
'xtl>=0.7,<0.8' \
1102-
'openssl<4' \
1103-
ipykernel \
1104-
pugixml \
1105-
zlib \
1106-
libxml2 \
1107-
'cxxopts>=2.2.1,<2.3' \
1108-
libuuid \
1109-
pytest \
1110-
jupyter_kernel_test
1111-
mamba install -y jupyter
1112-
hash -r
1113-
pip install ipython
1114-
jupyter notebook --generate-config -y
1115-
mamba clean --all -f -y
1116-
npm cache clean --force
1117-
jupyter lab clean
1118-
else
1119-
python3 -m venv .venv
1120-
source .venv/bin/activate
1121-
fi
1122-
965+
python3 -m venv .venv
966+
source .venv/bin/activate
1123967
# Install CPyCppyy
1124968
git clone --depth=1 https://github.com/compiler-research/CPyCppyy.git
1125969
mkdir CPyCppyy/build
@@ -1135,14 +979,7 @@ jobs:
1135979
if: ${{ (runner.os != 'windows') && (matrix.cppyy == 'On') }}
1136980
run: |
1137981
# source virtual environment
1138-
xeus_clang_repl_on=$(echo "${{ matrix.xeus-clang-repl }}" | tr '[:lower:]' '[:upper:]')
1139-
if [[ "$xeus_clang_repl_on" == "ON" ]]; then
1140-
source "${HOME}/conda/etc/profile.d/conda.sh"
1141-
source "${HOME}/conda/etc/profile.d/mamba.sh"
1142-
mamba activate .venv
1143-
else
1144-
source .venv/bin/activate
1145-
fi
982+
source .venv/bin/activate
1146983
# Install cppyy
1147984
git clone --depth=1 https://github.com/compiler-research/cppyy.git
1148985
cd cppyy
@@ -1152,14 +989,7 @@ jobs:
1152989
if: ${{ (runner.os != 'windows') && (matrix.cppyy == 'On') }}
1153990
run: |
1154991
# Run cppyy
1155-
xeus_clang_repl_on=$(echo "${{ matrix.xeus-clang-repl }}" | tr '[:lower:]' '[:upper:]')
1156-
if [[ "$xeus_clang_repl_on" == "ON" ]]; then
1157-
source "${HOME}/conda/etc/profile.d/conda.sh"
1158-
source "${HOME}/conda/etc/profile.d/mamba.sh"
1159-
mamba activate .venv
1160-
else
1161-
source .venv/bin/activate
1162-
fi
992+
source .venv/bin/activate
1163993
export PYTHONPATH=$PYTHONPATH:$CPYCPPYY_DIR:$CB_PYTHON_DIR
1164994
python -c "import cppyy"
1165995
# We need PYTHONPATH later
@@ -1226,28 +1056,6 @@ jobs:
12261056
tail -n1 test_xfailed.log
12271057
echo "Return Code: ${RETCODE}"
12281058
exit $RETCODE
1229-
1230-
- name: Build xeus-clang-repl on Unix Systems
1231-
if: ${{ (runner.os != 'windows') && (matrix.xeus-clang-repl == 'On') }}
1232-
run: |
1233-
source "${HOME}/conda/etc/profile.d/conda.sh"
1234-
source "${HOME}/conda/etc/profile.d/mamba.sh"
1235-
mamba activate .venv
1236-
#Build xeus-clang-repl
1237-
LLVM_BUILD_DIR="$(pwd)/llvm-project/build"
1238-
git clone --depth=1 https://github.com/compiler-research/xeus-clang-repl.git
1239-
mkdir ./xeus-clang-repl/build/
1240-
cd ./xeus-clang-repl/build/
1241-
cmake -DCMAKE_BUILD_TYPE=Release \
1242-
-DLLVM_CMAKE_DIR=$LLVM_BUILD_DIR \
1243-
-DCMAKE_PREFIX_PATH=$(python -m site --user-site) \
1244-
-DCMAKE_INSTALL_PREFIX=$(python -m site --user-site) \
1245-
-DCMAKE_INSTALL_LIBDIR=lib \
1246-
-DLLVM_CONFIG_EXTRA_PATH_HINTS=$LLVM_BUILD_DIR/lib \
1247-
-DCPPINTEROP_DIR=$CPPINTEROP_BUILD_DIR \
1248-
-DLLVM_USE_LINKER=lld \
1249-
..
1250-
make install -j ${{ env.ncpus }}
12511059
12521060
- name: Show debug info
12531061
if: ${{ failure() && (runner.os != 'windows') }}
@@ -1496,3 +1304,27 @@ jobs:
14961304
echo "CPPINTEROP_DIR=$CPPINTEROP_DIR" >> $GITHUB_ENV
14971305
echo "LLVM_BUILD_DIR=$LLVM_BUILD_DIR" >> $GITHUB_ENV
14981306
echo "CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH" >> $GITHUB_ENV
1307+
echo "PREFIX=$PREFIX" >> $GITHUB_ENV
1308+
1309+
- name: Build xeus-cpp
1310+
shell: bash -l {0}
1311+
run: |
1312+
emsdk activate 3.1.45
1313+
source $CONDA_EMSDK_DIR/emsdk_env.sh
1314+
micromamba activate CppInterOp-wasm
1315+
git clone https://github.com/compiler-research/xeus-cpp.git
1316+
cd ./xeus-cpp
1317+
mkdir build
1318+
pushd build
1319+
export EMPACK_PREFIX=$MAMBA_ROOT_PREFIX/envs/CppInterOp-wasm-build
1320+
export CMAKE_PREFIX_PATH=${{ env.PREFIX }}
1321+
export CMAKE_SYSTEM_PREFIX_PATH=${{ env.PREFIX }}
1322+
emcmake cmake \
1323+
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
1324+
-DCMAKE_PREFIX_PATH=${{ env.PREFIX }} \
1325+
-DCMAKE_INSTALL_PREFIX=${{ env.PREFIX }} \
1326+
-DXEUS_CPP_EMSCRIPTEN_WASM_BUILD=ON \
1327+
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON \
1328+
-DCppInterOp_DIR="${{ env.CPPINTEROP_BUILD_DIR }}/lib/cmake/CppInterOp" \
1329+
..
1330+
EMCC_CFLAGS='-sERROR_ON_UNDEFINED_SYMBOLS=0' emmake make -j ${{ env.ncpus }}

environment-wasm.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,9 @@ channels:
33
- https://repo.mamba.pm/emscripten-forge
44
dependencies:
55
- zlib
6+
- nlohmann_json
7+
- xeus-lite
8+
- xeus >=3.0.5,<4.0
9+
- xtl >=0.7,<0.8
10+
- cpp-argparse
11+
- pugixml

0 commit comments

Comments
 (0)