1- default :
2- tags : [ public-docker ]
1+ variables :
2+ SCHEDULER_PARAMETERS : ' -Aslai -N1'
3+
4+ stages :
5+ - build
6+ - test
7+ - coverage
8+
9+ build_cpu :
10+ stage : build
11+ tags : [ docker-proton ]
312 image :
4- name : gitlab.version.fz-juelich.de:5555/sharedrunner/ opensuse
13+ name : opensuse:jsc-gcc12
514
6- build :
7- stage : build
815 script :
9- - cmake --version
10- - mkdir -p build
11- - cd build
12- - FC=gfortran CC=gcc CXX=g++ cmake -DENABLE_TESTS=ON -DMPI_RUN_ARGS="--allow-run-as-root" ..
13- - make VERBOSE=1
16+ - cmake --version
17+ - mkdir -p build_cpu
18+ - cd build_cpu
19+ - export CFLAGS='-Wextra -Wall -pedantic'
20+ - export CXXFLAGS='-Wextra -Wall -pedantic'
21+ - export FFLAGS='-Wextra -Wall -pedantic'
22+ - env CFLAGS="$CFLAGS --coverage" CXXFLAGS="$CXXFLAGS --coverage" FFLAGS="$FFLAGS --coverage" FC=gfortran CC=gcc CXX=g++ cmake -DENABLE_TESTS=ON -DMPI_RUN_ARGS="--allow-run-as-root" .. -DCMAKE_EXE_LINKER_FLAGS="--coverage"
23+ - make VERBOSE=1
1424 artifacts :
1525 paths :
16- - build/Makefile
17- - build/chase_driver
18- - build/CTestTestfile.cmake
19- - build/tests
20- test :
26+ - build_cpu/Makefile
27+ - build_cpu/CTestTestfile.cmake
28+ - build_cpu/tests
29+ expire_in : 1 week
30+
31+ test_cpu :
2132 stage : test
33+ dependencies :
34+ - build_cpu
35+ tags : [ docker-proton ]
36+ image :
37+ name : opensuse:jsc-gcc12
38+ script :
39+ - cd build_cpu
40+ - CTEST_OUTPUT_ON_FAILURE=1 make test
41+ - rm -rf _deps
42+ artifacts :
43+ paths :
44+ - build_cpu/*
45+ expire_in : 1 week
46+
47+ build_gpu :
48+ stage : build
49+ tags :
50+ - juwels_booster
51+ - jacamar
52+ - login
53+ - shell
54+ id_tokens :
55+ SITE_ID_TOKEN :
56+ aud : https://gitlab.jsc.fz-juelich.de
57+ script :
58+ - echo $SYSTEMNAME
59+ - module load Stages/2024 GCC/12.3.0 OpenMPI imkl CMake CUDA
60+ - cmake --version
61+ - mkdir -p build_gpu
62+ - cd build_gpu
63+ - export CFLAGS='-Wextra -Wall -pedantic'
64+ - export CXXFLAGS='-Wextra -Wall -pedantic'
65+ - export FFLAGS='-Wextra -Wall -pedantic'
66+ - env CFLAGS="$CFLAGS --coverage" CXXFLAGS="$CXXFLAGS --coverage" FFLAGS="$FFLAGS --coverage" cmake -DENABLE_TESTS=ON -DMPI_RUN="srun" .. -DCMAKE_EXE_LINKER_FLAGS="--coverage"
67+ - make VERBOSE=1
68+ artifacts :
69+ paths :
70+ - build_gpu/Makefile
71+ - build_gpu/CTestTestfile.cmake
72+ - build_gpu/tests
73+
74+ test_gpu :
75+ stage : test
76+ dependencies :
77+ - build_gpu
78+ tags :
79+ - juwels_booster
80+ - jacamar
81+ - compute
82+ - slurm
83+ id_tokens :
84+ SITE_ID_TOKEN :
85+ aud : https://gitlab.jsc.fz-juelich.de
86+ script :
87+ - echo $SYSTEMNAME
88+ - module load Stages/2024 GCC/12.3.0 OpenMPI imkl CMake CUDA
89+ - export CUDA_VISIBLE_DEVICES=0,1,2,3
90+ - cd build_gpu
91+ - CTEST_OUTPUT_ON_FAILURE=1 make test
92+ - rm -rf _deps
93+ artifacts :
94+ paths :
95+ - build_gpu/*
96+
97+ coverage :
98+ stage : coverage
99+ coverage : ' /lines......: (\d+[.]\d+)/'
100+ dependencies :
101+ - test_cpu
102+ - test_gpu
103+ tags : [ docker-proton ]
104+ image :
105+ name : opensuse:jsc-gcc12
22106 script :
23- - cd build
24- - CTEST_OUTPUT_ON_FAILURE=1 make test
107+ # Merge the two coverage files
108+ - lcov --capture --directory ./build_cpu --output-file coverage_cpu.info
109+ - lcov --capture --directory ./build_gpu --output-file coverage_gpu.info
110+ - lcov --add-tracefile coverage_cpu.info --add-tracefile coverage_gpu.info --output-file coverage.info
111+ - lcov --summary coverage.info
0 commit comments