framework/replay: recently introduced HTML tags should be in innerHTML
[piglit.git] / .gitlab-ci.yml
blob0ae15140852d729f0d1e0500eec9b4e48b0852c1
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.
10 variables:
11   FDO_UPSTREAM_REPO: mesa/piglit
12   FDO_DISTRIBUTION_TAG: "2021-12-13-use-stable"
13   FDO_DISTRIBUTION_VERSION: bullseye-slim
14   WINDOWS_TAG: "2020-08-18"
15   WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/windows/x64_build:$WINDOWS_TAG"
16   WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$UPSTREAM_REPO/windows/x64_build:$WINDOWS_TAG"
17   GIT_DEPTH: 100
19 include:
20   - project: 'freedesktop/ci-templates'
21     ref: 34f4ade99434043f88e164933f570301fd18b125
22     file: '/templates/debian.yml'
24 stages:
25   - container
26   - build
27   - deploy
30 # When & how to run the CI
31 .ci-run-policy:
32   retry:
33     max: 2
34     when:
35       - runner_system_failure
36   # Cancel CI run if a newer commit is pushed to the same branch
37   interruptible: true
39 # CONTAINERS
41 debian:
42   stage: container
43   extends:
44     - .ci-run-policy
45     - .fdo.container-build@debian
46   variables:
47     GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
48     FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/debian-install.sh'
50 .use-debian:
51   extends:
52     - .ci-run-policy
53     - .fdo.distribution-image@debian
54   needs: [debian]
56 windows:
57   stage: container
58   extends:
59     - .ci-run-policy
60   variables:
61     GIT_STRATEGY: fetch # we do actually need the full repository though
62   timeout: 3h
63   tags:
64     - windows
65     - shell
66     - "1809"
67   script:
68     - .\.gitlab-ci\windows\container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE
70 .use-windows:
71   extends:
72     - .ci-run-policy
73   tags:
74     - windows
75     - docker
76     - "1809"
77   needs: [windows]
78   image: $WINDOWS_IMAGE
80 # BUILD
82 # Use ccache transparently, and print stats before/after
83 .use-ccache:
84   variables:
85     CC: /usr/lib/ccache/gcc
86     CXX: /usr/lib/ccache/g++
87     CCACHE_COMPILERCHECK: content
88     CCACHE_DIR: /cache/piglit/ccache
89   before_script:
90     - export CCACHE_BASEDIR="$PWD"
91     - ccache --show-stats
92   after_script:
93     - ccache --show-stats
95 build-debian:
96   stage: build
97   extends:
98     - .use-debian
99     - .use-ccache
100   script:
101     - .gitlab-ci/build-debian.sh
102   artifacts:
103     when: on_failure
104     paths:
105       - CMakeCache.txt
106       - CMakeFiles/*.log
108 build-debian-mingw:
109   stage: build
110   extends:
111     - .use-debian
112     - .use-ccache
113   parallel:
114     matrix:
115       - TARGET: [mingw32, mingw64]
116   script:
117     - .gitlab-ci/build-mingw.sh ${TARGET}
118   artifacts:
119     paths:
120       - build/*/piglit-*.7z
122 build-windows:
123   stage: build
124   extends:
125     - .use-windows
126   script:
127     - cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 &&
128       cmake . -D CMAKE_BUILD_TYPE=Debug
129       -D PIGLIT_BUILD_CL_TESTS=off
130       -D GLUT_INCLUDE_DIR=C:\freeglut\include
131       -D GLUT_glut_LIBRARY_RELEASE=C:\freeglut\lib\x64\freeglut.lib
132       -D GLEXT_INCLUDE_DIR=C:\glext\
133       -D PIGLIT_BUILD_DMA_BUF_TESTS=off
134       -D PIGLIT_BUILD_GLES1_TESTS=off
135       -D PIGLIT_BUILD_GLES2_TESTS=off
136       -D PIGLIT_BUILD_GLX_TESTS=off
137       -D PIGLIT_BUILD_GL_TESTS=on
138       -D PIGLIT_BUILD_WGL_TESTS=on
139       -GNinja &&
140       ninja -j4"
142 py.test:
143   stage: build
144   extends:
145     - .use-debian
146   script:
147     - pytest-3 unittests/framework
149 tox:
150   image: python:${PY_MAJVER}.${PY_MINVER}
151   stage: build
152   extends:
153     - .ci-run-policy
154   before_script:
155     - pip install tox
156   script:
157     - tox -e "py${PY_MAJVER}${PY_MINVER}-{generator,noaccel,accel-nix,streams,functional}"
158   parallel:
159     matrix:
160       - PY_MAJVER: 3
161         PY_MINVER: [7, 8, 9, 10]
162   needs: []
164 pages:
165   stage: deploy
166   image: alpine
167   script:
168   - apk --no-cache add py3-pip python3
169   - pip install sphinx
170   - pip install Flask-Sphinx-Themes
171   - cd docs
172   - ./build-html.sh
173   - mv _build/html/ ../public/
174   artifacts:
175     paths:
176     - public
177   only:
178     refs:
179       - main
180     changes:
181       - docs/**