tests/gl_basic_test: add apple/core context workaround
[mesa-waffle.git] / .gitlab-ci.yml
blob8f4523b8c39b029586a4b57ac528f6037719a856
1 variables:
2   UPSTREAM_REPO: mesa/waffle
4 include:
5   - project: 'wayland/ci-templates'
6     ref: f69acac60d5dde0410124fd5674764600821b7a6
7     file: '/templates/debian.yml'
9 stages:
10   - container
11   - build
12   - www
15 # When to automatically run the CI
16 .ci-run-policy:
17   retry:
18     max: 2
19     when:
20       - runner_system_failure
21   # Cancel CI run if a newer commit is pushed to the same branch
22   interruptible: true
25 # Debian 10 based x86 build image
26 x86_build:
27   stage: container
28   extends:
29     - .debian@container-ifnot-exists
30     - .ci-run-policy
31   variables:
32     DEBIAN_VERSION: buster-slim
33     REPO_SUFFIX: $CI_JOB_NAME
34     # no need to pull the whole repo to build the container image
35     GIT_STRATEGY: none
36     DEBIAN_TAG: &x86_build "2019-11-22"
37     DEBIAN_DEBS: >-
38       bash-completion
39       ca-certificates
40       cmake
41       docbook-xsl
42       docbook-xml
43       g++
44       gcc
45       libcmocka-dev
46       libegl1-mesa-dev
47       libgbm-dev
48       libgl1-mesa-dev
49       libudev-dev
50       libwayland-dev
51       libx11-dev
52       libxcb1-dev
53       meson
54       pkg-config
55       xauth
56       xsltproc
57       xvfb
58 .use-x86_build:
59   variables:
60     TAG: *x86_build
61   image: "$CI_REGISTRY_IMAGE/debian/x86_build:$TAG"
62   needs:
63     - x86_build
66 # BUILD
68 .build:
69   extends: .ci-run-policy
70   stage: build
71   variables:
72     GIT_DEPTH: 100
74 meson:
75   extends:
76     - .build
77     - .use-x86_build
78   script:
79     - bash .gitlab-ci/build-meson.sh x11
80     - bash .gitlab-ci/build-meson.sh wayland
81     - bash .gitlab-ci/build-meson.sh gbm
82     - bash .gitlab-ci/build-meson.sh surfaceless
83   artifacts:
84     when: on_failure
85     paths:
86       - _build/meson-logs/*.txt
88 cmake:
89   extends:
90     - .build
91     - .use-x86_build
92   script:
93     - cmake
94         -G Ninja
95         -S . -B _build
96         -DCMAKE_INSTALL_PREFIX=`pwd`/install
97         -DCMAKE_BUILD_TYPE=Debug
98         -Dwaffle_has_gbm=1
99         -Dwaffle_has_glx=1
100         -Dwaffle_has_x11_egl=1
101         -Dwaffle_has_wayland=1
102         -Dwaffle_build_manpages=1
103         -Dwaffle_build_htmldocs=1
104         -Dwaffle_build_examples=1
105     - ninja -C _build -j4
106     - ninja -C _build check
107     - ninja -C _build install
110 pages:
111   stage: www
112   image: alpine
113   script:
114   - apk add --no-cache git git-lfs
115   - git lfs install
116   - mkdir public
117   - git checkout origin/website
118   - git log --oneline -1
119   - cp -r files man public
120   - git checkout origin/master
121   - git log --oneline -1
122   - cd www
123   - cp -r *.jpg *.html *.css ../public
124   artifacts:
125     paths:
126     - public
127   only:
128     refs:
129       - master
130 # TODO: Trigger pages only when the `www` directory changes. But, with this
131 # `changes` code, it never triggers the job.
132 #    changes:
133 #      - www/**