From d60b5467b8c46e4edb27abd69a5ea82f4fcb08df Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Thu, 6 Nov 2025 12:06:14 +0530 Subject: [PATCH 1/2] Use node 22 for testing and update readme --- .github/workflows/deploy-github-page.yml | 11 +++++++---- .github/workflows/main.yml | 14 +++++++------- CONTRIBUTING.md | 15 +++++++-------- README.md | 15 +++++++-------- docs/source/InstallationAndUsage.rst | 15 +++++++-------- 5 files changed, 35 insertions(+), 35 deletions(-) diff --git a/.github/workflows/deploy-github-page.yml b/.github/workflows/deploy-github-page.yml index 213f0c48..00cf84bb 100644 --- a/.github/workflows/deploy-github-page.yml +++ b/.github/workflows/deploy-github-page.yml @@ -64,15 +64,16 @@ jobs: -DSYSROOT_PATH=$SYSROOT_PATH \ -DCMAKE_COMPILE_WARNING_AS_ERROR=ON \ .. - emmake make -j ${{ env.ncpus }} check-xeus-cpp + + micromamba create -n node-env -c conda-forge nodejs=22 + export PATH="$MAMBA_ROOT_PREFIX/envs/node-env/bin:$PATH" + + make check-xeus-cpp emmake make -j ${{ env.ncpus }} install - name: Test Emscripten xeus-cpp in browser shell: bash -l {0} run: | - set -e - micromamba create -n xeus-lite-host jupyterlite-core=0.6 jupyter_server jupyterlite-xeus - micromamba activate xeus-lite-host cd build/test # Fresh install browsers, and run Emscripten tests in them # This is to match the Emscripten build instructions, where @@ -140,6 +141,8 @@ jobs: - name: Jupyter Lite integration shell: bash -l {0} run: | + set -e + micromamba create -n xeus-lite-host jupyterlite-core=0.6 jupyter_server jupyterlite-xeus -c conda-forge micromamba activate xeus-lite-host jupyter lite build \ --XeusAddon.prefix=${{ env.PREFIX }} \ diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0d84ac9d..8b6fc130 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -191,8 +191,6 @@ jobs: os: ubuntu-24.04 - name: osx15-arm os: macos-15 - - name: osx26-arm - os: macos-26 steps: - uses: actions/checkout@v5 @@ -238,16 +236,16 @@ jobs: -DSYSROOT_PATH=$SYSROOT_PATH \ -DCMAKE_COMPILE_WARNING_AS_ERROR=ON \ .. - emmake make -j ${{ env.ncpus }} check-xeus-cpp + + micromamba create -n node-env -c conda-forge nodejs=22 + export PATH="$MAMBA_ROOT_PREFIX/envs/node-env/bin:$PATH" + + make check-xeus-cpp emmake make -j ${{ env.ncpus }} install - name: Test Emscripten xeus-cpp in browser shell: bash -l {0} run: | - export BUILD_PREFIX=$MAMBA_ROOT_PREFIX/envs/xeus-cpp-wasm-build - set -e - micromamba create -n xeus-lite-host jupyterlite-core=0.6 jupyterlite-xeus - micromamba activate xeus-lite-host cd build/test # Fresh install browsers, and run Emscripten tests in them # This is to match the Emscripten build instructions, where @@ -320,6 +318,8 @@ jobs: - name: Jupyter Lite integration shell: bash -l {0} run: | + set -e + micromamba create -n xeus-lite-host jupyterlite-core=0.6 jupyterlite-xeus -c conda-forge micromamba activate xeus-lite-host jupyter lite build --XeusAddon.prefix=${{ env.PREFIX }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 85793aac..7c6d42b7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -74,7 +74,7 @@ micromamba create -f environment-wasm-build.yml -y micromamba activate xeus-cpp-wasm-build ``` -You are now in a position to build the xeus-cpp kernel. You build and test it in node by executing the following +You are now in a position to build the xeus-cpp kernel. You build and test it in node by executing the following. Prefer using node 22 and above as prior versions lead to flaky test runs. Once the test pass, run the install command. ```bash micromamba create -f environment-wasm-host.yml --platform=emscripten-wasm32 @@ -91,7 +91,12 @@ emcmake cmake \ -DCMAKE_FIND_ROOT_PATH=$PREFIX \ -DSYSROOT_PATH=$SYSROOT_PATH \ .. -emmake make check-xeus-cpp + +micromamba create -n node-env -c conda-forge nodejs=22 +export PATH="$MAMBA_ROOT_PREFIX/envs/node-env/bin:$PATH" + +make check-xeus-cpp +emmake make install ``` It is possible to run the Emscripten tests in a headless browser. We will run our tests in a fresh installed browser. Installing the browsers, and running the tests within the installed browsers will be platform dependent. To do this for Chrome and Firefox on MacOS execute the following @@ -148,12 +153,6 @@ echo "Running test_xeus_cpp in Google Chrome" python $BUILD_PREFIX/bin/emrun.py --browser="google-chrome" --kill_exit --timeout 60 --browser-args="--headless --no-sandbox" test_xeus_cpp.html ``` -After you have checked that the kernel passes all the tests, you can install it by executing - -```bash -emmake make install -``` - To build and test Jupyter Lite with this kernel locally you can execute the following ```bash micromamba create -n xeus-lite-host jupyterlite-core=0.6 jupyter_server jupyterlite-xeus -c conda-forge diff --git a/README.md b/README.md index 40866617..0615ae40 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ micromamba create -f environment-wasm-build.yml -y micromamba activate xeus-cpp-wasm-build ``` -You are now in a position to build the xeus-cpp kernel. You build and test it in node by executing the following +You are now in a position to build the xeus-cpp kernel. You build and test it in node by executing the following. Prefer using node 22 and above as prior versions lead to flaky test runs. Once the test pass, run the install command. ```bash micromamba create -f environment-wasm-host.yml --platform=emscripten-wasm32 mkdir build @@ -106,7 +106,12 @@ emcmake cmake \ -DCMAKE_FIND_ROOT_PATH=$PREFIX \ -DSYSROOT_PATH=$SYSROOT_PATH \ .. -emmake make check-xeus-cpp + +micromamba create -n node-env -c conda-forge nodejs=22 +export PATH="$MAMBA_ROOT_PREFIX/envs/node-env/bin:$PATH" + +make check-xeus-cpp +emmake make install ``` It is possible to run the Emscripten tests in a headless browser. We will run our tests in a fresh installed browser. Installing the browsers, and running the tests within the installed browsers will be platform dependent. To do this for Chrome and Firefox on MacOS execute the following @@ -163,12 +168,6 @@ echo "Running test_xeus_cpp in Google Chrome" python $BUILD_PREFIX/bin/emrun.py --browser="google-chrome" --kill_exit --timeout 60 --browser-args="--headless --no-sandbox" test_xeus_cpp.html ``` -After you have checked that the kernel passes all the tests, you can install it by executing - -```bash -emmake make install -``` - To build and test Jupyter Lite with this kernel locally you can execute the following ```bash micromamba create -n xeus-lite-host jupyterlite-core=0.6 jupyter_server jupyterlite-xeus -c conda-forge diff --git a/docs/source/InstallationAndUsage.rst b/docs/source/InstallationAndUsage.rst index 2363cb9d..af8fa635 100644 --- a/docs/source/InstallationAndUsage.rst +++ b/docs/source/InstallationAndUsage.rst @@ -68,7 +68,7 @@ the following micromamba create -f environment-wasm-build.yml -y micromamba activate xeus-cpp-wasm-build -You are now in a position to build the xeus-cpp kernel. You build and test it in node by executing the following +You are now in a position to build the xeus-cpp kernel. You build and test it in node by executing the following. Prefer using node 22 and above as prior versions lead to flaky test runs. Once the test pass, run the install command. .. code-block:: bash @@ -86,7 +86,12 @@ You are now in a position to build the xeus-cpp kernel. You build and test it in -DCMAKE_FIND_ROOT_PATH=$PREFIX \ -DSYSROOT_PATH=$SYSROOT_PATH \ .. - emmake make check-xeus-cpp + + micromamba create -n node-env -c conda-forge nodejs=22 + export PATH="$MAMBA_ROOT_PREFIX/envs/node-env/bin:$PATH" + + make check-xeus-cpp + emmake make install It is possible to run the Emscripten tests in a headless browser. We will run our tests in a fresh installed browser. Installing the browsers, and running the tests within the installed browsers will be platform dependent. To do this for Chrome and Firefox on MacOS execute the following @@ -142,12 +147,6 @@ To do this on Ubuntu x86 execute the following echo "Running test_xeus_cpp in Google Chrome" python $BUILD_PREFIX/bin/emrun.py --browser="google-chrome" --kill_exit --timeout 60 --browser-args="--headless --no-sandbox" test_xeus_cpp.html -After you have checked that the kernel passes all the tests, you can install it by executing - -.. code-block:: bash - - emmake make install - To build and test Jupyter Lite with this kernel locally you can execute the following .. code-block:: bash From 426be21013d43bf9b5eb321a7807d274575e8f82 Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Thu, 6 Nov 2025 14:46:59 +0530 Subject: [PATCH 2/2] fix set -e --- .github/workflows/deploy-github-page.yml | 2 +- .github/workflows/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-github-page.yml b/.github/workflows/deploy-github-page.yml index 00cf84bb..94c0894b 100644 --- a/.github/workflows/deploy-github-page.yml +++ b/.github/workflows/deploy-github-page.yml @@ -74,6 +74,7 @@ jobs: - name: Test Emscripten xeus-cpp in browser shell: bash -l {0} run: | + set -e cd build/test # Fresh install browsers, and run Emscripten tests in them # This is to match the Emscripten build instructions, where @@ -141,7 +142,6 @@ jobs: - name: Jupyter Lite integration shell: bash -l {0} run: | - set -e micromamba create -n xeus-lite-host jupyterlite-core=0.6 jupyter_server jupyterlite-xeus -c conda-forge micromamba activate xeus-lite-host jupyter lite build \ diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8b6fc130..3a4a1689 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -246,6 +246,7 @@ jobs: - name: Test Emscripten xeus-cpp in browser shell: bash -l {0} run: | + set -e cd build/test # Fresh install browsers, and run Emscripten tests in them # This is to match the Emscripten build instructions, where @@ -318,7 +319,6 @@ jobs: - name: Jupyter Lite integration shell: bash -l {0} run: | - set -e micromamba create -n xeus-lite-host jupyterlite-core=0.6 jupyterlite-xeus -c conda-forge micromamba activate xeus-lite-host jupyter lite build --XeusAddon.prefix=${{ env.PREFIX }}