Run CTest in GitLab CI

Change image to Ubuntu as at least CMake 5.19 is needed
This commit is contained in:
2023-03-09 11:36:21 +01:00
parent aa0b8e9160
commit 7ab71876d9

View File

@@ -1,9 +1,9 @@
# vim: set ts=4 sw=4 expandtab:
image: gcc
image: ubuntu
before_script:
- apt-get update --yes
- apt-get install --yes cmake python3 python3-dev qtbase5-dev libqwt-qt5-dev sqlite3 lcov
- apt-get install --yes build-essential git cmake python3 python3-dev qtbase5-dev libqwt-qt5-dev sqlite3 lcov
stages:
- build
@@ -13,42 +13,34 @@ stages:
build:
stage: build
script:
- git submodule sync
- git submodule update --init --recursive
- ls
- mkdir -p coverage
- mkdir -p build
- cd build
- cmake -DDRAMSYS_COVERAGE_CHECK=ON -DDRAMSYS_ENABLE_EXTENSIONS=ON -DDRAMSYS_EXTENSION_TRACE_ANALYZER_ENABLE=ON -DDRAMSYS_WITH_DRAMPOWER=ON ..
- make -j 10
- cmake --preset ci-coverage
- cmake --build build/coverage -j$(nproc)
after_script:
- find . -name "*.o" -type f -delete
artifacts:
paths:
- build/
- tests/
- coverage/
- build/coverage
expire_in: 2 days
test:
stage: test
needs:
- build
script:
- cd build/coverage
- ctest --output-on-failure -j$(nproc)
artifacts:
paths:
- build/coverage
expire_in: 2 days
coverage:
stage: coverage
needs:
- test_DDR3
- test_DDR4
- test_HBM2
- test_LPDDR4
coverage: '/Total:\|(\d+\.?\d+\%)/'
- test
script:
# delete all empty files since they produce errors
- find coverage -size 0 -type f -delete
- ls coverage/ -lah
- lcov `find coverage -type f -exec echo "-a {}" \;` -o coverage/final.out
- lcov --remove coverage/final.out '/build/_deps/*' '/lib/*' '/usr/*' -o coverage/final_dramsys.out
- lcov --list coverage/final_dramsys.out
include:
- 'tests/tests_regression/DDR3/ci.yml'
- 'tests/tests_regression/DDR4/ci.yml'
- 'tests/tests_regression/HBM2/ci.yml'
- 'tests/tests_regression/LPDDR4/ci.yml'
#- '/DRAMSys/tests/dramsys-gem5/ci.yml' # Should be activated again when a new gitlab runner with right dependencies is used
- cmake --build build/coverage --target coverage
artifacts:
paths:
- build/coverage/coverage_html
expire_in: 2 days