@@ -842,7 +842,13 @@ jobs:
842842 .\emsdk\emsdk_env.ps1
843843 $env:PWD_DIR= $PWD.Path
844844 $env:SYSROOT_PATH="$env:EMSDK/upstream/emscripten/cache/sysroot"
845- $env:PREFIX="%CONDA_PREFIX%/envs/CppInterOp-wasm"
845+ echo "SYSROOT_PATH=$env:SYSROOT_PATH"
846+ echo "SYSROOT_PATH=$env:SYSROOT_PATH" >> $env:GITHUB_ENV
847+
848+ $env:PREFIX="$env:MAMBA_ROOT_PREFIX/envs/CppInterOp-wasm"
849+ echo "PREFIX=$env:PREFIX"
850+ echo "PREFIX=$env:PREFIX" >> $env:GITHUB_ENV
851+
846852 $env:CMAKE_PREFIX_PATH=$env:PREFIX
847853 $env:CMAKE_SYSTEM_PREFIX_PATH=$env:PREFIX
848854
@@ -945,6 +951,11 @@ jobs:
945951 Error-OnFailure { emrun.bat --browser="chrome.exe" --kill_exit --timeout 60 --browser-args="--headless --no-sandbox" DynamicLibraryManagerTests.html }
946952 cd ..\..
947953 Error-OnFailure { emmake make -j ${{ env.ncpus }} install }
954+ echo "SYSROOT_PATH=$env:SYSROOT_PATH" >> $GITHUB_ENV
955+ echo "CPPINTEROP_DIR=$env:CPPINTEROP_DIR" >> $GITHUB_ENV
956+ echo "LLVM_BUILD_DIR=$env:LLVM_BUILD_DIR" >> $GITHUB_ENV
957+ echo "CPLUS_INCLUDE_PATH=$env:CPLUS_INCLUDE_PATH" >> $GITHUB_ENV
958+ echo "PREFIX=$env:PREFIX" >> $GITHUB_ENV
948959
949960 - name : Build and Test/Install CppInterOp on Windows systems (static library)
950961 if : ${{ runner.os == 'windows' }}
@@ -1047,7 +1058,7 @@ jobs:
10471058 echo "Running DynamicLibraryManagerTests in Chromium"
10481059 Error-OnFailure{ emrun.bat --browser="chrome.exe" --kill_exit --timeout 60 --browser-args="--headless --no-sandbox" DynamicLibraryManagerTests.html }
10491060
1050- - name : Build xeus-cpp
1061+ - name : Build xeus-cpp on Unix Systems
10511062 if : ${{ runner.os != 'windows' }}
10521063 shell : bash -l {0}
10531064 run : |
@@ -1071,7 +1082,31 @@ jobs:
10711082 ..
10721083 emmake make -j ${{ env.ncpus }} install
10731084
1074- - name : Test xeus-cpp C++ Emscripten
1085+ - name : Build xeus-cpp on Windows systems
1086+ if : ${{ runner.os == 'windows' }}
1087+ shell : powershell
1088+ run : |
1089+ .\emsdk\emsdk activate ${{matrix.emsdk_ver}}
1090+ .\emsdk\emsdk_env.ps1
1091+ micromamba activate CppInterOp-wasm
1092+ git clone --depth=1 https://github.com/compiler-research/xeus-cpp.git
1093+ cd .\xeus-cpp
1094+ mkdir build
1095+ pushd build
1096+ $env:CMAKE_PREFIX_PATH="${{ env.PREFIX }}"
1097+ $env:CMAKE_SYSTEM_PREFIX_PATH="${{ env.PREFIX }}"
1098+ emcmake cmake `
1099+ -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
1100+ -DCMAKE_PREFIX_PATH=${{ env.PREFIX }} `
1101+ -DCMAKE_INSTALL_PREFIX=${{ env.PREFIX }} `
1102+ -DXEUS_CPP_EMSCRIPTEN_WASM_BUILD=ON `
1103+ -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON `
1104+ -DXEUS_CPP_RESOURCE_DIR=${{ env.LLVM_BUILD_DIR }}\lib\clang\${{ matrix.clang-runtime }} `
1105+ -DSYSROOT_PATH=${{ env.SYSROOT_PATH }} `
1106+ ..
1107+ emmake make -j ${{ env.ncpus }} install
1108+
1109+ - name : Test xeus-cpp C++ Emscripten on Unix Systems
10751110 if : ${{ runner.os != 'windows' }}
10761111 shell : bash -l {0}
10771112 run : |
@@ -1080,6 +1115,30 @@ jobs:
10801115 cd ./xeus-cpp/build/test
10811116 node test_xeus_cpp.js
10821117
1118+ - name : Test xeus-cpp C++ Emscripten on Windows Systems
1119+ if : ${{ runner.os == 'windows' }}
1120+ shell : powershell
1121+ run : |
1122+ function Error-OnFailure {
1123+ param (
1124+ [Parameter(Mandatory)]
1125+ [ScriptBlock]$Command
1126+ )
1127+
1128+ & $Command
1129+
1130+ if ($LASTEXITCODE -ne 0) {
1131+ exit $LASTEXITCODE
1132+ }
1133+ }
1134+ micromamba activate CppInterOp-wasm
1135+ cd .\xeus-cpp\build\test
1136+ node test_xeus_cpp.js
1137+ echo "Running test_xeus_cpp in Firefox"
1138+ Error-OnFailure { emrun.bat --browser="firefox.exe" --kill_exit --timeout 60 --browser-args="--headless" test_xeus_cpp.html }
1139+ echo "Running test_xeus_cpp in Chromium"
1140+ Error-OnFailure { emrun.bat --browser="chrome.exe" --kill_exit --timeout 60 --browser-args="--headless --no-sandbox" test_xeus_cpp.html }
1141+
10831142 - name : Jupyter Lite integration
10841143 if : ${{ runner.os != 'windows' }}
10851144 shell : bash -l {0}
@@ -1088,3 +1147,12 @@ jobs:
10881147 micromamba create -n xeus-lite-host jupyterlite-core=0.6 jupyterlite-xeus jupyter_server jupyterlab notebook python-libarchive-c -c conda-forge
10891148 micromamba activate xeus-lite-host
10901149 jupyter lite build --XeusAddon.prefix=${{ env.PREFIX }} --contents notebooks/xeus-cpp-lite-demo.ipynb --contents notebooks/smallpt.ipynb --contents notebooks/images/marie.png --contents notebooks/audio/audio.wav --output-dir dist
1150+
1151+ - name : Jupyter Lite integration
1152+ if : ${{ runner.os == 'windows' }}
1153+ shell : powershell
1154+ run : |
1155+ cd .\xeus-cpp\
1156+ micromamba create -n xeus-lite-host jupyterlite-core=0.6 jupyterlite-xeus jupyter_server jupyterlab notebook python-libarchive-c -c conda-forge
1157+ micromamba activate xeus-lite-host
1158+ jupyter lite build --XeusAddon.prefix=${{ env.PREFIX }} --contents notebooks/xeus-cpp-lite-demo.ipynb --contents notebooks/smallpt.ipynb --contents notebooks/images/marie.png --contents notebooks/audio/audio.wav --output-dir dist
0 commit comments