-
Notifications
You must be signed in to change notification settings - Fork 163
/
Copy path.gitlab-ci.yml
125 lines (109 loc) · 2.84 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
default:
tags:
- docker
# Image from https://hub.docker.com/_/gcc/ based on Debian
image: gcc:9
.autoconf:
stage: build
before_script:
- apt-get update &&
apt-get install -y libogg-dev valgrind
script:
- ./autogen.sh
- ./configure ${CONFIG_FLAGS}
- make
- make check
autoconf:
extends: .autoconf
script:
- ./autogen.sh
- ./configure ${CONFIG_FLAGS}
- make
- make distcheck
fixed-point:
extends: .autoconf
variables:
CONFIG_FLAGS: --enable-fixed-point
no-float:
extends: .autoconf
variables:
CONFIG_FLAGS: --enable-fixed-point --disable-float-api
vorbis-psy:
extends: .autoconf
variables:
CONFIG_FLAGS: --enable-vorbis-psy
valgrind:
extends: .autoconf
variables:
CONFIG_FLAGS: --enable-valgrind
no-binaries:
extends: .autoconf
variables:
CONFIG_FLAGS: --disable-binaries
.meson:
stage: build
image: 'debian:bookworm'
before_script:
- apt-get update &&
apt-get install -y libogg-dev ninja-build meson valgrind
script:
- meson setup builddir ${CONFIG_FLAGS}
- ninja -C builddir
- ninja -C builddir test
- ninja -C builddir install
- test $(head -n1 meson.build | awk '/version/ { printf $NF }' | sed s/[\"\',]//g) = $(awk '/version/ { printf $NF }' library.json | sed s/[\"\',]//g)
meson fixed-point:
extends: .meson
variables:
CONFIG_FLAGS: -Dfixed-point=enabled
meson no-float:
extends: .meson
variables:
CONFIG_FLAGS: -Dfixed-point=enabled -Dfloat-api=disabled
meson vorbis-psy:
extends: .meson
variables:
CONFIG_FLAGS: -Dvorbis-psy=enabled
meson valgrind:
extends: .meson
variables:
CONFIG_FLAGS: -Dvalgrind=enabled
meson no-binaries:
extends: .meson
variables:
CONFIG_FLAGS: -Dtools=disabled -Dtest-binaries=disabled
variables:
SANITIZER: address
CFL_PLATFORM: gitlab
DOCKER_HOST: "tcp://docker:2375"
DOCKER_IN_DOCKER: "true" # may be removed in self-managed GitLab instances
DOCKER_TLS_CERTDIR: ""
clusterfuzzlite:
tags:
- dind
image:
name: gcr.io/oss-fuzz-base/clusterfuzzlite-run-fuzzers:v1
entrypoint: [""]
services:
- name: docker:dind # may be removed in self-managed GitLab instances
command: ["--tls=false"]
stage: test
parallel:
matrix:
- SANITIZER: [address, undefined, memory]
rules:
# Default code change.
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
variables:
MODE: "code-change"
before_script:
# Get GitLab's container id.
- export CFL_CONTAINER_ID=`docker ps -q -f "label=com.gitlab.gitlab-runner.job.id=$CI_JOB_ID" -f "label=com.gitlab.gitlab-runner.type=build"`
script:
# Will build and run the fuzzers.
- python3 "/opt/oss-fuzz/infra/cifuzz/cifuzz_combined_entrypoint.py"
artifacts:
# Upload artifacts when a crash makes the job fail.
when: always
paths:
- artifacts/