From b2945bf7bcc1203a0e8a4bf5ef601b9d79a20600 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Wed, 27 Nov 2019 23:07:54 +0100 Subject: [PATCH] Enable CI for the 2.11 branch This adds a copy of the current .gitlab-ci.yml from master to the 2.11 branch to enable CI checks. --- .gitlab-ci.yml | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..39203c9d5 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,54 @@ +--- +image: ubuntu:latest +before_script: + - export DEBIAN_FRONTEND=noninteractive && apt-get update -qq && apt-get install --no-install-recommends -y build-essential apache2-dev autoconf automake bison dejagnu flex libpam-dev libtool perl liblocale-gettext-perl pkg-config python-all-dev python3-all-dev pyflakes3 ruby-dev swig lsb-release python3-notify2 python3-psutil zlib1g-dev + - lsb_release -a + - uname -a + +# XXX - add a deploy stage to publish man pages, docs, and coverage +# reports + +stages: + - build + - test + +build-all: + stage: build + artifacts: + name: ${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA} + expire_in: 30 days + untracked: true + paths: + - libraries/libapparmor/ + - parser/ + - binutils/ + - utils/ + - changehat/mod_apparmor/ + - changehat/pam_apparmor/ + - profiles/ + script: + - cd libraries/libapparmor && ./autogen.sh && PYTHON=/usr/bin/python3 ./configure --with-perl --with-python --prefix=/usr && make PYTHON=/usr/bin/python3 && cd ../.. || { cat config.log ; exit 1 ; } + - make -C parser + - make -C binutils + - make -C utils + - make -C changehat/mod_apparmor + - make -C changehat/pam_apparmor + - make -C profiles + +test-all: + stage: test + script: + - make -C libraries/libapparmor check PYTHON=/usr/bin/python3 + - make -C parser check + - make -C binutils check + - make -C utils check PYFLAKES=/usr/bin/pyflakes3 PYTHON_VERSIONS=/usr/bin/python3 + - make -C changehat/mod_apparmor check + - make -C profiles check-parser + +# Disabled due to aa-logprof dependency on /sbin/apparmor_parser existing +# - make -C profiles check-profiles + +# test-pam_apparmor: +# - stage: test +# - script: +# - cd changehat/pam_apparmor && make check