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
Pipeline: Tadah.MLIP

#48367

    variables:
    GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_COMMIT_SHA/$CI_PROJECT_NAME
    stages: stages:
    - build.debug - build_debug
    - run.unit.tests - run_unit_tests
    - build_release - build_release
    - run.functional.tests
    - trigger - trigger
    cache:
    paths:
    - ${BUILD_DIR}
    before_script: before_script:
    - mkdir -p ${DEBUG_DIR} - mkdir -p ${DEBUG_DIR}
    - mkdir -p ${RELEASE_DIR} - mkdir -p ${RELEASE_SHARED_DIR}
    - export PATH=$PATH:${INSTALL_PATH}/bin - mkdir -p ${RELEASE_STATIC_DIR}
    - export CPATH=$CPATH:${INSTALL_PATH}/include
    - export LIBRARY_PATH=$LIBRARY_PATH:${INSTALL_PATH}/lib
    - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${INSTALL_PATH}/lib
    - export OMP_NUM_THREADS=${CPU_SIM} - export OMP_NUM_THREADS=${CPU_SIM}
    build-debug-tests: build_debug:
    stage: build.debug stage: build_debug
    script: script:
    - cd ${DEBUG_DIR} - 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} - make -j ${CPU_BUILD}
    # - rm -rf _deps
    # - find . -name "*.a" -exec rm {} +
    # - find . -name "*.o" -exec rm {} +
    # artifacts:
    # paths:
    # - "${DEBUG_DIR}"
    run-tests-1: run_unit_tests:
    variables: stage: run_unit_tests
    GIT_CLEAN_FLAGS: -ffdx -e ${DEBUG_DIR} -e CORE -e MODELS
    stage: run.unit.tests
    dependencies: [build-debug-tests]
    script: script:
    - cd ${DEBUG_DIR} - cd ${DEBUG_DIR}
    - make test - make test
    - cd ..; gcovr -e '.*tests.*|.*lib.*|.*utils.*|build' -r . - cd ..; gcovr -e '.*tests.*|.*lib.*|.*utils.*|build' -r .
    coverage: /^TOTAL.*\s+(\d+\%)$/ coverage: /^TOTAL.*\s+(\d+\%)$/
    build-release-shared: build_release_shared:
    stage: build_release stage: build_release
    needs: [run-tests-1]
    script: script:
    - cd ${RELEASE_DIR} - cd ${RELEASE_SHARED_DIR}
    - cmake .. -DCMAKE_BUILD_TYPE=Release -DTADAH_ENABLE_OPENMP=ON -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH} - cmake ../.. -DCMAKE_BUILD_TYPE=Release -DTADAH_ENABLE_OPENMP=ON -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH}
    - make -j ${CPU_BUILD} - make -j ${CPU_BUILD}
    build-release-static: build_release_static:
    stage: build_release stage: build_release
    needs: [build-release-shared]
    script: script:
    - cd ${RELEASE_DIR} - cd ${RELEASE_STATIC_DIR}
    - cmake .. -DCMAKE_BUILD_TYPE=Release -DTADAH_ENABLE_OPENMP=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH} - cmake ../.. -DCMAKE_BUILD_TYPE=Release -DTADAH_ENABLE_OPENMP=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH}
    - make -j ${CPU_BUILD} - make -j ${CPU_BUILD}
    trigger_job: trigger_job:
    stage: trigger stage: trigger
    needs: [run-tests-1, build-release-shared, build-release-static]
    trigger: trigger:
    project: tadah/tadah.mlip project: tadah/tadah.mlip
    # GitLab bug: \ No newline at end of file
    # 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"
    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