Merge branch 'gitlab_docker' into 'work/fix_warnings'

Gitlab docker

See merge request ems/astdm/dram.sys!316
This commit is contained in:
Lukas Steiner
2021-09-20 09:18:13 +00:00
26 changed files with 51 additions and 64 deletions

View File

@@ -1,12 +1,16 @@
# vim: set ts=4 sw=4 expandtab:
image: gcc
variables:
GIT_STRATEGY: fetch
before_script:
- apt-get update --yes
- apt-get install --yes cmake python3 python3-dev qtbase5-dev libqwt-qt5-dev sqlite3 lcov
stages:
- build
- tests
- test_DDR3
- test_DDR4
- test_HBM2
- test_LPDDR4
- coverage
build:
@@ -14,24 +18,18 @@ build:
script:
- git submodule sync
- git submodule update --init --recursive
- rm -rf build
- ls
- mkdir -p coverage
- mkdir -p build
- cd build
- cmake -DDRAMSYS_COVERAGE_CHECK=ON ../DRAMSys
- make -j 16
- make -j 10
- find . -name "*.o" -type f -delete
- rm -rf ${CI_PROJECT_DIR}/coverage
- mkdir -p ${CI_PROJECT_DIR}/coverage
cache:
key: build
paths:
- build/
policy: push
artifacts:
paths:
- build/
- DRAMSys/tests/
- coverage/
coverage:
@@ -44,15 +42,10 @@ coverage:
- lcov `find coverage -type f -exec echo "-a {}" \;` -o coverage/final.out
- lcov --remove coverage/final.out '*/systemc*/include/*' '*/traceAnalyzer/*' '*/gcc*/include/*' '/usr/include/*' '*/third_party/*' -o coverage/final_dramsys.out
- lcov --list coverage/final_dramsys.out
artifacts:
paths:
- coverage/final.out
- coverage/final_dramsys.out
include:
- '/DRAMSys/tests/lpddr4/ci.yml'
- '/DRAMSys/tests/ddr3_multirank/ci.yml'
- '/DRAMSys/tests/DDR3/ci.yml'
- '/DRAMSys/tests/DDR4/ci.yml'
- '/DRAMSys/tests/HBM2/ci.yml'
- '/DRAMSys/tests/LPDDR4/ci.yml'
#- '/DRAMSys/tests/dramsys-gem5/ci.yml' # Should be activated again when a new gitlab runner with right dependencies is used

28
DRAMSys/tests/DDR3/ci.yml Normal file
View File

@@ -0,0 +1,28 @@
# DDR3 Dual Rank Test with Staggered Power Down Policy and Scheduler FrFcfsGrp
example_DDR3:
stage: test_DDR3
script:
- export GCOV_PREFIX=$(pwd)
- export GCOV_PREFIX_STRIP=$(pwd | awk -F"/" '{print NF-1}')
- cd build/simulator
- ./DRAMSys ../../DRAMSys/tests/DDR3/simulations/ddr3-example.json ../../DRAMSys/tests/DDR3/
- ls -lah
- ls -lah ../../DRAMSys/tests/DDR3/expected/
- sqldiff ../../DRAMSys/tests/DDR3/expected/ddr3-dual-rank_ddr3_ch0.tdb ddr3-dual-rank_ddr3_ch0.tdb
- perl -e 'if(`sqldiff --table Phases ../../DRAMSys/tests/DDR3/expected/ddr3-dual-rank_ddr3_ch0.tdb ddr3-dual-rank_ddr3_ch0.tdb` eq "") {exit(0)} else {exit(-1)}'
- perl -e 'if(`sqldiff --table Transactions ../../DRAMSys/tests/DDR3/expected/ddr3-dual-rank_ddr3_ch0.tdb ddr3-dual-rank_ddr3_ch0.tdb` eq "") {exit(0)} else {exit(-1)}'
- perl -e 'if(`sqldiff --table Power ../../DRAMSys/tests/DDR3/expected/ddr3-dual-rank_ddr3_ch0.tdb ddr3-dual-rank_ddr3_ch0.tdb` eq "") {exit(0)} else {exit(-1)}'
# Run Code Coverage
- lcov -q -c --rc geninfo_adjust_src_path=$GCOV_PREFIX -d ${CI_PROJECT_DIR}/build/ -o ${CI_PROJECT_DIR}/coverage/${CI_JOB_NAME}.out
cache:
key: build
paths:
- build/
policy: pull
artifacts:
paths:
- build/simulator/ddr3-dual-rank_ddr3_ch0.tdb
- coverage/${CI_JOB_NAME}.out
expire_in: 2 days

