Commit d5681b34 authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼
Browse files

cmake: use new CMake script to build notebooks

parent d3a65d10
...@@ -31,11 +31,15 @@ docker: ...@@ -31,11 +31,15 @@ docker:
build:linux: build:linux:
stage: build stage: build
script: script:
- mkdir build - mkdir -p build
- cd build - cd build
- cmake .. - cmake ..
- make -j 32 - make -j 32
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
cache:
paths:
- build
key: build-linux
artifacts: artifacts:
paths: paths:
- build - build
...@@ -147,8 +151,12 @@ deploy:packages: ...@@ -147,8 +151,12 @@ deploy:packages:
test:jupyter: test:jupyter:
stage: test stage: test
script: script:
- make -C Examples/Notebooks - cd build
- cmake ..
- make -j32 notebooks
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG} image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG}
dependencies:
- build:linux
artifacts: artifacts:
paths: paths:
- build/Examples/Notebooks/ - build/Examples/Notebooks/
......
...@@ -25,6 +25,8 @@ if(WITH_PYTHON AND JUPYTER) ...@@ -25,6 +25,8 @@ if(WITH_PYTHON AND JUPYTER)
set(HTML "${CMAKE_CURRENT_BINARY_DIR}/${DIR}/${NAME}.html") set(HTML "${CMAKE_CURRENT_BINARY_DIR}/${DIR}/${NAME}.html")
add_custom_command( add_custom_command(
COMMAND
${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${DIR}
COMMAND COMMAND
${CMAKE_COMMAND} -E env PYTHONPATH=${PYTHONPATH} ${CMAKE_COMMAND} -E env PYTHONPATH=${PYTHONPATH}
${JUPYTER} nbconvert ${JUPYTER} nbconvert
...@@ -32,7 +34,6 @@ if(WITH_PYTHON AND JUPYTER) ...@@ -32,7 +34,6 @@ if(WITH_PYTHON AND JUPYTER)
--output-dir ${CMAKE_CURRENT_BINARY_DIR}/${DIR} --output-dir ${CMAKE_CURRENT_BINARY_DIR}/${DIR}
"${CMAKE_CURRENT_SOURCE_DIR}/${IPYNB}" "${CMAKE_CURRENT_SOURCE_DIR}/${IPYNB}"
OUTPUT "${HTML}" OUTPUT "${HTML}"
WORKING_DIRECTORY ${DIR}
DEPENDS DEPENDS
"${IPYNB}" "${IPYNB}"
dpsim_python dpsim_python
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment