Skip to content
Snippets Groups Projects
Unverified Commit f07c7dba authored by Tomáš Pecka's avatar Tomáš Pecka
Browse files

ci: merge test phase with build phase

This should speed up CI a bit.

CI stages are separated with a barrier, i.e. all the jobs from the
previous stage must finish before first job of a next phase starts.

In our current build phase we have the following jobs:
 * build (gcc)
 * build (clang-sanitizers)
 * clang-tidy

The build jobs are kind-of fast (ca. 5 and 10 mins, but not in parallel,
i.e. 15 mins in total) and the clang-tidy job is slow (ca. 27 mins).
After the clang-tidy jobs finishes we move on to the test phase where
the CI has to download dependencies (i.e. the build directory) in order
to run tests (ca. 3 + 5 mins, i.e. 8 minutes). I think we can squeeze
this 8 minute-test-jobs into the build phase where we have to wait
anyway.

Also, we don't have to upload and download the build directory which is
a big plus (and can save some time too).
parent 0521595c
No related branches found
No related tags found
1 merge request!241Merge tp
......@@ -2,7 +2,6 @@ image: gitlab.fit.cvut.cz:5000/algorithms-library-toolkit/infrastructure/ci-dock
 
stages:
- build
- test
- packaging
- notify
 
......@@ -42,22 +41,13 @@ stages:
- mkdir -p build && cd build
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -GNinja ..
- ninja
- ctest . --output-on-failure -j $(nproc)
- DESTDIR="." ninja install
artifacts:
paths:
- build/
expire_in: 1 day
 
.template:test:
<<: *only-default
dependencies: []
stage: test
tags:
- altbuilder
script:
- cd build
- ctest . --output-on-failure -j $(grep -c processor /proc/cpuinfo)
.config:builder: &distro_builder
image: gitlab.fit.cvut.cz:5000/algorithms-library-toolkit/infrastructure/ci-docker-images/alt-builder:latest
 
......@@ -65,10 +55,6 @@ stages:
<<: *distro_builder
extends: .template:build
 
.test:builder:
<<: *distro_builder
extends: .template:test
build:builder:gcc:
extends: .build:builder
 
......@@ -78,16 +64,6 @@ build:builder:clang-sanitizers:
CXX: clang++
CXXFLAGS: "-fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all" # -stdlib=libc++
 
test:builder:gcc:
extends: .test:builder
dependencies:
- build:builder:gcc
test:builder:clang-sanitizers:
extends: .test:builder
dependencies:
- build:builder:clang-sanitizers
#######################################################################################################################
# doc
 
......
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