Skip to content

Commit 0e3af79

Browse files
author
Louis Fréneau
committed
CI refactoring, allow new test configurations
1 parent 3de3132 commit 0e3af79

File tree

14 files changed

+492
-247
lines changed

14 files changed

+492
-247
lines changed

.gitlab-ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
image: ultravideo/uvgvpccenc-ci-base
22

3-
# Build and test kvazaar
3+
# Build and test uvgVPCCenc
44
test-uvgvpcc: &test-template
55
stage: test
66
script:
77
- export PATH="${HOME}/bin:${PATH}"
88
- cmake --preset=CI
99
- cmake --build --preset=CI
10-
- ctest --preset=CI
10+
- ctest --preset=CI-ci-long-default
1111
artifacts:
1212
paths:
1313
- _build/CI/src/app/uvgVPCCenc
14+
- _build/CI/Testing/Temporary/CTestCostData.txt
15+
- _build/CI/Testing/Temporary/LastTest.log
16+
- _build/CI/bitstream/long_default_ReadyForWinter_vox9_AI_16-22-2_fast_true_2t_1l_1n.vpcc
17+
- _build/CI/bitstream/long_default_ReadyForWinter_vox9_RA_32-42-4_slow_true_2t_1l_1n.vpcc
1418
expire_in: 1 week

CMakePresets.json

