Skip to content
Snippets Groups Projects
Verified Commit b7ee31e6 authored by Lars Bilke's avatar Lars Bilke
Browse files

[ci] Use xvfb-run wrapper on Linux and gmsh wheel without X dependencies

parent a7f584e5
No related branches found
No related tags found
No related merge requests found
......@@ -38,11 +38,16 @@
preset_postfix="-large"
fi
if [[ "$OSTYPE" == "darwin"* ]]; then alias date=gdate ; fi
xvfb_run_cmd=""
if [[ "$OSTYPE" == "darwin"* ]]; then
alias date=gdate
else
xvfb_run_cmd="xvfb-run -a"
fi
# -M Continuous does not run any tests -> -M Experimental --group Continuous
# --test-dir has to be provided despite using a preset
ctest -M Experimental --group Continuous --test-dir ${build_dir_full} -T Test -T Submit --preset=${CMAKE_PRESET}${preset_postfix} --output-junit Tests/ctest.xml --stop-time `date -d "today + ${ctest_timeout} minutes" +'%H:%M:%S'` ${CTEST_ARGS}
${xvfb_run_cmd} ctest -M Experimental --group Continuous --test-dir ${build_dir_full} -T Test -T Submit --preset=${CMAKE_PRESET}${preset_postfix} --output-junit Tests/ctest.xml --stop-time `date -d "today + ${ctest_timeout} minutes" +'%H:%M:%S'` ${CTEST_ARGS}
fi
else
......
......@@ -11,7 +11,7 @@ test notebooks via wheel:
# TODO:
# - better timeout
# - run in parallel
- find . -type f -iname '*.ipynb' | grep -vP '\.ipynb_checkpoints|\.ci-skip.ipynb$|_out|.venv|PhaseField' | PYVISTA_HEADLESS=1 xargs python Notebooks/testrunner.py --out _out --timeout 1200
- find . -type f -iname '*.ipynb' | grep -vP '\.ipynb_checkpoints|\.ci-skip.ipynb$|_out|.venv|PhaseField' | xargs xvfb-run -a python Notebooks/testrunner.py --out _out --timeout 1200
artifacts:
when: always
paths:
......
......@@ -130,6 +130,16 @@ function(setup_venv)
OUTPUT_VARIABLE _out
ERROR_VARIABLE _err
)
if(DEFINED ENV{CI_JOB_IMAGE})
# Install gmsh package without X11 dependencies in Docker CI builds
execute_process(
COMMAND
${LOCAL_VIRTUALENV_BIN_DIR}/pip install -i
https://gmsh.info/python-packages-dev-nox --force-reinstall
--no-cache-dir gmsh
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
endif()
if(${_return_code} EQUAL 0)
set(_OGS_PYTHON_PACKAGES_SHA1 "${_ogs_python_packages_sha1}"
CACHE INTERNAL ""
......
......@@ -68,7 +68,6 @@ function(NotebookTest)
)
return()
endif()
set(_pyvista_headless_env -E env PYVISTA_HEADLESS=1)
endif()
if("${_pyvista_check}" GREATER 0)
......@@ -112,7 +111,7 @@ function(NotebookTest)
add_test(
NAME ${TEST_NAME}
COMMAND
${CMAKE_COMMAND} ${_pyvista_headless_env} ${CMAKE_COMMAND}
${CMAKE_COMMAND} ${CMAKE_COMMAND}
# TODO: only works if notebook is in a leaf directory
# -DFILES_TO_DELETE=${Data_BINARY_DIR}/${NotebookTest_DIR}
-DEXECUTABLE=${Python_EXECUTABLE} "-DEXECUTABLE_ARGS=${_exe_args}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment