diff options
author | Eric Engestrom <eric.engestrom@intel.com> | 2019-11-25 14:20:37 +0000 |
---|---|---|
committer | Christian Gmeiner <christian.gmeiner@gmail.com> | 2019-12-29 14:49:37 +0100 |
commit | d905d0512b82dd3bdbc7e0e304458690d3f3e53c (patch) | |
tree | c35da6d21778d1d9cee089aac9b319195c0b6558 | |
parent | 99f95b3888ff178a3c8557471b0b067365f0dcbd (diff) |
gitlab-ci: add cmake & autotools builds
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
-rw-r--r-- | .gitlab-ci.yml | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..11fdc688 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,103 @@ +variables: + UPSTREAM_REPO: mesa/demos + +include: + - project: 'wayland/ci-templates' + ref: f69acac60d5dde0410124fd5674764600821b7a6 + file: '/templates/debian.yml' + +stages: + - container + - build + + +# When & how to run the CI +.ci-run-policy: + retry: + max: 2 + when: + - runner_system_failure + # Cancel CI run if a newer commit is pushed to the same branch + interruptible: true + + +# CONTAINERS + +# Debian 10 based x86 build image +x86_build: + stage: container + extends: + - .debian@container-ifnot-exists + - .ci-run-policy + variables: + DEBIAN_VERSION: buster-slim + REPO_SUFFIX: $CI_JOB_NAME + # No need to pull the whole repo to build the container image + GIT_STRATEGY: none + # /!\ Bump the TAG when modifying the DEBS + DEBIAN_TAG: &x86_build "2019-11-25" + DEBIAN_DEBS: >- + build-essential + autoconf + automake + libtool + make + pkg-config + cmake + ninja-build + + freeglut3-dev + libegl1-mesa-dev + libgbm-dev + libgl1-mesa-dev + libglew-dev + libudev-dev + libwayland-dev + libx11-dev + libxcb1-dev +.use-x86_build: + variables: + TAG: *x86_build + image: "$CI_REGISTRY_IMAGE/debian/x86_build:$TAG" + needs: + - x86_build + + +# BUILD + +.build: + stage: build + extends: + - .ci-run-policy + variables: + GIT_DEPTH: 10 + +.cmake-build: + extends: + - .build + script: + - cmake -S . -B _build + -DCMAKE_INSTALL_PREFIX=$PWD/install + -DCMAKE_BUILD_TYPE=Debug + -G Ninja + - ninja -C _build -j4 + - ninja -C _build install + +.autotools-build: + extends: + - .build + script: + - ./autogen.sh + - make -j4 + - make check + - DESTDIR=$PWD/install make install + +cmake: + extends: + - .use-x86_build + - .cmake-build + +autotools: + extends: + - .use-x86_build + - .autotools-build |