Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ jobs:
- name: Build xeus-cpp
shell: bash -l {0}
run: |
set -e
./emsdk/emsdk activate ${{matrix.emsdk_ver}}
source ./emsdk/emsdk_env.sh
micromamba activate CppInterOp-wasm
Expand All @@ -210,16 +211,9 @@ jobs:
-DXEUS_CPP_RESOURCE_DIR=${{ env.LLVM_BUILD_DIR }}/lib/clang/${{ matrix.clang-runtime }} \
-DSYSROOT_PATH=${{ env.SYSROOT_PATH }} \
..
emmake make -j ${{ env.ncpus }} check-xeus-cpp
emmake make -j ${{ env.ncpus }} install

- name: Test xeus-cpp C++ Emscripten
shell: bash -l {0}
run: |
set -e
micromamba activate CppInterOp-wasm
cd ./xeus-cpp/build/test
node test_xeus_cpp.js

- name: Jupyter Lite integration
shell: bash -l {0}
run: |
Expand Down
35 changes: 23 additions & 12 deletions .github/workflows/emscripten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,7 @@ jobs:
if: ${{ runner.os != 'windows' }}
shell: bash -l {0}
run: |
set -e
./emsdk/emsdk activate ${{matrix.emsdk_ver}}
source ./emsdk/emsdk_env.sh
micromamba activate CppInterOp-wasm
Expand All @@ -962,6 +963,7 @@ jobs:
pushd build
export CMAKE_PREFIX_PATH=${{ env.PREFIX }}
export CMAKE_SYSTEM_PREFIX_PATH=${{ env.PREFIX }}
micromamba create -n node-env -c conda-forge nodejs=22
emcmake cmake \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DCMAKE_PREFIX_PATH=${{ env.PREFIX }} \
Expand All @@ -970,7 +972,10 @@ jobs:
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON \
-DXEUS_CPP_RESOURCE_DIR=${{ env.LLVM_BUILD_DIR }}/lib/clang/${{ matrix.clang-runtime }} \
-DSYSROOT_PATH=${{ env.SYSROOT_PATH }} \
-DCMAKE_CROSSCOMPILING_EMULATOR="$MAMBA_ROOT_PREFIX/envs/node-env/bin/node" \
..
export PATH="$MAMBA_ROOT_PREFIX/envs/node-env/bin/node:$PATH"
emmake make -j ${{ env.ncpus }} check-xeus-cpp
emmake make -j ${{ env.ncpus }} install

- name: Build xeus-cpp on Windows systems
Expand All @@ -980,12 +985,26 @@ jobs:
.\emsdk\emsdk activate ${{matrix.emsdk_ver}}
.\emsdk\emsdk_env.ps1
micromamba activate CppInterOp-wasm
function Error-OnFailure {
param (
[Parameter(Mandatory)]
[ScriptBlock]$Command
)

& $Command

if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
}
git clone --depth=1 https://github.com/compiler-research/xeus-cpp.git
cd .\xeus-cpp
mkdir build
pushd build
$env:CMAKE_PREFIX_PATH="${{ env.PREFIX }}"
$env:CMAKE_SYSTEM_PREFIX_PATH="${{ env.PREFIX }}"
$env:PATH="$env:MAMBA_ROOT_PREFIX/envs/node-env/bin/node;$PATH"
micromamba create -n node-env -c conda-forge nodejs=22
emcmake cmake `
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
-DCMAKE_PREFIX_PATH=${{ env.PREFIX }} `
Expand All @@ -994,19 +1013,12 @@ jobs:
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ON `
-DXEUS_CPP_RESOURCE_DIR=${{ env.LLVM_BUILD_DIR }}\lib\clang\${{ matrix.clang-runtime }} `
-DSYSROOT_PATH=${{ env.SYSROOT_PATH }} `
-DCMAKE_CROSSCOMPILING_EMULATOR="$env:MAMBA_ROOT_PREFIX\envs\node-env\bin\node" `
..
emmake make -j ${{ env.ncpus }} install

- name: Test xeus-cpp C++ Emscripten on Unix Systems
if: ${{ runner.os != 'windows' }}
shell: bash -l {0}
run: |
set -e
micromamba activate CppInterOp-wasm
cd ./xeus-cpp/build/test
node test_xeus_cpp.js
Error-OnFailure { emmake make -j ${{ env.ncpus }} check-xeus-cpp }
Error-OnFailure { emmake make -j ${{ env.ncpus }} install }

- name: Test xeus-cpp C++ Emscripten on Windows Systems
- name: Test xeus-cpp Emscripten C++ tests in browsers on Windows Systems
if: ${{ runner.os == 'windows' }}
shell: powershell
run: |
Expand All @@ -1024,7 +1036,6 @@ jobs:
}
micromamba activate CppInterOp-wasm
cd .\xeus-cpp\build\test
node test_xeus_cpp.js
echo "Running test_xeus_cpp in Firefox"
Error-OnFailure { emrun.bat --browser="firefox.exe" --kill_exit --timeout 60 --browser-args="--headless" test_xeus_cpp.html }
echo "Running test_xeus_cpp in Chromium"
Expand Down
Loading