gl-1.1: Test that unused normal array in ff shader doesn't affect other arrays
[piglit.git] / .gitlab-ci.yml
blobdcf38471c3a56da803342bf2744b4a136b8435a9
1 # This is the tag of the docker image used for the build jobs. If the
2 # image doesn't exist yet, the containers stage generates it.
4 # In order to generate a new image, one should generally change the tag.
5 # While removing the image from the registry would also work, that's not
6 # recommended except for ephemeral images during development: Replacing
7 # an image after a significant amount of time might pull in newer
8 # versions of gcc/clang or other packages, which might break the build
9 # with older commits using the same tag.
11 # After merging a change resulting in generating a new image to the
12 # main repository, it's recommended to remove the image from the source
13 # repository's container registry, so that the image from the main
14 # repository's registry will be used there as well.
15 variables:
16   UPSTREAM_REPO: mesa/piglit
17   DEBIAN_TAG: "2019-10-22"
18   DEBIAN_VERSION: buster-slim
19   DEBIAN_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG"
20   GIT_DEPTH: 100
22 include:
23   - project: 'wayland/ci-templates'
24     ref: b7030c2cd0d6ccc5f6d4f8299bafa4daa9240d71
25     file: '/templates/debian.yml'
27 stages:
28   - container
29   - build
30   - deploy
33 # When & how to run the CI
34 .ci-run-policy:
35   retry:
36     max: 2
37     when:
38       - runner_system_failure
39   # Cancel CI run if a newer commit is pushed to the same branch
40   interruptible: true
42 # CONTAINERS
44 debian:
45   stage: container
46   extends:
47     - .ci-run-policy
48     - .debian@container-ifnot-exists
49   variables:
50     GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
51     DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh'
52 .use-debian:
53   extends:
54     - .ci-run-policy
55   needs: [debian]
56   image: $DEBIAN_IMAGE
59 # BUILD
61 # Use ccache transparently, and print stats before/after
62 .use-ccache:
63   variables:
64     CC: /usr/lib/ccache/gcc
65     CXX: /usr/lib/ccache/g++
66     CCACHE_COMPILERCHECK: content
67     CCACHE_DIR: /cache/piglit/ccache
68   before_script:
69     - export CCACHE_BASEDIR="$PWD"
70     - ccache --show-stats
71   after_script:
72     - ccache --show-stats
74 build:
75   stage: build
76   extends:
77     - .use-debian
78     - .use-ccache
79   script:
80     - cmake .
81       -D CMAKE_BUILD_TYPE=Debug
82       -D PIGLIT_BUILD_CL_TESTS=on
83       -D PIGLIT_BUILD_DMA_BUF_TESTS=on
84       -D PIGLIT_BUILD_GLES1_TESTS=on
85       -D PIGLIT_BUILD_GLES2_TESTS=on
86       -D PIGLIT_BUILD_GLX_TESTS=on
87       -D PIGLIT_BUILD_GL_TESTS=on
88       -D PIGLIT_BUILD_WGL_TESTS=off
89       -GNinja
90     - ninja -j4
92 py.test:
93   stage: build
94   extends:
95     - .use-debian
96   script:
97     - pytest-3 unittests/framework
99 tox:
100   stage: build
101   extends:
102     - .use-debian
103   script:
104     - tox -e "py37-{generator,noaccel,accel-nix,streams}"
106 pages:
107   stage: deploy
108   image: alpine
109   script:
110   - apk --no-cache add py2-pip python-dev
111   - pip install sphinx
112   - pip install Flask-Sphinx-Themes
113   - cd docs
114   - ./build-html.sh
115   - mv _build/html/ ../public/
116   artifacts:
117     paths:
118     - public
119   only:
120     refs:
121       - master
122     changes:
123       - docs/**