summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: de5f4bc68078b64f18ac1e2928186dbbfff2c9c0 (plain)
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
default:
  # The image was generated with the following Dockerfile. It is also used
  # for libxslt, that's why we need git and libgcrypt-dev.
  #
  # FROM ubuntu:19.04
  # RUN apt-get update && \
  #     apt-get upgrade -y && \
  #     apt-get install -y --no-install-recommends \
  #         curl git ca-certificates \
  #         autoconf automake libtool pkg-config \
  #         make gcc clang llvm \
  #         python-dev zlib1g-dev liblzma-dev libgcrypt-dev
  # WORKDIR /tests
  # RUN curl https://www.w3.org/XML/Test/xmlts20080827.tar.gz |tar xz
  image: registry.gitlab.gnome.org/gnome/libxml2

.test:
  script:
    - |
      ln -s /tests/xmlconf
      sh autogen.sh $CONFIG
      make -j$(nproc) V=1 CFLAGS="$CFLAGS -Werror"
      make check

gcc:
  extends: .test
  variables:
    CFLAGS: "-O2 -std=c89 -D_XOPEN_SOURCE=700"

clang:asan:
  extends: .test
  variables:
    CONFIG: "--without-python"
    CC: clang
    CFLAGS: "-O2 -g -fno-omit-frame-pointer -fsanitize=address,undefined,unsigned-integer-overflow -fno-sanitize-recover=all -Wno-error=cast-align"
    # LeakSanitizer requires SYS_CAP_PTRACE
    ASAN_OPTIONS: "detect_leaks=0"
    UBSAN_OPTIONS: "print_stacktrace=1"

clang:msan:
  extends: .test
  variables:
    CONFIG: "--without-python --without-zlib --without-lzma"
    CC: clang
    CFLAGS: "-O2 -g -fno-omit-frame-pointer -fsanitize=memory -Wno-error=cast-align"