@@ -195,15 +195,14 @@ jobs:
195195 emscripten_wasm :
196196
197197 runs-on : ${{ matrix.os }}
198+ name : ${{ matrix.os}}-${{ matrix.notebook }}-${{ matrix.kernel }}
198199
199200 strategy :
200201 fail-fast : false
201202 matrix :
202- include :
203- - name : ubu24
204- os : ubuntu-24.04
205- - name : osx15-arm
206- os : macos-15
203+ os : [ubuntu-24.04, macos-15]
204+ notebook : [smallpt.ipynb, xeus-cpp-lite-demo.ipynb]
205+ kernel : [C++17,C++20,C++23]
207206
208207 steps :
209208 - uses : actions/checkout@v5
@@ -329,12 +328,65 @@ jobs:
329328 fi
330329 timeout-minutes : 4
331330
332- - name : Jupyter Lite integration
331+ - name : Jupyter Lite integration test
333332 shell : bash -l {0}
334333 run : |
334+ set -e
335335 micromamba create -n xeus-lite-host jupyterlite-core=0.6 jupyterlite-xeus -c conda-forge
336336 micromamba activate xeus-lite-host
337- jupyter lite build --XeusAddon.prefix=${{ env.PREFIX }}
337+ if [[ "${{ matrix.os }}" == "macos"* ]]; then
338+ brew install coreutils
339+ export PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH"
340+ fi
341+ timeout 900 jupyter lite serve --settings-overrides=overrides.json --XeusAddon.prefix=${{ env.PREFIX }} \
342+ --XeusAddon.mounts="${{ env.PREFIX }}/share/xeus-cpp/tagfiles:/share/xeus-cpp/tagfiles" \
343+ --XeusAddon.mounts="${{ env.PREFIX }}/etc/xeus-cpp/tags.d:/etc/xeus-cpp/tags.d" \
344+ --contents README.md \
345+ --contents notebooks/xeus-cpp-lite-demo.ipynb \
346+ --contents notebooks/smallpt.ipynb \
347+ --contents notebooks/images/marie.png \
348+ --contents notebooks/audio/audio.wav &
349+ # There is a bug in nbdime after 3.2.0 where it will show the filenames as if there was a diff
350+ # but there is no diff with the options chosen below (the latest doesn't show a diff, just the filenames with +++
351+ # and --- as if it was planning to show a diff. This only happens for xeus-cpp-lite-demo.ipynb.
352+ python -m pip install nbdime==3.2.0
353+ python -m pip install selenium
354+ # This sleep is to force enough time for the jupyter site to build before trying
355+ # to run notebooks in it. If you try to run the notebooks before the website is
356+ # ready the ci python script will crash saying ti cannot access the url
357+ sleep 10
358+ echo "Running xeus-cpp in Jupter Lite in Chrome"
359+ python -u scripts/automated-notebook-run-script.py --driver chrome --notebook ${{ matrix.notebook }} --kernel ${{ matrix.kernel }}
360+ nbdiff notebooks/${{ matrix.notebook }} $HOME/Downloads/${{ matrix.notebook }} --ignore-id --ignore-metadata >> chrome_diff.txt
361+ export CHROME_TESTS_RETURN_VALUE=$( [ -s chrome_diff.txt ] && echo 1 || echo 0 )
362+ echo "Running xeus-cpp in Jupter Lite in Firefox"
363+ python -u scripts/automated-notebook-run-script.py --driver firefox --notebook ${{ matrix.notebook }} --kernel ${{ matrix.kernel }}
364+ nbdiff notebooks/${{ matrix.notebook }} $HOME/Downloads/${{ matrix.notebook }} --ignore-id --ignore-metadata >> firefox_diff.txt
365+ export FIREFOX_TESTS_RETURN_VALUE=$( [ -s firefox_diff.txt ] && echo 1 || echo 0 )
366+ rm $HOME/Downloads/${{ matrix.notebook }}
367+ export SAFARI_TESTS_RETURN_VALUE=0
368+ touch safari_diff.txt
369+ if [[ "${{ matrix.os }}" == "macos"* ]]; then
370+ python -m pip install PyAutoGUI
371+ python scripts/enable-downloads-safari-github-ci.py
372+ echo "Running xeus-cpp in Jupter Lite in Safari"
373+ python -u scripts/automated-notebook-run-script.py --driver safari --notebook ${{ matrix.notebook }} --kernel ${{ matrix.kernel }}
374+ nbdiff notebooks/${{ matrix.notebook }} $HOME/Downloads/${{ matrix.notebook }} --ignore-id --ignore-metadata >> safari_diff.txt
375+ export SAFARI_TESTS_RETURN_VALUE=$( [ -s safari_diff.txt ] && echo 1 || echo 0 )
376+ rm $HOME/Downloads/${{ matrix.notebook }}
377+ fi
378+ if [[ $SAFARI_TESTS_RETURN_VALUE -ne 0 || $FIREFOX_TESTS_RETURN_VALUE -ne 0 || $CHROME_TESTS_RETURN_VALUE -ne 0 ]]; then
379+ if [[ "${{ matrix.os }}" == "macos"* ]]; then
380+ echo "Diff Safari (blank means no diff)"
381+ cat safari_diff.txt
382+ fi
383+ echo "Diff Firefox (blank means no diff)"
384+ cat firefox_diff.txt
385+ echo "Diff Chrome (blank means no diff)"
386+ cat chrome_diff.txt
387+ exit 1
388+ fi
389+ timeout-minutes : 15
338390
339391 - name : Setup tmate session
340392 if : ${{ failure() && runner.debug }}
0 commit comments