Skip to content
Snippets Groups Projects
Commit 307513d0 authored by mkirsz's avatar mkirsz
Browse files

Update .gitlab-ci.yml file

parent 383b9801
No related branches found
No related tags found
No related merge requests found
Pipeline #32923 failed
# You can override the included template(s) by including variable overrides
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
# Note that environment variables can be set in several places
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
variables:
DEBUG_DIR: "build_debug"
RELEASE_DIR: "build_release"
stages:
- build
- test
- deploy
- review
- dast
- staging
- canary
- production
- incremental rollout 10%
- incremental rollout 25%
- incremental rollout 50%
- incremental rollout 100%
- performance
- cleanup
sast:
stage: test
include:
- template: Auto-DevOps.gitlab-ci.yml
- build
- build.tests
- run.tests
- trigger
before_script:
- git clone https://git.ecdf.ed.ac.uk/tadah/core.git CORE
- git clone https://git.ecdf.ed.ac.uk/tadah/core.git MODELS
- mkdir -p ${DEBUG_DIR}
- mkdir -p ${RELEASE_DIR}
- export OMP_NUM_THREADS=4
build-debug:
stage: build
script:
- cd ${DEBUG_DIR}
- cmake .. -DCMAKE_CXX_FLAGS="-g -O1 -fsanitize=address -Wall -Wpedantic -pedantic-errors -Wextra --coverage"
- make -j ${OMP_NUM_THREADS}
build-tests:
variables:
GIT_CLEAN_FLAGS: -ffdx -e ${DEBUG_DIR}
stage: build.tests
needs: [build-debug]
script:
- cd ${DEBUG_DIR}
- cmake .. -DTADAH_ENABLE_OPENMP=ON -DTADAH_BUILD_TESTS=ON -DCMAKE_CXX_FLAGS="--coverage -g -O1"
- make -j ${OMP_NUM_THREADS}
- rm -rf _deps
- find . -name "*.a" -exec rm {} +
- find . -name "*.o" -exec rm {} +
artifacts:
paths:
- "${DEBUG_DIR}"
run-tests-1:
stage: run.tests
needs: [build-tests]
script:
- ta-dah --version
- ta-dah --help
run-tests-2:
stage: run.tests
needs: [build-tests]
script:
- cd ${DEBUG_DIR}
- make test
- gcovr --exclude='.*/Eigen/.*' --exclude='.*/catch2/.*' --exclude='.*/tests/.*' --exclude='.*/CLI11/.*' --exclude='.*/toml11/.*' --exclude='.*/CMakeFiles/.*' -r ..
coverage: /^TOTAL.*\s+(\d+\%)$/
build-release-shared:
stage: build
script:
- cd ${RELEASE_DIR}
- cmake .. -DCMAKE_BUILD_TYPE=Release -DTADAH_ENABLE_OPENMP=ON
- make -j ${OMP_NUM_THREADS}
build-release-static:
stage: build
needs: [build-release-shared]
script:
- cd ${RELEASE_DIR}
- cmake .. -DCMAKE_BUILD_TYPE=Release -DTADAH_ENABLE_OPENMP=ON -DBUILD_SHARED_LIBS=OFF
- make -j ${OMP_NUM_THREADS}
trigger_job:
stage: trigger
needs: [run-tests-1, run-tests-2, build-release-shared, build-release-static]
trigger:
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