Skip to content

Commit c945249

Browse files
authored
Add Windows Emscripten build of xeus-cpp to ci
1 parent 180869d commit c945249

File tree

1 file changed

+36
-3
lines changed

1 file changed

+36
-3
lines changed

.github/workflows/emscripten.yml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ jobs:
745745
.\emsdk\emsdk_env.ps1
746746
$env:PWD_DIR= $PWD.Path
747747
$env:SYSROOT_PATH="$env:EMSDK/upstream/emscripten/cache/sysroot"
748-
$env:PREFIX="%CONDA_PREFIX%/envs/CppInterOp-wasm"
748+
$env:PREFIX="$env:CONDA_PREFIX/envs/CppInterOp-wasm"
749749
$env:CMAKE_PREFIX_PATH=$env:PREFIX
750750
$env:CMAKE_SYSTEM_PREFIX_PATH=$env:PREFIX
751751
@@ -902,7 +902,7 @@ jobs:
902902
}
903903
emmake make -j ${{ env.ncpus }} check-cppinterop
904904
905-
- name: Build xeus-cpp
905+
- name: Build xeus-cpp on Unix Systems
906906
if: ${{ runner.os != 'windows' }}
907907
shell: bash -l {0}
908908
run: |
@@ -926,7 +926,31 @@ jobs:
926926
..
927927
emmake make -j ${{ env.ncpus }} install
928928
929-
- name: Test xeus-cpp C++ Emscripten
929+
- name: Build xeus-cpp on Windows systems
930+
if: ${{ runner.os == 'windows' }}
931+
shell: bash -l {0}
932+
run: |
933+
.\emsdk\emsdk activate ${{matrix.emsdk_ver}}
934+
.\emsdk\emsdk_env.ps1
935+
micromamba activate CppInterOp-wasm
936+
git clone --depth=1 https://github.com/compiler-research/xeus-cpp.git
937+
cd .\xeus-cpp
938+
mkdir build
939+
pushd build
940+
$env:CMAKE_PREFIX_PATH=${{ env.PREFIX }}
941+
$env:CMAKE_SYSTEM_PREFIX_PATH=${{ env.PREFIX }}
942+
emcmake cmake `
943+
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
944+
-DCMAKE_PREFIX_PATH=${{ env.PREFIX }} `
945+
-DCMAKE_INSTALL_PREFIX=${{ env.PREFIX }} `
946+
-DXEUS_CPP_EMSCRIPTEN_WASM_BUILD=ON `
947+
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON `
948+
-DXEUS_CPP_RESOURCE_DIR=${{ env.LLVM_BUILD_DIR }}/lib/clang/${{ matrix.clang-runtime }} `
949+
-DSYSROOT_PATH=${{ env.SYSROOT_PATH }} `
950+
..
951+
emmake make -j ${{ env.ncpus }} install
952+
953+
- name: Test xeus-cpp C++ Emscripten on Unix Systems
930954
if: ${{ runner.os != 'windows' }}
931955
shell: bash -l {0}
932956
run: |
@@ -935,6 +959,15 @@ jobs:
935959
cd ./xeus-cpp/build/test
936960
node test_xeus_cpp.js
937961
962+
- name: Test xeus-cpp C++ Emscripten
963+
if: ${{ runner.os == 'windows' }}
964+
shell: bash -l {0}
965+
run: |
966+
$ErrorActionPreference = "Stop"
967+
micromamba activate CppInterOp-wasm
968+
cd .\xeus-cpp\build\test
969+
node test_xeus_cpp.js
970+
938971
- name: Jupyter Lite integration
939972
if: ${{ runner.os != 'windows' }}
940973
shell: bash -l {0}

0 commit comments

Comments
 (0)