diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2020-11-16 11:11:18 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2020-11-16 11:14:28 +1000 |
commit | 1cedf31169ea47b5202e5cca29838c61297180ea (patch) | |
tree | 40b38ce9a2e07e93c3c3c74ba51403af3d6b29d8 | |
parent | a7ed1c2a71228b26fe4202738d22859d434f70c8 (diff) |
Add a basic CI run
Signed-off-by:Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | .gitlab-ci.yml | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..67d649b --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,77 @@ +# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0 filetype=yaml: +# +# This CI uses the freedesktop.org ci-templates. +# Please see the ci-templates documentation for details: +# https://freedesktop.pages.freedesktop.org/ci-templates/ + +.templates_sha: &template_sha c7702b1ae8507c5d5f34edcbf280f287ab541e8e # see https://docs.gitlab.com/ee/ci/yaml/#includefile + + +include: + # Alpine container builder template + - project: 'freedesktop/ci-templates' + ref: *template_sha + file: '/templates/alpine.yml' + + +stages: + - prep # prep work like rebuilding the container images if there is a change + - build # for actually building and testing things in a container + - deploy + + +variables: + FDO_UPSTREAM_REPO: 'libevdev/evtest' + # The tag should be updated each time the list of packages is updated. + # Changing a tag forces the associated image to be rebuilt. + # Note: the tag has no meaning, we use a date format purely for readability + ALPINE_TAG: '2020-11-16.0' + ALPINE_PACKAGES: 'git gcc autoconf automake make libc-dev linux-headers gzip xmlto asciidoc' + +# +# Build a container with the given tag and the packages pre-installed. +# This only happens if when the tag changes, otherwise the existing image is +# re-used. +# +container-prep: + extends: + - .fdo.container-build@alpine + stage: prep + variables: + GIT_STRATEGY: none + FDO_DISTRIBUTION_PACKAGES: $ALPINE_PACKAGES + FDO_DISTRIBUTION_TAG: $ALPINE_TAG + + +# +# The default build, runs on the image built above. +# +build-autotools: + stage: build + extends: + - .fdo.distribution-image@alpine + script: + - autoreconf -ivf + - mkdir _builddir + - pushd _builddir > /dev/null + - ../configure --disable-silent-rules + - make + - make check + - make distcheck + - popd > /dev/null + variables: + FDO_DISTRIBUTION_TAG: $ALPINE_TAG + + +# +# Pure gcc build, runs on the image built above. +# +compile-only: + stage: build + extends: + - .fdo.distribution-image@alpine + script: + - gcc -o evtest evtest.c + variables: + FDO_DISTRIBUTION_TAG: $ALPINE_TAG + |