View File

@@ -1,6 +1,6 @@
# DDR4 with 4 bank groups, flexible rankwise refresh and FrFcfs scheduler:
example_DDR4:
stage: tests
stage: test_DDR4
script:
- export GCOV_PREFIX=$(pwd)
- export GCOV_PREFIX_STRIP=$(pwd | awk -F"/" '{print NF-1}')
@@ -12,8 +12,6 @@ example_DDR4:
- perl -e 'if(`sqldiff --table Phases ../../DRAMSys/tests/DDR4/expected/ddr4-bankgrp_ddr4_ch0.tdb ddr4-bankgrp_ddr4_ch0.tdb` eq "") {exit(0)} else {exit(-1)}'
- perl -e 'if(`sqldiff --table Transactions ../../DRAMSys/tests/DDR4/expected/ddr4-bankgrp_ddr4_ch0.tdb ddr4-bankgrp_ddr4_ch0.tdb` eq "") {exit(0)} else {exit(-1)}'
- perl -e 'if(`sqldiff --table Power ../../DRAMSys/tests/DDR4/expected/ddr4-bankgrp_ddr4_ch0.tdb ddr4-bankgrp_ddr4_ch0.tdb` eq "") {exit(0)} else {exit(-1)}'
#- cd ../traceAnalyzer
#- python3 ../../DRAMSys/traceAnalyzer/scripts/tests.py ../simulator/ddr4-bankgrp_ddr4_ch0.tdb | if ! grep "failed"; then exit 0; else exit 1; fi
# Run Code Coverage
- lcov -q -c --rc geninfo_adjust_src_path=$GCOV_PREFIX -d ${CI_PROJECT_DIR}/build/ -o ${CI_PROJECT_DIR}/coverage/${CI_JOB_NAME}.out

View File

@@ -1,5 +1,5 @@
example_HBM2:
stage: tests
stage: test_HBM2
script:
- export GCOV_PREFIX=$(pwd)
- export GCOV_PREFIX_STRIP=$(pwd | awk -F"/" '{print NF-1}')

View File

