[igt-dev] [PATCH v2 i-g-t] ci: build with Clang

Arkadiusz Hiler
2019-04-30T11:19:06Z

From: Simon Ser <simon.ser@intel.com>

This adds a build and test step with Clang on Fedora. Hopefully this can
help keeping Clang builds healthy.

Signed-off-by: Simon Ser <simon.ser@intel.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---

Completed pipeline:
https://gitlab.freedesktop.org/ivyl/igt/pipelines/33973

.gitlab-ci.yml | 19 +++++++++++++++++++
Dockerfile.fedora | 3 +++
2 files changed, 22 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ae8cbb67..f282c684 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -47,6 +47,17 @@ build:tests-fedora-oldest-meson:
- ninja -C build
- ninja -C build igt-gpu-tools-doc

+build:tests-fedora-clang:
+ stage: build
+ variables:
+ CC: clang
+ script:
+ - meson $MESON_OPTIONS build
+ - ninja -C build
+ artifacts:
+ paths:
+ - build
+
build:tests-debian-meson:
image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian:latest
stage: build
@@ -99,6 +110,14 @@ test:ninja-test:
stage: test
script: ninja -C build test

+test:ninja-test-clang:
+ dependencies:
+ - build:tests-fedora-clang
+ variables:
+ CC: clang
+ stage: test
+ script: ninja -C build test
+
test:ninja-test-arm64:
image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian-arm64:latest
dependencies:
diff --git a/Dockerfile.fedora b/Dockerfile.fedora
index 29520f7b..0795de0e 100644
--- a/Dockerfile.fedora
+++ b/Dockerfile.fedora
@@ -35,6 +35,9 @@ RUN tar xf peg-0.1.18.tar.gz
RUN cd peg-0.1.18 && make PREFIX=/usr install
RUN rm -fr /tmp/peg

+# For compile-testing on clang
+RUN dnf install -y clang
+
# Meson version switching shenanigans
WORKDIR /usr/src
RUN curl -O https://files.pythonhosted.org/packages/17/d0/0fe98a9557a2f07dbe6f99ef57f2bc37450b641e1f6ceae9ce04c3c845dd/meson-0.46.0.tar.gz
--
2.20.1