8484 fetch-depth : 0
8585
8686 - name : Set up Python
87- uses : actions/setup-python@v5
87+ uses : actions/setup-python@v6
8888 with :
8989 python-version : ' 3.11'
9090
@@ -708,7 +708,7 @@ jobs:
708708 if [[ "${os}" != macos* ]] ; then
709709 EMCC_CORES=1 emmake make -j 1 check-cppinterop
710710 else
711- EMCC_CORES=2 emmake make -j 2 check-cppinterop
711+ emmake make -j ${{ env.ncpus }} check-cppinterop
712712 fi
713713 cd ./unittests/CppInterOp/
714714 # Explaination of options for emrun
@@ -785,7 +785,13 @@ jobs:
785785 .\emsdk\emsdk_env.ps1
786786 $env:PWD_DIR= $PWD.Path
787787 $env:SYSROOT_PATH="$env:EMSDK/upstream/emscripten/cache/sysroot"
788- $env:PREFIX="%CONDA_PREFIX%/envs/CppInterOp-wasm"
788+ echo "SYSROOT_PATH=$env:SYSROOT_PATH"
789+ echo "SYSROOT_PATH=$env:SYSROOT_PATH" >> $env:GITHUB_ENV
790+
791+ $env:PREFIX="$env:MAMBA_ROOT_PREFIX/envs/CppInterOp-wasm"
792+ echo "PREFIX=$env:PREFIX"
793+ echo "PREFIX=$env:PREFIX" >> $env:GITHUB_ENV
794+
789795 $env:CMAKE_PREFIX_PATH=$env:PREFIX
790796 $env:CMAKE_SYSTEM_PREFIX_PATH=$env:PREFIX
791797
@@ -888,6 +894,11 @@ jobs:
888894 Error-OnFailure { emrun.bat --browser="chrome.exe" --kill_exit --timeout 60 --browser-args="--headless --no-sandbox" DynamicLibraryManagerTests.html }
889895 cd ..\..
890896 Error-OnFailure { emmake make -j ${{ env.ncpus }} install }
897+ echo "SYSROOT_PATH=$env:SYSROOT_PATH" >> $GITHUB_ENV
898+ echo "CPPINTEROP_DIR=$env:CPPINTEROP_DIR" >> $GITHUB_ENV
899+ echo "LLVM_BUILD_DIR=$env:LLVM_BUILD_DIR" >> $GITHUB_ENV
900+ echo "CPLUS_INCLUDE_PATH=$env:CPLUS_INCLUDE_PATH" >> $GITHUB_ENV
901+ echo "PREFIX=$env:PREFIX" >> $GITHUB_ENV
891902
892903 - name : Build and Test/Install CppInterOp on Windows systems (static library)
893904 if : ${{ runner.os == 'windows' }}
@@ -990,7 +1001,7 @@ jobs:
9901001 echo "Running DynamicLibraryManagerTests in Chromium"
9911002 Error-OnFailure{ emrun.bat --browser="chrome.exe" --kill_exit --timeout 60 --browser-args="--headless --no-sandbox" DynamicLibraryManagerTests.html }
9921003
993- - name : Build xeus-cpp
1004+ - name : Build xeus-cpp on Unix Systems
9941005 if : ${{ runner.os != 'windows' }}
9951006 shell : bash -l {0}
9961007 run : |
@@ -1014,7 +1025,31 @@ jobs:
10141025 ..
10151026 emmake make -j ${{ env.ncpus }} install
10161027
1017- - name : Test xeus-cpp C++ Emscripten
1028+ - name : Build xeus-cpp on Windows systems
1029+ if : ${{ runner.os == 'windows' }}
1030+ shell : powershell
1031+ run : |
1032+ .\emsdk\emsdk activate ${{matrix.emsdk_ver}}
1033+ .\emsdk\emsdk_env.ps1
1034+ micromamba activate CppInterOp-wasm
1035+ git clone --depth=1 https://github.com/compiler-research/xeus-cpp.git
1036+ cd .\xeus-cpp
1037+ mkdir build
1038+ pushd build
1039+ $env:CMAKE_PREFIX_PATH="${{ env.PREFIX }}"
1040+ $env:CMAKE_SYSTEM_PREFIX_PATH="${{ env.PREFIX }}"
1041+ emcmake cmake `
1042+ -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
1043+ -DCMAKE_PREFIX_PATH=${{ env.PREFIX }} `
1044+ -DCMAKE_INSTALL_PREFIX=${{ env.PREFIX }} `
1045+ -DXEUS_CPP_EMSCRIPTEN_WASM_BUILD=ON `
1046+ -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON `
1047+ -DXEUS_CPP_RESOURCE_DIR=${{ env.LLVM_BUILD_DIR }}\lib\clang\${{ matrix.clang-runtime }} `
1048+ -DSYSROOT_PATH=${{ env.SYSROOT_PATH }} `
1049+ ..
1050+ emmake make -j ${{ env.ncpus }} install
1051+
1052+ - name : Test xeus-cpp C++ Emscripten on Unix Systems
10181053 if : ${{ runner.os != 'windows' }}
10191054 shell : bash -l {0}
10201055 run : |
@@ -1023,6 +1058,30 @@ jobs:
10231058 cd ./xeus-cpp/build/test
10241059 node test_xeus_cpp.js
10251060
1061+ - name : Test xeus-cpp C++ Emscripten on Windows Systems
1062+ if : ${{ runner.os == 'windows' }}
1063+ shell : powershell
1064+ run : |
1065+ function Error-OnFailure {
1066+ param (
1067+ [Parameter(Mandatory)]
1068+ [ScriptBlock]$Command
1069+ )
1070+
1071+ & $Command
1072+
1073+ if ($LASTEXITCODE -ne 0) {
1074+ exit $LASTEXITCODE
1075+ }
1076+ }
1077+ micromamba activate CppInterOp-wasm
1078+ cd .\xeus-cpp\build\test
1079+ node test_xeus_cpp.js
1080+ echo "Running test_xeus_cpp in Firefox"
1081+ Error-OnFailure { emrun.bat --browser="firefox.exe" --kill_exit --timeout 60 --browser-args="--headless" test_xeus_cpp.html }
1082+ echo "Running test_xeus_cpp in Chromium"
1083+ Error-OnFailure { emrun.bat --browser="chrome.exe" --kill_exit --timeout 60 --browser-args="--headless --no-sandbox" test_xeus_cpp.html }
1084+
10261085 - name : Jupyter Lite integration
10271086 if : ${{ runner.os != 'windows' }}
10281087 shell : bash -l {0}
@@ -1031,3 +1090,12 @@ jobs:
10311090 micromamba create -n xeus-lite-host jupyterlite-core=0.6 jupyterlite-xeus jupyter_server jupyterlab notebook python-libarchive-c -c conda-forge
10321091 micromamba activate xeus-lite-host
10331092 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
1093+
1094+ - name : Jupyter Lite integration
1095+ if : ${{ runner.os == 'windows' }}
1096+ shell : powershell
1097+ run : |
1098+ cd .\xeus-cpp\
1099+ micromamba create -n xeus-lite-host jupyterlite-core=0.6 jupyterlite-xeus jupyter_server jupyterlab notebook python-libarchive-c -c conda-forge
1100+ micromamba activate xeus-lite-host
1101+ 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