Mentions légales du service

Skip to content
Snippets Groups Projects
Commit faf30b99 authored by PRUVOST Florent's avatar PRUVOST Florent
Browse files

Update docker environment for ci jobs

parent 6597be39
No related branches found
No related tags found
No related merge requests found
stages:
- docker
- build
- test
- deploy
default: default:
tags: ['docker'] image: $CI_REGISTRY_IMAGE
image: registry.gitlab.inria.fr/solverstack/docker/distrib tags: ['ci.inria.fr', 'linux', 'large'] # gitlab instance runner (i.e. docker on linux)
before_script: interruptible: true
- wget https://github.com/Kitware/CMake/releases/download/v3.22.0/cmake-3.22.0-linux-x86_64.tar.gz
- tar xvf cmake-3.22.0-linux-x86_64.tar.gz
- export PATH="$PWD/cmake-3.22.0-linux-x86_64/bin/:$PATH"
variables: variables:
GIT_SUBMODULE_STRATEGY: recursive GIT_SUBMODULE_STRATEGY: recursive
stages: # push event: executed only if the source branch name is main or starts with ci-
- build_main # merge request event: executed if the source branch name does not start with notest-
- test_main # schedule event: not executed
.only-main-mr:
rules:
- if: ($CI_COMMIT_BRANCH =~ /^ci-.*$/)
- if: ($CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH) &&
(($CI_PROJECT_ROOT_NAMESPACE == "solverstack" ) ||
($CI_PROJECT_ROOT_NAMESPACE == $CI_PROJECT_NAME))
- if: (($CI_PIPELINE_SOURCE == "merge_request_event") &&
($CI_MERGE_REQUEST_SOURCE_BRANCH_NAME !~ /^notest-.*$/))
- if: ($CI_PIPELINE_SOURCE == "schedule" )
when: never
build_main: docker:
stage: build_main stage: docker
interruptible: true image: docker
artifacts: when: manual
name: scalfmm_build_main before_script:
expire_in: 1 day - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
paths:
- build_main/
script: script:
- mkdir build_main && cd build_main && cmake .. - docker build -f Dockerfile-ci -t $CI_REGISTRY_IMAGE $PWD
- docker push $CI_REGISTRY_IMAGE
build:
stage: build
extends: .only-main-mr
timeout: 2 hours
script:
- cmake -B build -DCMAKE_INSTALL_PREFIX=$PWD/install
-Dscalfmm_USE_MKL=ON
-Dscalfmm_USE_MPI=OFF -Dscalfmm_USE_MPI=OFF
-Dscalfmm_BUILD_EXAMPLES=ON -Dscalfmm_BUILD_EXAMPLES=ON
-Dscalfmm_BUILD_UNITS=ON -Dscalfmm_BUILD_UNITS=ON
-Dscalfmm_BUILD_TOOLS=ON -Dscalfmm_BUILD_TOOLS=ON
-Dscalfmm_BUILD_CHECK=ON -Dscalfmm_BUILD_CHECK=ON
-DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_VERBOSE_MAKEFILE=ON
-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_FLAGS="-O0 -g -Wall -fPIC -fno-inline --coverage"
-DCMAKE_CXX_COMPILER=g++ - cmake --build build -j 4 > /dev/null
- make -j5 2>&1 |tee scalfmm-main-build.log - cmake --build build -j 4 --target examples > /dev/null
- make examples 2>&1 |tee scalfmm-main-examples-build.log - cmake --build build -j 4 --target units > /dev/null
- make units 2>&1 |tee scalfmm-main-units-build.log - cmake --install build
only: artifacts:
- main name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
expire_in: 1 week
untracked: true
test_main: test:
stage: test_main stage: test
interruptible: true extends: .only-main-mr
dependencies: dependencies:
- build_main - build
variables:
OMP_NUM_THREADS: 4
script:
- ctest --test-dir build --output-on-failure --no-compress-output --output-junit $PWD/test.xml
- gcovr --xml-pretty --exclude-unreachable-branches --print-summary -o coverage.xml --root $PWD
coverage: /^\s*lines......:\s*\d+.\d+\%/
artifacts: artifacts:
name: scalfmm_main_test reports:
expire_in: 1 day junit: test.xml
paths: coverage_report:
- build_main/ coverage_format: cobertura
path: coverage.xml
pages:
stage: deploy
when: manual
needs: []
script: script:
- (cd build_main && OMP_NUM_THREADS=8 ctest --no-compress-output -VV -j 8 - cmake -B build
-I 16,19,1 --repeat until-fail:10 --output-on-failure --stop-on-failure) -Dscalfmm_USE_MKL=ON
only: -Dscalfmm_BUILD_DOC=ON
- main -DCMAKE_VERBOSE_MAKEFILE=ON
- cmake --build build -j 4 > /dev/null
- cmake --build build -j 4 --target doc > /dev/null
- cp -r build/docs/sphinx/ public
artifacts:
paths:
- public
#
# @file Dockerfile-ci
#
# @copyright 2025-2025 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
# Univ. Bordeaux. All rights reserved.
#
# @version 3.0.0
# @author Florent Pruvost
# @date 2025-01-21
#
# This docker image is used to test the package during gitlab-ci pipelines.
# It should be stored in the gitlab's project container registry:
# https://gitlab.inria.fr/solverstack/ScalFMM/container_registry
#
# solverstack/docker/base docker image is defined here: https://gitlab.inria.fr/solverstack/docker
FROM registry.gitlab.inria.fr/solverstack/docker/base
USER root
RUN apt-get -y update
# ScalFMM dependencies: cpu kernels, mpi, ...
RUN apt-get -y upgrade --no-install-recommends \
libmkl-dev \
sphinx-common \
python3-breathe \
python3-exhale \
python3-recommonmark \
python3-sphinx-rtd-theme
#libopenmpi-dev \
#libstarpu-dev \
#pybind11-dev
# Set some default environment variables
ENV MKLROOT /usr
USER gitlab
...@@ -16,7 +16,7 @@ if(${CMAKE_PROJECT_NAME}_USE_MKL) ...@@ -16,7 +16,7 @@ if(${CMAKE_PROJECT_NAME}_USE_MKL)
set(CBLAS_FOUND TRUE) set(CBLAS_FOUND TRUE)
set_target_properties(MKL::MKL PROPERTIES set_target_properties(MKL::MKL PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES INTERFACE_INCLUDE_DIRECTORIES
"${MKL_ROOT}/include;${MKL_ROOT}/include/fftw" "${MKL_ROOT}/include;${MKL_ROOT}/include/fftw;${MKL_ROOT}/include/mkl/fftw"
) )
list(APPEND CBLAS_TARGET MKL::MKL) list(APPEND CBLAS_TARGET MKL::MKL)
else() else()
...@@ -25,7 +25,7 @@ if(${CMAKE_PROJECT_NAME}_USE_MKL) ...@@ -25,7 +25,7 @@ if(${CMAKE_PROJECT_NAME}_USE_MKL)
if(DEFINED BLAS_FOUND) if(DEFINED BLAS_FOUND)
set_target_properties(BLAS::BLAS PROPERTIES set_target_properties(BLAS::BLAS PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES INTERFACE_INCLUDE_DIRECTORIES
"${MKL_ROOT}/include;${MKL_ROOT}/include/fftw" "${MKL_ROOT}/include;${MKL_ROOT}/include/fftw;${MKL_ROOT}/include/mkl/fftw"
) )
list(APPEND CBLAS_TARGET BLAS::BLAS) list(APPEND CBLAS_TARGET BLAS::BLAS)
list(APPEND FUSE_LIST CBLAS) list(APPEND FUSE_LIST CBLAS)
......
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