Skip to content

Commit cf8ec79

Browse files
committed
Fix Emscripten ci by using check-xeus-cpp target
1 parent 2df83a9 commit cf8ec79

File tree

2 files changed

+19
-20
lines changed

2 files changed

+19
-20
lines changed

.github/workflows/deploy-pages.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ jobs:
192192
- name: Build xeus-cpp
193193
shell: bash -l {0}
194194
run: |
195+
set -e
195196
./emsdk/emsdk activate ${{matrix.emsdk_ver}}
196197
source ./emsdk/emsdk_env.sh
197198
micromamba activate CppInterOp-wasm
@@ -210,16 +211,9 @@ jobs:
210211
-DXEUS_CPP_RESOURCE_DIR=${{ env.LLVM_BUILD_DIR }}/lib/clang/${{ matrix.clang-runtime }} \
211212
-DSYSROOT_PATH=${{ env.SYSROOT_PATH }} \
212213
..
214+
emmake make -j ${{ env.ncpus }} check-xeus-cpp
213215
emmake make -j ${{ env.ncpus }} install
214216
215-
- name: Test xeus-cpp C++ Emscripten
216-
shell: bash -l {0}
217-
run: |
218-
set -e
219-
micromamba activate CppInterOp-wasm
220-
cd ./xeus-cpp/build/test
221-
node test_xeus_cpp.js
222-
223217
- name: Jupyter Lite integration
224218
shell: bash -l {0}
225219
run: |

.github/workflows/emscripten.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)