Commit Graph

13 Commits

Author SHA1 Message Date
Michel Dänzer
8e2f5410ce Revert "gitlab-ci: Only run docker-image stage if relevant source files change"
This reverts commit 8694395fcf.

Some scenarios have come to light where this failed to ensure the docker
image exists:

* If the master branch of a forked repository is used for an MR which
  doesn't modify .gitlab-ci.yml, the docker-image job may not run.
* If the docker-image job of the first pipeline in a forked repository
  is cancelled or fails for any reason, and .gitlab-ci.yml isn't
  modified for the next pipeline run.
(Cherry picked from commit 0ec9a13c2a)
2019-03-25 12:45:52 +01:00
Michel Dänzer
9850d20c2a gitlab-ci: Run make distcheck in autotools build & test job
We don't set the PIGLIT_DIR and XTS_DIR environment variables for make
distcheck for now, otherwise it complains about files left behind by
piglit.

(cherry picked from commit 432fad04e7)
2019-02-25 13:07:16 -05:00
Michel Dänzer
e5984241ab gitlab-ci: Add autotools build & test job
(Cherry picked from commit 2f12c80175)
2019-02-22 11:56:23 +01:00
Michel Dänzer
de6d87b619 gitlab-ci: Use ccache
Meson picks it up automatically.

Based on:

* https://gitlab.freedesktop.org/mesa/mesa/merge_requests/240
* https://gould.cx/ted/blog/2017/06/10/ccache-for-Gitlab-CI/
* https://stackoverflow.com/questions/53659419/ccache-no-hits-in-gitlab-ci

v2 based on the corresponding Mesa change:
* Quote CCACHE_(BASE)DIR environment variables.
* Clear ccache stats in before_script.
* Move cache stanza to the build-and-test job, the cache isn't used in
  the docker-image job.

Reviewed-by: Adam Jackson <ajax@redhat.com> # v1
(Cherry picked from commit b577df7745)
2019-02-22 11:56:01 +01:00
Michel Dänzer
37ad8dd978 gitlab-ci: Add ccache to docker image, and leave in autotools
We're going to make use of these in build & test jobs.
(Cherry picked from commit 537f06e21e)
2019-02-22 11:55:31 +01:00
Michel Dänzer
61eccbcec9 gitlab-ci: Don't rely on $CI_PROJECT_NAME
The name of a forked repository can be changed later, in which case this
would fail to refer to the main repository.

Pointed out by Eric Engestrom in
https://gitlab.freedesktop.org/mesa/mesa/merge_requests/224 .
(Cherry picked from commit fede384962)
2019-02-22 11:54:57 +01:00
Michel Dänzer
e10cfd8fcc gitlab-ci: Only run docker-image stage if relevant source files change
Otherwise there's normally no need to run it. It will also run when a
new branch is created, which ensures that the docker image always exists
(e.g. in a newly forked repository).

Inspired by https://gitlab.freedesktop.org/mesa/mesa/merge_requests/143
(Cherry picked from commit 8694395fcf)
2019-02-22 11:54:41 +01:00
Michel Dänzer
7246730edf gitlab-ci: Set LC_ALL=C.UTF-8
Although piglit could now handle non-ASCII characters in the
environment, meson was still failing without this (even though it's
using Python 3).

Reviewed-by: Eric Anholt <eric@anholt.net>
(Cherry picked from commit bc6998b728)
2019-02-22 11:53:55 +01:00
Michel Dänzer
3314af2d15 gitlab-ci: Docker image can be generated as part of pipeline
This removes the dependency on an externally generated docker image, and
should make it easier to update the docker image or make other changes
related to it.

This is based on Debian testing, because I'm most familiar with Debian.
But it should be easy to base it on another distro.

v2:
* Use kaniko instead of docker-in-docker for image generation, so it can
  also work in unprivileged runners.
* Drop piglit.conf & tetexec.cfg overrides, just make sure the files in
  the image work.
(Cherry picked from commit f56d8e2282)
2019-02-22 11:53:12 +01:00
Michel Dänzer
e8b4e94d51 Drop Travis Linux build in favour of GitLab CI
Fold build-travis-deps.sh into .gitlab-ci.yml.

Preparation for the next change, which would break the Travis Linux
build.

Reviewed-by: Eric Anholt <eric@anholt.net>
(Cherry picked from commit ed44f9cd6a)
2019-02-22 11:52:42 +01:00
Michel Daenzer
4925f38dc0 Make artifacts of piglit results if job fails
Can be useful for figuring out what caused the failure.
(Cherry picked from commit a7472da941)
2019-02-22 11:51:57 +01:00
Adam Jackson
7753fd9989 gitlab: Skip the docker-in-docker step
No idea which cult's cargo I was looking at there. Cuts about a minute
off the build time.

Signed-off-by: Adam Jackson <ajax@redhat.com>
(Cherry picked from commit a41ccaa085)
2019-02-22 11:50:05 +01:00
Adam Jackson
531e1648fc gitlab-ci: Add for gitlab.freedesktop.org
Looks quite a bit like the travis path, doesn't it? Still, nice to not
rely on an external service if we don't have to.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-05-02 15:00:53 -04:00