mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
misc: add initial gitlab-ci.yml for running build/tests
This commit adds an initial gitlab-ci.yml file to perform test builds and run tests on each commit. v2: add liblocale-gettext-perl dependency for parser simple test v3: - set noninteractive prompt to avoid debconf queries when installing packages - disable profiles test against aa-logprof; even if library and python path issues are resolved, aa-logprof early aborts due to being unable to find /sbin/apparmor_parser Signed-off-by: Steve Beattie <steve.beattie@canonical.com> Acked-by: Tyler Hicks <tyler.hicks@canonical.com> PR: https://gitlab.com/apparmor/apparmor/merge_requests/101
This commit is contained in:
parent
3b7c08e2b9
commit
ab94074887
1 changed files with 54 additions and 0 deletions
54
.gitlab-ci.yml
Normal file
54
.gitlab-ci.yml
Normal file
|
@ -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
|
||||||
|
- 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 ../..
|
||||||
|
- 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
|
Loading…
Add table
Reference in a new issue