meson: tweak win/posix_platform.c handling
[mesa-waffle.git] / .gitlab-ci.yml
blobf0b029673aa6752df21bad13e463d9d36d98ecd0
1 variables:
2   FDO_UPSTREAM_REPO: mesa/waffle
3   FDO_DISTRIBUTION_TAG: '2022-09-13'
4   FDO_DISTRIBUTION_VERSION: 'bullseye-slim'
6 include:
7   - project: 'freedesktop/ci-templates'
8     ref: &ci-templates-sha 52dd4a94044449c8481d18dcdc221a3c636366d2
9     file: '/templates/debian.yml'
11 stages:
12   - container
13   - style-check
14   - build
15   - www
17 # When to automatically run the CI
18 .ci-run-policy:
19   retry:
20     max: 2
21     when:
22       - runner_system_failure
23   # Cancel CI run if a newer commit is pushed to the same branch
24   interruptible: true
26 container:
27   stage: container
28   extends:
29     - .fdo.container-build@debian
30     - .ci-run-policy
31   variables:
32     # no need to pull the whole repo to build the container image
33     GIT_STRATEGY: none
35     # clang-format requires git, yet it's missing in the packaging
36     FDO_DISTRIBUTION_PACKAGES: >
37       bash-completion
38       ca-certificates
39       clang-format
40       cmake
41       docbook-xsl
42       docbook-xml
43       g++
44       gcc
45       git
46       libcmocka-dev
47       libdrm-dev
48       libegl-dev
49       libgbm-dev
50       libgl-dev
51       libgles-dev
52       libglx-dev
53       libwayland-dev
54       libx11-xcb-dev
55       make
56       meson
57       mingw-w64
58       pkg-config
59       wayland-protocols
60       xauth
61       xsltproc
62       xvfb
64 clang-format:
65   extends:
66     - .ci-run-policy
67     - .fdo.container-build@debian
68   stage: style-check
69   variables:
70     GIT_DEPTH: 100
71   image: "$CI_REGISTRY_IMAGE/debian/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG"
72   needs:
73     - container
74   script:
75     - .gitlab-ci/clang-format.sh
77 # BUILD
78 .build:
79   extends:
80     - .ci-run-policy
81     - .fdo.container-build@debian
82   stage: build
83   variables:
84     GIT_DEPTH: 100
85   image: "$CI_REGISTRY_IMAGE/debian/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG"
86   needs:
87     - container
90 meson:
91   extends:
92     - .build
93   script:
94     - bash .gitlab-ci/build-meson.sh x11
95     - bash .gitlab-ci/build-meson.sh wayland
96     - bash .gitlab-ci/build-meson.sh gbm
97     - bash .gitlab-ci/build-meson.sh surfaceless
98   artifacts:
99     when: on_failure
100     paths:
101       - _build/meson-logs/*.txt
103 cmake:
104   extends:
105     - .build
106   script:
107     - cmake
108         -S . -B _build
109         -DCMAKE_INSTALL_PREFIX=`pwd`/install
110         -DCMAKE_BUILD_TYPE=Debug
111         -Dwaffle_enable_deprecated_build=1
112         -Dwaffle_has_gbm=1
113         -Dwaffle_has_glx=1
114         -Dwaffle_has_x11_egl=1
115         -Dwaffle_has_wayland=1
116         -Dwaffle_has_surfaceless=1
117         -Dwaffle_build_manpages=1
118         -Dwaffle_build_htmldocs=1
119         -Dwaffle_build_examples=1
120     - make -C _build -j4
121     - make -C _build check
122     - make -C _build install
124 cmake-mingw:
125   extends:
126     - .build
127   script:
128     - .gitlab-ci/build-cmake-mingw.sh
129   # TODO: Only create artifacts on certain builds.  See also:
130   # - https://docs.gitlab.com/ee/ci/yaml/README.html#artifactspaths
131   # - https://docs.gitlab.com/ee/ci/yaml/README.html#complete-example-for-release
132   artifacts:
133     paths:
134       - publish/*/waffle-*.zip
136 pages:
137   stage: www
138   image: alpine
139   script:
140   - apk add --no-cache git git-lfs
141   - git lfs install
142   - mkdir public
143   - git checkout origin/tarballs
144   - git log --oneline -1
145   - cp -r files public
146   - git checkout origin/master
147   - git log --oneline -1
148   - cp -r www/* public
149   - cp -r doc/release-notes public/files
150   artifacts:
151     paths:
152     - public
153   only:
154     refs:
155       - master
156     changes:
157       - .gitlab-ci.yml
158       - doc/release-notes/**/*
159       - www/**/*