-
Notifications
You must be signed in to change notification settings - Fork 5
/
.gitlab-ci.yml
104 lines (96 loc) · 3.14 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
stages:
- build
- test
- coverage
- deploy
linux-build:
stage: build
tags:
- linux
script:
- mkdir build/
- cd build
- cmake ..
- make -j 20
artifacts:
expire_in: 2 days
paths:
- build/
windows-build:
stage: build
tags:
- windows
script:
- premake5 vs2022
- '& "${Env:ProgramFiles}\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\msbuild.exe" gatery.sln'
artifacts:
expire_in: 2 days
paths:
- bin/
test-linux-frontend:
stage: test
needs: ["linux-build"]
tags:
- linux
script:
- build/tests/frontend/unittest_frontend -- --intel /opt/simModels/intel/ --xilinx /opt/simModels/xilinx/ --intelQuartus /opt/intelFPGA_pro/24.1/quartus/bin
test-linux-scl:
stage: test
needs: ["linux-build"]
tags:
- linux
script:
- build/tests/scl/unittest_scl -- --intel /opt/simModels/intel/ --xilinx /opt/simModels/xilinx/ --intelQuartus /opt/intelFPGA_pro/24.1/quartus/bin
test-windows-frontend:
stage: test
needs: ["windows-build"]
tags:
- windows
script:
- .\bin\windows-x86_64-Debug\gatery-frontend-test.exe
test-windows-scl:
stage: test
needs: ["windows-build"]
tags:
- windows
script:
- .\bin\windows-x86_64-Debug\gatery-scl-test.exe
# test-linux-coverage:
# stage: coverage
# needs: ["linux-build"]
# tags:
# - linux
# script:
# - premake5 gmake2
# - /usr/bin/time -o buildLog.txt -v make -j20 config=coverage
# - mkdir cov
# - anybadge -l "Build time (seconds)" -v $(cat buildLog.txt | grep "User time (seconds):" | cut -d' ' -f 4) --file cov/buildTime.svg
# - anybadge -l "Build max RSS (kB)" -v $(cat buildLog.txt | grep "Maximum resident set size (kbytes)" | cut -d' ' -f 6) --file cov/buildMaxRSS.svg
# - anybadge -l "Lines of Code" -v $(find ./ -type f \( -iname \*.cpp -o -iname \*.h -o -iname \*.hpp \) | xargs wc -l | tail -1 | cut -d' ' -f 2) --file cov/linesOfCode.svg
# - lcov --directory . --zerocounters
# - bin/linux-x86_64-Coverage/gatery-frontend-test -- --intel /opt/simModels/intel/ --xilinx /opt/simModels/xilinx/
# - bin/linux-x86_64-Coverage/gatery-scl-test -- --intel /opt/simModels/intel/ --xilinx /opt/simModels/xilinx/
# - lcov --directory . --capture --output-file unittest_coverage.info
# - lcov --remove unittest_coverage.info '/usr/*' --output-file unittest_coverage.info
# - lcov --remove unittest_coverage.info '*/source/external/*' --output-file unittest_coverage.info
# - anybadge --value=$(lcov --summary unittest_coverage.info | grep lines | cut -d' ' -f 4 | cut -d'%' -f 1) --file cov/coverage.svg coverage
# - genhtml unittest_coverage.info -o cov/
# # - rm -rf /mnt/doxygenDocu/gateryCov/*
# # - cp -r cov/ /mnt/doxygenDocu/gateryCov
# artifacts:
# expire_in: 4 weeks
# paths:
# - cov/
# only:
# - master
# documentation-job:
# stage: deploy
# needs: ["test-linux-coverage"]
# tags:
# - documount
# script:
# - doxygen doc/Doxyfile
# - rsync -r --delete --checksum doc/gen/html/ /mnt/doxygenDocu/gatery
# - rsync -r --delete --checksum cov/ /mnt/doxygenDocu/gateryCov
# only:
# - master