diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c9a753ff7c196eaf5be99da2cc7481ad18a277ec..9f97c3859ea521f378f2ef39c9ce3e8728411cb2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,15 +1,30 @@ stages: +- docker - BuildTestinstall - DocCoverage - deploy + +build_minimal_image: + stage: docker + image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs2/phoenixcmake/phoenix_kaniko_bash:0.1 + script: + - ${CI_PROJECT_DIR}/scripts/phoenix_scriptCreateImage.sh docker/ubuntu2204_test_ci/Dockerfile "phoenix_shredder_ubuntu_2204_test_ci:0.1" + rules: + #- when: always + - when: never + #- if: '"1" != "1"' + #- if: $CI_COMMIT_TAG + tags: + - MUST_big_runner + dailyBuildMasterAll: #cache: #untracked: true #paths: #- build/ - image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs/phoenixcmake/phoenix_cmake_ubuntu_2204:latest + image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs2/phoenixshredder/phoenix_shredder_ubuntu_2204_test_ci:0.1 stage: BuildTestinstall script: - export LD_LIBRARY_PATH=/usr/lib @@ -20,10 +35,11 @@ dailyBuildMasterAll: cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DSELF_TESTS_MODE=yes - -DCMAKE_MODULE_PATH=/usr/share/cmake + -DCMAKE_MODULE_PATH=/usr/share/cmake/Modules - make all - make install - - make test || cat ./Testing/Temporary/LastTest.log + #- make test || cat ./Testing/Temporary/LastTest.log + - ctest --output-on-failure only: - branches @@ -32,7 +48,7 @@ dailyBuildMasterAll: - MUST_big_runner #dailyBuildDynamicAndStatic: - #image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs/phoenixcmake/phoenix_cmake_ubuntu_2204:latest + #image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs2/phoenixshredder/phoenix_shredder_ubuntu_2204_test_ci:0.1 #stage: BuildTestinstall #script: #- export LD_LIBRARY_PATH=/usr/lib @@ -55,7 +71,7 @@ dailyBuildMasterAll: #- MUST_big_runner #dailyBuildStaticOnly: - #image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs/phoenixcmake/phoenix_cmake_ubuntu_2204:latest + #image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs2/phoenixshredder/phoenix_shredder_ubuntu_2204_test_ci:0.1 #stage: BuildTestinstall #script: #- export LD_LIBRARY_PATH=/usr/lib @@ -78,7 +94,7 @@ dailyBuildMasterAll: #- MUST_big_runner TestCoverage: - image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs/phoenixcmake/phoenix_cmake_ubuntu_2204:latest + image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs2/phoenixshredder/phoenix_shredder_ubuntu_2204_test_ci:0.1 stage: DocCoverage script: - export LD_LIBRARY_PATH=/usr/lib @@ -90,11 +106,12 @@ TestCoverage: -DCMAKE_INSTALL_PREFIX=/usr -DSELF_TESTS_MODE=yes -DCMAKE_BUILD_TYPE=Coverage - -DCMAKE_MODULE_PATH=/usr/share/cmake + -DCMAKE_MODULE_PATH=/usr/share/cmake/Modules - make all - make install - - make test - - ./uninstall_phoenixtex2html + #- make test + - ctest --output-on-failure + - ./uninstall_phoenixshredder - cd ../coverage - gcovr -r ../ --exclude-throw-branches --html cov_report.html --html-details - gcovr -r ../ --exclude-throw-branches --xml Coverage.xml @@ -111,7 +128,7 @@ TestCoverage: - MUST_big_runner Doc: - image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs/phoenixcmake/phoenix_cmake_ubuntu_2204:latest + image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs2/phoenixshredder/phoenix_shredder_ubuntu_2204_test_ci:0.1 stage: DocCoverage script: - export LD_LIBRARY_PATH=/usr/lib @@ -124,7 +141,7 @@ Doc: cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DDOC_MODE=yes - -DCMAKE_MODULE_PATH=/usr/share/cmake + -DCMAKE_MODULE_PATH=/usr/share/cmake/Modules - make all - make install - make doc @@ -142,7 +159,7 @@ Doc: pages: stage: deploy - image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs/phoenixcmake/phoenix_cmake_ubuntu_2204:latest + image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs2/phoenixshredder/phoenix_shredder_ubuntu_2204_test_ci:0.1 script: - mv coverage public/ artifacts: @@ -151,9 +168,29 @@ pages: expire_in: 8d tags: - MUST_big_runner + + +build_latest_image: + stage: deploy + image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs2/phoenixcmake/phoenix_kaniko_bash:0.1 + script: + - ${CI_PROJECT_DIR}/scripts/phoenix_scriptCreateImage.sh docker/Master/Dockerfile "phoenix_shredder_ubuntu_2204:latest" + only: + - master + tags: + - MUST_big_runner + +build_latest_image_tag: + stage: deploy + image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs2/phoenixcmake/phoenix_kaniko_bash:0.1 + script: + - ${CI_PROJECT_DIR}/scripts/phoenix_scriptCreateImage.sh docker/Master/Dockerfile "phoenix_shredder_ubuntu_2204:${CI_COMMIT_TAG}" + only: + - tags + tags: + - MUST_big_runner - Ubuntu 2004: image: gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs/phoenixdocker/package_ubuntu2004_gcc9:0.1 stage: DocCoverage diff --git a/docker/Master/Dockerfile b/docker/Master/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..cd5c288bfd66f849ef732a1fa77fd4b9044f99f4 --- /dev/null +++ b/docker/Master/Dockerfile @@ -0,0 +1,10 @@ +# Version 0.1 +FROM gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs2/phoenixshredder/phoenix_shredder_ubuntu_2204_test_ci:0.1 + +ENV GIT_SSL_NO_VERIFY=1 +RUN git clone --depth 2 https://gitlab.in2p3.fr/CTA-LAPP/PHOENIX_LIBS2/PhoenixShredder.git && \ + cd PhoenixShredder && \ + ./install.sh /usr && \ + cd .. && \ + rm -fr PhoenixShredder + diff --git a/docker/ubuntu2204/Dockerfile b/docker/ubuntu2204/Dockerfile deleted file mode 100644 index 260f7731ba4cf1c6e337ac8d59cbe13cfda29bdc..0000000000000000000000000000000000000000 --- a/docker/ubuntu2204/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -# Version 0.1 -FROM ubuntu:22.04 - -# Ensure use of bash -SHELL ["/bin/bash","-c"] - -# Time Zone -ENV TZ=Europe/Paris -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -RUN touch /etc/apt/apt.conf.d/99verify-peer.conf \ -&& echo >>/etc/apt/apt.conf.d/99verify-peer.conf "Acquire { https::Verify-Peer false }" - -# Apt -RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections -ARG DEBIAN_FRONTEND=noninteractive - -RUN apt-get -y update -RUN apt-get install -y apt-utils xz-utils - -RUN apt-get install -y wget -RUN apt-get install -y gcc g++ cmake make git time -# Gcov goes with gcc -RUN apt-get install -y doxygen graphviz -RUN apt-get install -y gcovr - -RUN cd /usr/bin && wget http://maqao.org/release/maqao.intel64.2.16.0.tar.xz && \ - tar -xvf maqao.intel64.2.16.0.tar.xz && cp maqao.intel64.2.16.0/maqao.intel64 maqao && \ - rm -rf maqao.intel64.2.16.0.tar.xz maqao.intel64.2.16.0/ -RUN apt-get install -y gnuplot-nox - -RUN apt-get -y install gdb valgrind - -COPY "PhoenixShredder-${CI_COMMIT_TAG}-Linux.deb" / -RUN dpkg -i "./PhoenixShredder-${CI_COMMIT_TAG}-Linux.deb" && rm "./PhoenixShredder-${CI_COMMIT_TAG}-Linux.deb" - -RUN apt-get -y clean autoremove - diff --git a/docker/ubuntu2204_test_ci/Dockerfile b/docker/ubuntu2204_test_ci/Dockerfile index 965bcf6a5c9ae740a6964c4ea9150564af1f04aa..1bc986fd2976984ea6aefcc6447a5ede5304c398 100644 --- a/docker/ubuntu2204_test_ci/Dockerfile +++ b/docker/ubuntu2204_test_ci/Dockerfile @@ -1,35 +1,8 @@ # Version 0.1 -FROM ubuntu:22.04 +FROM gitlab-registry.in2p3.fr/cta-lapp/phoenix_libs2/phoenixcmake/phoenix_cmake_ubuntu_2204:latest -# Ensure use of bash -SHELL ["/bin/bash","-c"] - -# Time Zone -ENV TZ=Europe/Paris -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -RUN touch /etc/apt/apt.conf.d/99verify-peer.conf \ -&& echo >>/etc/apt/apt.conf.d/99verify-peer.conf "Acquire { https::Verify-Peer false }" - -# Apt -RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections -ARG DEBIAN_FRONTEND=noninteractive - -RUN apt-get -y update -RUN apt-get install -y apt-utils xz-utils - -RUN apt-get install -y wget -RUN apt-get install -y gcc g++ cmake make git time -# Gcov goes with gcc -RUN apt-get install -y doxygen graphviz -RUN apt-get install -y gcovr - -RUN cd /usr/bin && wget http://maqao.org/release/maqao.intel64.2.16.0.tar.xz && \ - tar -xvf maqao.intel64.2.16.0.tar.xz && cp maqao.intel64.2.16.0/maqao.intel64 maqao && \ - rm -rf maqao.intel64.2.16.0.tar.xz maqao.intel64.2.16.0/ -RUN apt-get install -y gnuplot-nox - -RUN apt-get -y install gdb valgrind - -RUN apt-get -y clean autoremove +RUN cd /usr/bin && wget https://maqao.org/maqao_archive/maqao.x86_64.2.20.1.tar.xz && \ + tar -xvf maqao.x86_64.2.20.1.tar.xz && cp maqao.x86_64.2.20.1/bin/maqao maqao && \ + rm -rf maqao.x86_64.2.20.1.tar.xz maqao.x86_64.2.20.1/ +RUN apt-get install -y gnuplot-nox gdb valgrind time && apt-get -y clean autoremove diff --git a/scripts/scriptCreateImage.sh b/scripts/phoenix_scriptCreateImage.sh similarity index 100% rename from scripts/scriptCreateImage.sh rename to scripts/phoenix_scriptCreateImage.sh diff --git a/src/shredder_config_parser.cpp b/src/shredder_config_parser.cpp index 5a598247296a10310b9013e14b79a27318abdb6f..90e8998f64794e888cadcc93ca9fe17b49f53df2 100644 --- a/src/shredder_config_parser.cpp +++ b/src/shredder_config_parser.cpp @@ -80,7 +80,7 @@ bool shredder_checkConfig(PString & scriptFile, const DicoValue & dico, const PS bool shredder_parseToolConfig(ShredderConfig & stage, const DicoValue & dico){ PString defaultCoverage(phoenix_load_value_from_config<PString>(dico, "gcovr_executable", "gcovr")); - PString defaultTimeCall(phoenix_load_value_from_config<PString>(dico, "time_executable", "/bin/time")); + PString defaultTimeCall(phoenix_load_value_from_config<PString>(dico, "time_executable", "/usr/bin/time")); PString defaultMemcheckCall(phoenix_load_value_from_config<PString>(dico, "memcheck_executable", "valgrind")); PString defaultCallgrindCall(phoenix_load_value_from_config<PString>(dico, "callgrind_executable", "valgrind --tool=callgrind")); PString defaultVerrouCall(phoenix_load_value_from_config<PString>(dico, "verrou_executable", "valgrind --tool=verrou"));