@@ -953,6 +953,7 @@ jobs:
953953 if : ${{ runner.os != 'windows' }}
954954 shell : bash -l {0}
955955 run : |
956+ set -e
956957 ./emsdk/emsdk activate ${{matrix.emsdk_ver}}
957958 source ./emsdk/emsdk_env.sh
958959 micromamba activate CppInterOp-wasm
@@ -971,6 +972,7 @@ jobs:
971972 -DXEUS_CPP_RESOURCE_DIR=${{ env.LLVM_BUILD_DIR }}/lib/clang/${{ matrix.clang-runtime }} \
972973 -DSYSROOT_PATH=${{ env.SYSROOT_PATH }} \
973974 ..
975+ emmake make -j ${{ env.ncpus }} check-xeus-cpp
974976 emmake make -j ${{ env.ncpus }} install
975977
976978 - name : Build xeus-cpp on Windows systems
@@ -980,6 +982,18 @@ jobs:
980982 .\emsdk\emsdk activate ${{matrix.emsdk_ver}}
981983 .\emsdk\emsdk_env.ps1
982984 micromamba activate CppInterOp-wasm
985+ function Error-OnFailure {
986+ param (
987+ [Parameter(Mandatory)]
988+ [ScriptBlock]$Command
989+ )
990+
991+ & $Command
992+
993+ if ($LASTEXITCODE -ne 0) {
994+ exit $LASTEXITCODE
995+ }
996+ }
983997 git clone --depth=1 https://github.com/compiler-research/xeus-cpp.git
984998 cd .\xeus-cpp
985999 mkdir build
@@ -995,18 +1009,10 @@ jobs:
9951009 -DXEUS_CPP_RESOURCE_DIR=${{ env.LLVM_BUILD_DIR }}\lib\clang\${{ matrix.clang-runtime }} `
9961010 -DSYSROOT_PATH=${{ env.SYSROOT_PATH }} `
9971011 ..
998- emmake make -j ${{ env.ncpus }} install
999-
1000- - name : Test xeus-cpp C++ Emscripten on Unix Systems
1001- if : ${{ runner.os != 'windows' }}
1002- shell : bash -l {0}
1003- run : |
1004- set -e
1005- micromamba activate CppInterOp-wasm
1006- cd ./xeus-cpp/build/test
1007- node test_xeus_cpp.js
1012+ Error-OnFailure { node test_xeus_cpp.js }
1013+ Error-OnFailure { emmake make -j ${{ env.ncpus }} install }
10081014
1009- - name : Test xeus-cpp C++ Emscripten on Windows Systems
1015+ - name : Test xeus-cpp Emscripten C++ tests in browsers on Windows Systems
10101016 if : ${{ runner.os == 'windows' }}
10111017 shell : powershell
10121018 run : |
@@ -1024,7 +1030,6 @@ jobs:
10241030 }
10251031 micromamba activate CppInterOp-wasm
10261032 cd .\xeus-cpp\build\test
1027- node test_xeus_cpp.js
10281033 echo "Running test_xeus_cpp in Firefox"
10291034 Error-OnFailure { emrun.bat --browser="firefox.exe" --kill_exit --timeout 60 --browser-args="--headless" test_xeus_cpp.html }
10301035 echo "Running test_xeus_cpp in Chromium"
0 commit comments