Skip to content

Commit 63249d7

Browse files
authored
Update emscripten.yml
1 parent a4dc596 commit 63249d7

File tree

1 file changed

+16
-23
lines changed

1 file changed

+16
-23
lines changed

.github/workflows/emscripten.yml

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,6 +1010,7 @@ jobs:
10101010
if: ${{ runner.os != 'windows' }}
10111011
shell: bash -l {0}
10121012
run: |
1013+
set -e
10131014
./emsdk/emsdk activate ${{matrix.emsdk_ver}}
10141015
source ./emsdk/emsdk_env.sh
10151016
micromamba activate CppInterOp-wasm
@@ -1028,12 +1029,25 @@ jobs:
10281029
-DXEUS_CPP_RESOURCE_DIR=${{ env.LLVM_BUILD_DIR }}/lib/clang/${{ matrix.clang-runtime }} \
10291030
-DSYSROOT_PATH=${{ env.SYSROOT_PATH }} \
10301031
..
1032+
emmake make -j ${{ env.ncpus }} check-xeus-cpp
10311033
emmake make -j ${{ env.ncpus }} install
10321034
10331035
- name: Build xeus-cpp on Windows systems
10341036
if: ${{ runner.os == 'windows' }}
10351037
shell: powershell
10361038
run: |
1039+
function Error-OnFailure {
1040+
param (
1041+
[Parameter(Mandatory)]
1042+
[ScriptBlock]$Command
1043+
)
1044+
1045+
& $Command
1046+
1047+
if ($LASTEXITCODE -ne 0) {
1048+
exit $LASTEXITCODE
1049+
}
1050+
}
10371051
.\emsdk\emsdk activate ${{matrix.emsdk_ver}}
10381052
.\emsdk\emsdk_env.ps1
10391053
micromamba activate CppInterOp-wasm
@@ -1052,36 +1066,15 @@ jobs:
10521066
-DXEUS_CPP_RESOURCE_DIR=${{ env.LLVM_BUILD_DIR }}\lib\clang\${{ matrix.clang-runtime }} `
10531067
-DSYSROOT_PATH=${{ env.SYSROOT_PATH }} `
10541068
..
1055-
emmake make -j ${{ env.ncpus }} install
1056-
1057-
- name: Test xeus-cpp C++ Emscripten on Unix Systems
1058-
if: ${{ runner.os != 'windows' }}
1059-
shell: bash -l {0}
1060-
run: |
1061-
set -e
1062-
micromamba activate CppInterOp-wasm
1063-
cd ./xeus-cpp/build/test
1064-
node test_xeus_cpp.js
1069+
Error-OnFailure { emmake make -j ${{ env.ncpus }} check-xeus-cpp }
1070+
Error-OnFailure { emmake make -j ${{ env.ncpus }} install }
10651071
10661072
- name: Test xeus-cpp C++ Emscripten on Windows Systems
10671073
if: ${{ runner.os == 'windows' }}
10681074
shell: powershell
10691075
run: |
1070-
function Error-OnFailure {
1071-
param (
1072-
[Parameter(Mandatory)]
1073-
[ScriptBlock]$Command
1074-
)
1075-
1076-
& $Command
1077-
1078-
if ($LASTEXITCODE -ne 0) {
1079-
exit $LASTEXITCODE
1080-
}
1081-
}
10821076
micromamba activate CppInterOp-wasm
10831077
cd .\xeus-cpp\build\test
1084-
node test_xeus_cpp.js
10851078
echo "Running test_xeus_cpp in Firefox"
10861079
Error-OnFailure { emrun.bat --browser="firefox.exe" --kill_exit --timeout 60 --browser-args="--headless" test_xeus_cpp.html }
10871080
echo "Running test_xeus_cpp in Chromium"

0 commit comments

Comments
 (0)