[libxslt] Enable continuous integration via GitLab CI



commit 9d4bfeecbdf28f3980b23fa8f2504bdf54f04486
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Sun Oct 20 15:46:32 2019 +0200

    Enable continuous integration via GitLab CI
    
    Port the Travis CI setup to GitLab. We currently run three builds:
    
    - GCC with -std=c89
    - clang with ASan and UBSan
    - clang with MSan

 .gitlab-ci.yml               | 43 +++++++++++++++++++++++++++++++++++++++++++
 tests/exslt/date/Makefile.am |  2 +-
 2 files changed, 44 insertions(+), 1 deletion(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 00000000..10adfb69
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,43 @@
+default:
+  # Reuse libxml2 image
+  image: registry.gitlab.gnome.org/gnome/libxml2
+
+.test:
+  script:
+    - |
+      git clone --depth 1 https://gitlab.gnome.org/GNOME/libxml2.git
+      cd libxml2
+      sh autogen.sh $CONFIG
+      make -j$(nproc)
+      cd ..
+      sh autogen.sh $CONFIG --with-libxml-src=libxml2
+      # Don't run make in "doc" directory
+      for target in libxslt libexslt xsltproc python tests/plugins; do
+          make -j$(nproc) -C $target V=1 CFLAGS="$CFLAGS -Werror"
+      done
+      make -j$(nproc) -C tests/fuzz V=1 CFLAGS="$CFLAGS -Werror" testTargets
+      make -s -C tests tests | tee test.log
+      make -s -C xsltproc tests | tee -a test.log
+      ! grep -qv '^## Running' test.log
+      make -s -C python tests
+
+gcc:
+  extends: .test
+  variables:
+    CFLAGS: "-O2 -std=c89 -D_POSIX_C_SOURCE=200112L"
+
+clang:asan:
+  extends: .test
+  variables:
+    CONFIG: "--without-python"
+    CC: clang
+    CFLAGS: "-O2 -g -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=all 
-Wno-error=cast-align"
+    UBSAN_OPTIONS: "print_stacktrace=1"
+
+clang:msan:
+  extends: .test
+  variables:
+    CONFIG: "--without-python --without-zlib --without-lzma --without-crypto"
+    CC: clang
+    CFLAGS: "-O2 -g -fno-omit-frame-pointer -fsanitize=memory -Wno-error=cast-align"
+
diff --git a/tests/exslt/date/Makefile.am b/tests/exslt/date/Makefile.am
index 515f5496..fae16ab7 100644
--- a/tests/exslt/date/Makefile.am
+++ b/tests/exslt/date/Makefile.am
@@ -38,7 +38,7 @@ CLEANFILES = .memdump
 
 test-current:
        @(echo > .memdump)
-       @(if [ -z "$$CONTINUOUS_INTEGRATION" ]; then \
+       @(if [ -z "$$CI" ]; then \
            echo \<doc/\> >current.xml ; \
            echo "#" ; \
            echo "# Inspect the following for correctness" ; \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]