@@ -1,19 +1,17 @@
# LPDDR4 with Bankwise Flexible Refresh and FIFO Scheduler:
example_LPDDR4:
stage: tests
stage: test_LPDDR4
script:
- export GCOV_PREFIX=$(pwd)
- export GCOV_PREFIX_STRIP=$(pwd | awk -F"/" '{print NF-1}')
- cd build/simulator
- ./DRAMSys ../../DRAMSys/tests/lpddr4/simulations/lpddr4-example.json ../../DRAMSys/tests/lpddr4/
- ./DRAMSys ../../DRAMSys/tests/LPDDR4/simulations/lpddr4-example.json ../../DRAMSys/tests/LPDDR4/
- ls -lah
- ls -lah ../../DRAMSys/tests/lpddr4/expected/
- sqldiff ../../DRAMSys/tests/lpddr4/expected/lpddr4-example_lpddr4_ch0.tdb lpddr4-example_lpddr4_ch0.tdb
- perl -e 'if(`sqldiff --table Phases ../../DRAMSys/tests/lpddr4/expected/lpddr4-example_lpddr4_ch0.tdb lpddr4-example_lpddr4_ch0.tdb` eq "") {exit(0)} else {exit(-1)}'
- perl -e 'if(`sqldiff --table Transactions ../../DRAMSys/tests/lpddr4/expected/lpddr4-example_lpddr4_ch0.tdb lpddr4-example_lpddr4_ch0.tdb` eq "") {exit(0)} else {exit(-1)}'
- perl -e 'if(`sqldiff --table Power ../../DRAMSys/tests/lpddr4/expected/lpddr4-example_lpddr4_ch0.tdb lpddr4-example_lpddr4_ch0.tdb` eq "") {exit(0)} else {exit(-1)}'
#- cd ../traceAnalyzer
#- python3 ../../DRAMSys/traceAnalyzer/scripts/tests.py ../simulator/lpddr4-example_lpddr4_ch0.tdb | if ! grep "failed"; then exit 0; else exit 1; fi
- ls -lah ../../DRAMSys/tests/LPDDR4/expected/
- sqldiff ../../DRAMSys/tests/LPDDR4/expected/lpddr4-example_lpddr4_ch0.tdb lpddr4-example_lpddr4_ch0.tdb
- perl -e 'if(`sqldiff --table Phases ../../DRAMSys/tests/LPDDR4/expected/lpddr4-example_lpddr4_ch0.tdb lpddr4-example_lpddr4_ch0.tdb` eq "") {exit(0)} else {exit(-1)}'
- perl -e 'if(`sqldiff --table Transactions ../../DRAMSys/tests/LPDDR4/expected/lpddr4-example_lpddr4_ch0.tdb lpddr4-example_lpddr4_ch0.tdb` eq "") {exit(0)} else {exit(-1)}'
- perl -e 'if(`sqldiff --table Power ../../DRAMSys/tests/LPDDR4/expected/lpddr4-example_lpddr4_ch0.tdb lpddr4-example_lpddr4_ch0.tdb` eq "") {exit(0)} else {exit(-1)}'
# Run Code Coverage
- lcov -q -c --rc geninfo_adjust_src_path=$GCOV_PREFIX -d ${CI_PROJECT_DIR}/build/ -o ${CI_PROJECT_DIR}/coverage/${CI_JOB_NAME}.out

View File

@@ -1,30 +0,0 @@
# DDR3 Dual Rank Test with Staggered Power Down Policy and Scheduler FrFcfsGrp
example_DDR3:
stage: tests
script:
- export GCOV_PREFIX=$(pwd)
- export GCOV_PREFIX_STRIP=$(pwd | awk -F"/" '{print NF-1}')
- cd build/simulator
- ./DRAMSys ../../DRAMSys/tests/ddr3_multirank/simulations/ddr3-example.json ../../DRAMSys/tests/ddr3_multirank/
- ls -lah
- ls -lah ../../DRAMSys/tests/ddr3_multirank/expected/
- sqldiff ../../DRAMSys/tests/ddr3_multirank/expected/ddr3-dual-rank_ddr3_ch0.tdb ddr3-dual-rank_ddr3_ch0.tdb
- perl -e 'if(`sqldiff --table Phases ../../DRAMSys/tests/ddr3_multirank/expected/ddr3-dual-rank_ddr3_ch0.tdb ddr3-dual-rank_ddr3_ch0.tdb` eq "") {exit(0)} else {exit(-1)}'
- perl -e 'if(`sqldiff --table Transactions ../../DRAMSys/tests/ddr3_multirank/expected/ddr3-dual-rank_ddr3_ch0.tdb ddr3-dual-rank_ddr3_ch0.tdb` eq "") {exit(0)} else {exit(-1)}'
- perl -e 'if(`sqldiff --table Power ../../DRAMSys/tests/ddr3_multirank/expected/ddr3-dual-rank_ddr3_ch0.tdb ddr3-dual-rank_ddr3_ch0.tdb` eq "") {exit(0)} else {exit(-1)}'
#- cd ../traceAnalyzer
#- python3 ../../DRAMSys/traceAnalyzer/scripts/tests.py ../simulator/ddr3_multirank_ddr3_ch0.tdb | if ! grep "failed"; then exit 0; else exit 1; fi
# Run Code Coverage
- lcov -q -c --rc geninfo_adjust_src_path=$GCOV_PREFIX -d ${CI_PROJECT_DIR}/build/ -o ${CI_PROJECT_DIR}/coverage/${CI_JOB_NAME}.out
cache:
key: build
paths:
- build/
policy: pull
artifacts:
paths:
- build/simulator/ddr3-dual-rank_ddr3_ch0.tdb
- coverage/${CI_JOB_NAME}.out
expire_in: 2 days