diff options
author | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2018-09-28 16:05:59 +0300 |
---|---|---|
committer | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2018-10-23 14:28:28 +0300 |
commit | fa6dbf8c048961356fd642df047cb58ab49309b2 (patch) | |
tree | d3cfc459ea6f54300eb69d4faf23aeac8a80fcb2 /.gitlab-ci.yml | |
parent | b633344e7407f2086199b9d835aa980ba4c29dfa (diff) |
Add GitLab's CI/CD configuration
The CI/CD pipeline is configured the following way:
1. Build docker images and add them to repo's registry (manual step for
now, automation needs GitLab to be updated).
2. Build igt with meson on Debian and Fedora.
3. Run `ninja tests` on Fedora.
4. Build and publish docs as an artifact, for GitLab Pages.
v2: Typos and fully-featured meson build.
v3: Use variables instead of hard-coding registry and project.
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..a90961b6 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,78 @@ +image: registry.freedesktop.org/drm/igt-gpu-tools/igt-fedora:latest +variables: + MESON_OPTIONS: > + -Dwith_libdrm=intel,nouveau,amdgpu + -Dbuild_overlay=true + -Dbuild_audio=true + -Dbuild_chamelium=true + -Dwith_valgrind=true + -Dbuild_man=true + -Dbuild_tests=true + -Dbuild_runner=true + +stages: + - containers + - build + - test + - deploy + +build:tests-fedora: + stage: build + script: + # Feodora does not have peg packaged + - meson $MESON_OPTIONS build + - ninja -C build + artifacts: + paths: + - build + +build:tests-debian: + image: registry.freedesktop.org/drm/igt-gpu-tools/igt-debian:latest + stage: build + script: + - meson $MESON_OPTIONS build + - ninja -C build + +ninja:test: + stage: test + script: + - ninja -C build test + +pages: + stage: deploy + script: + - ninja -C build igt-gpu-tools-doc + - cp -r build/docs/reference/igt-gpu-tools/html public + artifacts: + paths: + - public + only: + - master + +containers:igt-debian: + stage: containers + when: manual + image: docker:stable + services: + - docker:dind + variables: + DOCKER_HOST: tcp://docker:2375 + DOCKER_DRIVER: overlay2 + script: + - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY + - docker build -t $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian -f Dockerfile.debian . + - docker push $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian + +containers:igt-fedora: + stage: containers + when: manual + image: docker:stable + services: + - docker:dind + variables: + DOCKER_HOST: tcp://docker:2375 + DOCKER_DRIVER: overlay2 + script: + - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY + - docker build -t $CI_REGISTRY/$CI_PROJECT_PATH/igt-fedora -f Dockerfile.fedora . + - docker push $CI_REGISTRY/$CI_PROJECT_PATH/igt-fedora |