Skip to content
Snippets Groups Projects
Commit d5f622ff authored by Marcin Kirsz's avatar Marcin Kirsz
Browse files

Update .gitlab-ci.yml file

parent 257d3dfe
No related branches found
No related tags found
No related merge requests found
Pipeline #48364 passed
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_COMMIT_SHA/$CI_PROJECT_NAME
stages:
- build.debug
- run.unit.tests
- build_debug
- run_unit_tests
- build_release
- run.functional.tests
- trigger
cache:
paths:
- ${BUILD_DIR}
before_script:
- mkdir -p ${DEBUG_DIR}
- mkdir -p ${RELEASE_DIR}
- export PATH=$PATH:${INSTALL_PATH}/bin
- export CPATH=$CPATH:${INSTALL_PATH}/include
- export LIBRARY_PATH=$LIBRARY_PATH:${INSTALL_PATH}/lib
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${INSTALL_PATH}/lib
- mkdir -p ${RELEASE_SHARED_DIR}
- mkdir -p ${RELEASE_STATIC_DIR}
- export OMP_NUM_THREADS=${CPU_SIM}
build-debug-tests:
stage: build.debug
build_debug:
stage: build_debug
script:
- cd ${DEBUG_DIR}
- cmake .. -DCMAKE_CXX_FLAGS="-g -O1 -Wall -Wpedantic -pedantic-errors -Wextra --coverage" -DTADAH_ENABLE_OPENMP=ON -DTADAH_BUILD_TESTS=ON
- cmake ../.. -DCMAKE_CXX_FLAGS="-g -O1 -Wall -Wpedantic -pedantic-errors -Wextra --coverage" -DTADAH_ENABLE_OPENMP=ON -DTADAH_BUILD_TESTS=ON
- make -j ${CPU_BUILD}
# - rm -rf _deps
# - find . -name "*.a" -exec rm {} +
# - find . -name "*.o" -exec rm {} +
# artifacts:
# paths:
# - "${DEBUG_DIR}"
run-tests-1:
variables:
GIT_CLEAN_FLAGS: -ffdx -e ${DEBUG_DIR} -e CORE -e MODELS
stage: run.unit.tests
dependencies: [build-debug-tests]
run_unit_tests:
stage: run_unit_tests
script:
- cd ${DEBUG_DIR}
- make test
- cd ..; gcovr -e '.*tests.*|.*lib.*|.*utils.*|build' -r .
coverage: /^TOTAL.*\s+(\d+\%)$/
build-release-shared:
build_release_shared:
stage: build_release
needs: [run-tests-1]
script:
- cd ${RELEASE_DIR}
- cmake .. -DCMAKE_BUILD_TYPE=Release -DTADAH_ENABLE_OPENMP=ON -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH}
- cd ${RELEASE_SHARED_DIR}
- cmake ../.. -DCMAKE_BUILD_TYPE=Release -DTADAH_ENABLE_OPENMP=ON -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH}
- make -j ${CPU_BUILD}
build-release-static:
build_release_static:
stage: build_release
needs: [build-release-shared]
script:
- cd ${RELEASE_DIR}
- cmake .. -DCMAKE_BUILD_TYPE=Release -DTADAH_ENABLE_OPENMP=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH}
- cd ${RELEASE_STATIC_DIR}
- cmake ../.. -DCMAKE_BUILD_TYPE=Release -DTADAH_ENABLE_OPENMP=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH}
- make -j ${CPU_BUILD}
trigger_job:
stage: trigger
needs: [run-tests-1, build-release-shared, build-release-static]
trigger:
project: tadah/tadah.mlip
# GitLab bug:
# https://gitlab.com/gitlab-org/gitlab/-/issues/220047
# Workaround:
inherit:
variables: false # this job won't inherit any variables
variables: # variables set by this job will still be passed to the child-pipeline
inherit: "This comes from the parent pipeline"
project: tadah/tadah.mlip
\ No newline at end of file
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