Lines changed: 120 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,18 @@
4040
"cacheVariables": {
4141
"UVG_LOG_LEVEL": "DEBUG",
4242
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
43-
"ENABLE_TESTING": true
43+
"ENABLE_TESTING": true,
44+
"ENABLE_CI_TESTING": true
4445
}
4546
},
4647
{
4748
"name": "Debug",
4849
"inherits": "base-config",
4950
"cacheVariables": {
5051
"UVG_LOG_LEVEL": "DEBUG",
51-
"CMAKE_BUILD_TYPE": "Debug"
52+
"CMAKE_BUILD_TYPE": "Debug",
53+
"ENABLE_TESTING": true,
54+
"ENABLE_CI_TESTING": true
5255
}
5356
},
5457
{
@@ -112,31 +115,123 @@
112115
],
113116
"testPresets": [
114117
{
115-
"name": "base-test",
118+
"name": "base-test-local",
116119
"hidden": true,
117-
"execution": {
118-
"stopOnFailure": false
119-
}
120-
},
121-
{
122-
"name": "Debug",
123-
"inherits": "base-test",
124-
"configurePreset": "Debug"
125-
},
126-
{
127-
"name": "Release",
128-
"inherits": "base-test",
129-
"configurePreset": "Release"
130-
},
131-
{
132-
"name": "RelWithDebInfo",
133-
"inherits": "base-test",
134-
"configurePreset": "RelWithDebInfo"
120+
"execution": {
121+
"stopOnFailure": false,
122+
"jobs": 20,
123+
"outputOnFailure": true,
124+
"noTestsAction": "error",
125+
"verbose": true,
126+
"arguments": ["-V"]
127+
}
135128
},
136129
{
137-
"name": "CI",
138-
"inherits": "RelWithDebInfo",
139-
"configurePreset": "CI"
140-
}
130+
"name": "base-test-ci",
131+
"hidden": true,
132+
"execution": {
133+
"stopOnFailure": false,
134+
"jobs": 1,
135+
"outputOnFailure": true,
136+
"noTestsAction": "error"
137+
}
138+
},
139+
140+
141+
{"name": "Release-local-quick-all","inherits": "base-test-local","configurePreset": "Release","filter": {"include": {"name":"quick_*"}}},
142+
{"name": "Release-local-quick-default","inherits": "base-test-local","configurePreset": "Release","filter": {"include": {"name":"quick_default_*"}}},
143+
{"name": "Release-local-quick-slicing","inherits": "base-test-local","configurePreset": "Release","filter": {"include": {"name":"quick_slicing_*"}}},
144+
{"name": "Release-local-quick-efficientMapGen","inherits": "base-test-local","configurePreset": "Release","filter": {"include": {"name":"quick_efficientMapGen_*"}}},
145+
146+
{"name": "Release-local-long-all","inherits": "base-test-local","configurePreset": "Release","filter": {"include": {"name":"long_*"}}},
147+
{"name": "Release-local-long-default","inherits": "base-test-local","configurePreset": "Release","filter": {"include": {"name":"long_default_*"}}},
148+
{"name": "Release-local-long-slicing","inherits": "base-test-local","configurePreset": "Release","filter": {"include": {"name":"long_slicing_*"}}},
149+
{"name": "Release-local-long-efficientMapGen","inherits": "base-test-local","configurePreset": "Release","filter": {"include": {"name":"long_efficientMapGen_*"}}},
150+
151+
152+
{"name": "Release-ci-quick-all","inherits": "base-test-ci","configurePreset": "Release","filter": {"include": {"name":"quick_*"}}},
153+
{"name": "Release-ci-quick-default","inherits": "base-test-ci","configurePreset": "Release","filter": {"include": {"name":"quick_default_*"}}},
154+
{"name": "Release-ci-quick-slicing","inherits": "base-test-ci","configurePreset": "Release","filter": {"include": {"name":"quick_slicing_*"}}},
155+
{"name": "Release-ci-quick-efficientMapGen","inherits": "base-test-ci","configurePreset": "Release","filter": {"include": {"name":"quick_efficientMapGen_*"}}},
156+
157+
{"name": "Release-ci-long-all","inherits": "base-test-ci","configurePreset": "Release","filter": {"include": {"name":"long_*"}}},
158+
{"name": "Release-ci-long-default","inherits": "base-test-ci","configurePreset": "Release","filter": {"include": {"name":"long_default_*"}}},
159+
{"name": "Release-ci-long-slicing","inherits": "base-test-ci","configurePreset": "Release","filter": {"include": {"name":"long_slicing_*"}}},
160+
{"name": "Release-ci-long-efficientMapGen","inherits": "base-test-ci","configurePreset": "Release","filter": {"include": {"name":"long_efficientMapGen_*"}}},
161+
162+
163+
164+
165+
{"name": "RelWithDebInfo-local-quick-all","inherits": "base-test-local","configurePreset": "RelWithDebInfo","filter": {"include": {"name":"quick_*"}}},
166+
{"name": "RelWithDebInfo-local-quick-default","inherits": "base-test-local","configurePreset": "RelWithDebInfo","filter": {"include": {"name":"quick_default_*"}}},
167+
{"name": "RelWithDebInfo-local-quick-slicing","inherits": "base-test-local","configurePreset": "RelWithDebInfo","filter": {"include": {"name":"quick_slicing_*"}}},
168+
{"name": "RelWithDebInfo-local-quick-efficientMapGen","inherits": "base-test-local","configurePreset": "RelWithDebInfo","filter": {"include": {"name":"quick_efficientMapGen_*"}}},
169+
170+
{"name": "RelWithDebInfo-local-long-all","inherits": "base-test-local","configurePreset": "RelWithDebInfo","filter": {"include": {"name":"long_*"}}},
171+
{"name": "RelWithDebInfo-local-long-default","inherits": "base-test-local","configurePreset": "RelWithDebInfo","filter": {"include": {"name":"long_default_*"}}},
172+
{"name": "RelWithDebInfo-local-long-slicing","inherits": "base-test-local","configurePreset": "RelWithDebInfo","filter": {"include": {"name":"long_slicing_*"}}},
173+
{"name": "RelWithDebInfo-local-long-efficientMapGen","inherits": "base-test-local","configurePreset": "RelWithDebInfo","filter": {"include": {"name":"long_efficientMapGen_*"}}},
174+
175+
176+
{"name": "RelWithDebInfo-ci-quick-all","inherits": "base-test-ci","configurePreset": "RelWithDebInfo","filter": {"include": {"name":"quick_*"}}},
177+
{"name": "RelWithDebInfo-ci-quick-default","inherits": "base-test-ci","configurePreset": "RelWithDebInfo","filter": {"include": {"name":"quick_default_*"}}},
178+
{"name": "RelWithDebInfo-ci-quick-slicing","inherits": "base-test-ci","configurePreset": "RelWithDebInfo","filter": {"include": {"name":"quick_slicing_*"}}},
179+
{"name": "RelWithDebInfo-ci-quick-efficientMapGen","inherits": "base-test-ci","configurePreset": "RelWithDebInfo","filter": {"include": {"name":"quick_efficientMapGen_*"}}},
180+
181+
{"name": "RelWithDebInfo-ci-long-all","inherits": "base-test-ci","configurePreset": "RelWithDebInfo","filter": {"include": {"name":"long_*"}}},
182+
{"name": "RelWithDebInfo-ci-long-default","inherits": "base-test-ci","configurePreset": "RelWithDebInfo","filter": {"include": {"name":"long_default_*"}}},
183+
{"name": "RelWithDebInfo-ci-long-slicing","inherits": "base-test-ci","configurePreset": "RelWithDebInfo","filter": {"include": {"name":"long_slicing_*"}}},
184+
{"name": "RelWithDebInfo-ci-long-efficientMapGen","inherits": "base-test-ci","configurePreset": "RelWithDebInfo","filter": {"include": {"name":"long_efficientMapGen_*"}}},
185+
186+
187+
188+
189+
{"name": "Debug-local-quick-all","inherits": "base-test-local","configurePreset": "Debug","filter": {"include": {"name":"quick_*"}}},
190+
{"name": "Debug-local-quick-default","inherits": "base-test-local","configurePreset": "Debug","filter": {"include": {"name":"quick_default_*"}}},
191+
{"name": "Debug-local-quick-slicing","inherits": "base-test-local","configurePreset": "Debug","filter": {"include": {"name":"quick_slicing_*"}}},
192+
{"name": "Debug-local-quick-efficientMapGen","inherits": "base-test-local","configurePreset": "Debug","filter": {"include": {"name":"quick_efficientMapGen_*"}}},
193+
194+
{"name": "Debug-local-long-all","inherits": "base-test-local","configurePreset": "Debug","filter": {"include": {"name":"long_*"}}},
195+
{"name": "Debug-local-long-default","inherits": "base-test-local","configurePreset": "Debug","filter": {"include": {"name":"long_default_*"}}},
196+
{"name": "Debug-local-long-slicing","inherits": "base-test-local","configurePreset": "Debug","filter": {"include": {"name":"long_slicing_*"}}},
197+
{"name": "Debug-local-long-efficientMapGen","inherits": "base-test-local","configurePreset": "Debug","filter": {"include": {"name":"long_efficientMapGen_*"}}},
198+
199+
200+
{"name": "Debug-ci-quick-all","inherits": "base-test-ci","configurePreset": "Debug","filter": {"include": {"name":"quick_*"}}},
201+
{"name": "Debug-ci-quick-default","inherits": "base-test-ci","configurePreset": "Debug","filter": {"include": {"name":"quick_default_*"}}},
202+
{"name": "Debug-ci-quick-slicing","inherits": "base-test-ci","configurePreset": "Debug","filter": {"include": {"name":"quick_slicing_*"}}},
203+
{"name": "Debug-ci-quick-efficientMapGen","inherits": "base-test-ci","configurePreset": "Debug","filter": {"include": {"name":"quick_efficientMapGen_*"}}},
204+
205+
{"name": "Debug-ci-long-all","inherits": "base-test-ci","configurePreset": "Debug","filter": {"include": {"name":"long_*"}}},
206+
{"name": "Debug-ci-long-default","inherits": "base-test-ci","configurePreset": "Debug","filter": {"include": {"name":"long_default_*"}}},
207+
{"name": "Debug-ci-long-slicing","inherits": "base-test-ci","configurePreset": "Debug","filter": {"include": {"name":"long_slicing_*"}}},
208+
{"name": "Debug-ci-long-efficientMapGen","inherits": "base-test-ci","configurePreset": "Debug","filter": {"include": {"name":"long_efficientMapGen_*"}}},
209+
210+
211+
212+
213+
{"name": "CI-local-quick-all","inherits": "base-test-local","configurePreset": "CI","filter": {"include": {"name":"quick_*"}}},
214+
{"name": "CI-local-quick-default","inherits": "base-test-local","configurePreset": "CI","filter": {"include": {"name":"quick_default_*"}}},
215+
{"name": "CI-local-quick-slicing","inherits": "base-test-local","configurePreset": "CI","filter": {"include": {"name":"quick_slicing_*"}}},
216+
{"name": "CI-local-quick-efficientMapGen","inherits": "base-test-local","configurePreset": "CI","filter": {"include": {"name":"quick_efficientMapGen_*"}}},
217+
218+
{"name": "CI-local-long-all","inherits": "base-test-local","configurePreset": "CI","filter": {"include": {"name":"long_*"}}},
219+
{"name": "CI-local-long-default","inherits": "base-test-local","configurePreset": "CI","filter": {"include": {"name":"long_default_*"}}},
220+
{"name": "CI-local-long-slicing","inherits": "base-test-local","configurePreset": "CI","filter": {"include": {"name":"long_slicing_*"}}},
221+
{"name": "CI-local-long-efficientMapGen","inherits": "base-test-local","configurePreset": "CI","filter": {"include": {"name":"long_efficientMapGen_*"}}},
222+
223+
224+
{"name": "CI-ci-quick-all","inherits": "base-test-ci","configurePreset": "CI","filter": {"include": {"name":"quick_*"}}},
225+
{"name": "CI-ci-quick-default","inherits": "base-test-ci","configurePreset": "CI","filter": {"include": {"name":"quick_default_*"}}},
226+
{"name": "CI-ci-quick-slicing","inherits": "base-test-ci","configurePreset": "CI","filter": {"include": {"name":"quick_slicing_*"}}},
227+
{"name": "CI-ci-quick-efficientMapGen","inherits": "base-test-ci","configurePreset": "CI","filter": {"include": {"name":"quick_efficientMapGen_*"}}},
228+
229+
{"name": "CI-ci-long-all","inherits": "base-test-ci","configurePreset": "CI","filter": {"include": {"name":"long_*"}}},
230+
{"name": "CI-ci-long-default","inherits": "base-test-ci","configurePreset": "CI","filter": {"include": {"name":"long_default_*"}}},
231+
{"name": "CI-ci-long-slicing","inherits": "base-test-ci","configurePreset": "CI","filter": {"include": {"name":"long_slicing_*"}}},
232+
{"name": "CI-ci-long-efficientMapGen","inherits": "base-test-ci","configurePreset": "CI","filter": {"include": {"name":"long_efficientMapGen_*"}}}
233+
234+
235+
141236
]
142237
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ cmake --preset=Release -DENABLE_V3CRTP=ON
6262
```
6363

6464
### Test uvgVPCCenc
65-
To test the encoder, please use following commands:
65+
To test the encoder, please use following commands (after building Release):
6666
```
67-
ctest --preset=Release
67+
ctest --preset=Release-local-quick-default
6868
```
6969

7070
This runs small tests and checks whether the resulting encoding behaves as expected by verifying the bitstream MD5.

Testing/Temporary/LastTest.log

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Start testing: Oct 09 16:06 EEST
2+
----------------------------------------------------------
3+
End testing: Oct 09 16:06 EEST

src/lib/mapEncoding/encoderKvazaar.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ std::vector<uint8_t>& getBitstream(const std::shared_ptr<uvgvpcc_enc::GOF>& gof,
124124
}
125125
}
126126

127+
//TODO(lf): verify the return value for each api->config_parse (make a wrapper)
127128
void setKvazaarConfig(kvz_api* api, kvz_config* config, const size_t& width, const size_t& height, const ENCODER_TYPE& encoderType) {
128129
// Basic config
129130
api->config_parse(config, "enable-logging", "1"); // TODO(lf) what about performance ? It should depends on the log level

0 commit comments

Comments
 (0)