Skip to content

Commit 6ed069a

Browse files
committed
Run notebooks in ci
1 parent 95dc663 commit 6ed069a

File tree

2 files changed

+88
-21
lines changed

2 files changed

+88
-21
lines changed

.github/workflows/deploy-github-page.yml

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -139,21 +139,50 @@ jobs:
139139
fi
140140
timeout-minutes: 4
141141

142-
- name: Jupyter Lite integration
143-
shell: bash -l {0}
144-
run: |
145-
micromamba create -n xeus-lite-host jupyter_server jupyterlite-xeus -c conda-forge
146-
micromamba activate xeus-lite-host
147-
jupyter lite build \
148-
--XeusAddon.prefix=${{ env.PREFIX }} \
149-
--XeusAddon.mounts="${{ env.PREFIX }}/share/xeus-cpp/tagfiles:/share/xeus-cpp/tagfiles" \
150-
--XeusAddon.mounts="${{ env.PREFIX }}/etc/xeus-cpp/tags.d:/etc/xeus-cpp/tags.d" \
151-
--contents README.md \
152-
--contents notebooks/xeus-cpp-lite-demo.ipynb \
153-
--contents notebooks/tinyraytracer.ipynb \
154-
--contents notebooks/images/marie.png \
155-
--contents notebooks/audio/audio.wav \
156-
--output-dir dist
142+
- name: Serve Jupyter Lite website
143+
uses: ./.github/actions/Jupyter-serve
144+
145+
- name: Test C++17 kernel in xeus-cpp-lite-demo.ipynb
146+
uses: ./.github/actions/Emscripten-Notebook-Tests
147+
with:
148+
notebook: "xeus-cpp-lite-demo.ipynb"
149+
kernel: "C++17"
150+
timeout-minutes: 5
151+
152+
- name: Test C++20 kernel in xeus-cpp-lite-demo.ipynb
153+
uses: ./.github/actions/Emscripten-Notebook-Tests
154+
with:
155+
notebook: "xeus-cpp-lite-demo.ipynb"
156+
kernel: "C++20"
157+
timeout-minutes: 5
158+
159+
- name: Test C++23 kernel in xeus-cpp-lite-demo.ipynb
160+
uses: ./.github/actions/Emscripten-Notebook-Tests
161+
with:
162+
notebook: "xeus-cpp-lite-demo.ipynb"
163+
kernel: "C++23"
164+
timeout-minutes: 5
165+
166+
- name: Test C++17 kernel in tinyraytracer.ipynb
167+
uses: ./.github/actions/Emscripten-Notebook-Tests
168+
with:
169+
notebook: "tinyraytracer.ipynb"
170+
kernel: "C++17"
171+
timeout-minutes: 5
172+
173+
- name: Test C++20 kernel in tinyraytracer.ipynb
174+
uses: ./.github/actions/Emscripten-Notebook-Tests
175+
with:
176+
notebook: "tinyraytracer.ipynb"
177+
kernel: "C++20"
178+
timeout-minutes: 5
179+
180+
- name: Test C++23 kernel in tinyraytracer.ipynb
181+
uses: ./.github/actions/Emscripten-Notebook-Tests
182+
with:
183+
notebook: "tinyraytracer.ipynb"
184+
kernel: "C++23"
185+
timeout-minutes: 5
157186

158187
- name: Upload artifact
159188
uses: actions/upload-pages-artifact@v3

.github/workflows/main.yml

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -329,12 +329,50 @@ jobs:
329329
fi
330330
timeout-minutes: 4
331331

332-
- name: Jupyter Lite integration
333-
shell: bash -l {0}
334-
run: |
335-
micromamba create -n xeus-lite-host jupyterlite-xeus -c conda-forge
336-
micromamba activate xeus-lite-host
337-
jupyter lite build --XeusAddon.prefix=${{ env.PREFIX }}
332+
- name: Serve Jupyter Lite website
333+
uses: ./.github/actions/Jupyter-serve
334+
335+
- name: Test C++17 kernel in xeus-cpp-lite-demo.ipynb
336+
uses: ./.github/actions/Emscripten-Notebook-Tests
337+
with:
338+
notebook: "xeus-cpp-lite-demo.ipynb"
339+
kernel: "C++17"
340+
timeout-minutes: 5
341+
342+
- name: Test C++20 kernel in xeus-cpp-lite-demo.ipynb
343+
uses: ./.github/actions/Emscripten-Notebook-Tests
344+
with:
345+
notebook: "xeus-cpp-lite-demo.ipynb"
346+
kernel: "C++20"
347+
timeout-minutes: 5
348+
349+
- name: Test C++23 kernel in xeus-cpp-lite-demo.ipynb
350+
uses: ./.github/actions/Emscripten-Notebook-Tests
351+
with:
352+
notebook: "xeus-cpp-lite-demo.ipynb"
353+
kernel: "C++23"
354+
timeout-minutes: 5
355+
356+
- name: Test C++17 kernel in tinyraytracer.ipynb
357+
uses: ./.github/actions/Emscripten-Notebook-Tests
358+
with:
359+
notebook: "tinyraytracer.ipynb"
360+
kernel: "C++17"
361+
timeout-minutes: 5
362+
363+
- name: Test C++20 kernel in tinyraytracer.ipynb
364+
uses: ./.github/actions/Emscripten-Notebook-Tests
365+
with:
366+
notebook: "tinyraytracer.ipynb"
367+
kernel: "C++20"
368+
timeout-minutes: 5
369+
370+
- name: Test C++23 kernel in tinyraytracer.ipynb
371+
uses: ./.github/actions/Emscripten-Notebook-Tests
372+
with:
373+
notebook: "tinyraytracer.ipynb"
374+
kernel: "C++23"
375+
timeout-minutes: 5
338376

339377
- name: Setup tmate session
340378
if: ${{ failure() && runner.debug }}

0 commit comments

Comments
 (0)