forked from Kagami/SVT-AV1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
71 lines (65 loc) · 1.76 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
workflow:
rules:
# Use merge-request pipelines
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push"
when: never
- when: always
stages:
- compile
- test
- test-2
- test-3
variables:
CMAKE_GENERATOR: Ninja
CCACHE_DIR: $CI_PROJECT_DIR/.ccache
default:
interruptible: true
retry: 2
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- .ccache
policy: pull-push
include:
- local: /.gitlab/workflows/common/.gitlab-ci.yml
- remote: 'https://gitlab.com/AOMediaCodec/aom-testing/-/raw/ci-build-testing/.gitlab/workflows/nightly/.gitlab-ci.yml'
rules:
- if: $NIGHTLY != null
- local: /.gitlab/workflows/standard/.gitlab-ci.yml
rules:
- if: $NIGHTLY == null
Style check:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: never
- if: $NIGHTLY == null
stage: compile
image: registry.gitlab.com/aomediacodec/aom-testing/alpine3
script:
- ./test/stylecheck.sh
Static analysis (cppcheck):
rules:
- if: $NIGHTLY != null
when: never
- !reference [.source_code_rules]
stage: compile
image: registry.gitlab.com/aomediacodec/aom-testing/ubuntu1804
cache:
key: cppcheck
paths:
- .cppcheck
policy: pull-push
script:
- cmake -B Build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- mkdir -p .cppcheck
- jq '.[]|=with_entries(select(.value | test(".asm|/SVT-AV1/Build/cpuinfo") | not)) | unique' Build/compile_commands.json > compile_commands.json
- |
cppcheck \
--project=compile_commands.json \
--error-exitcode=1 \
--enable=all \
-j 2 \
-rp=$PWD \
-ithird_party \
--cppcheck-build-dir=.cppcheck \
--suppress=unusedFunction > /dev/null