meson: remove always true meson.version >= 0.46
[mesa-waffle.git] / .gitlab-ci.yml
blob499eb116f264454f56576ed498364a452d20f2ca
1 variables:
2   FDO_UPSTREAM_REPO: mesa/waffle
3   FDO_DISTRIBUTION_TAG: '2022-09-13_1'
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   - build
14   - www
16 # When to automatically run the CI
17 .ci-run-policy:
18   retry:
19     max: 2
20     when:
21       - runner_system_failure
22   # Cancel CI run if a newer commit is pushed to the same branch
23   interruptible: true
25 container:
26   stage: container
27   extends:
28     - .fdo.container-build@debian
29     - .ci-run-policy
30   variables:
31     # no need to pull the whole repo to build the container image
32     GIT_STRATEGY: none
34     FDO_DISTRIBUTION_PACKAGES: >
35       bash-completion
36       ca-certificates
37       cmake
38       docbook-xsl
39       docbook-xml
40       g++
41       gcc
42       libcmocka-dev
43       libegl-dev
44       libgbm-dev
45       libgl-dev
46       libgles-dev
47       libglx-dev
48       libudev-dev
49       libwayland-dev
50       libx11-xcb-dev
51       make
52       meson
53       mingw-w64
54       pkg-config
55       wayland-protocols
56       xauth
57       xsltproc
58       xvfb
60 # BUILD
61 .build:
62   extends: 
63     - .ci-run-policy
64     - .fdo.container-build@debian
65   stage: build
66   variables:
67     GIT_DEPTH: 100
68   image: "$CI_REGISTRY_IMAGE/debian/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG"
69   needs:
70     - container
71     
73 meson:
74   extends:
75     - .build
76   script:
77     - bash .gitlab-ci/build-meson.sh x11
78     - bash .gitlab-ci/build-meson.sh wayland
79     - bash .gitlab-ci/build-meson.sh gbm
80     - bash .gitlab-ci/build-meson.sh surfaceless
81   artifacts:
82     when: on_failure
83     paths:
84       - _build/meson-logs/*.txt
86 cmake:
87   extends:
88     - .build
89   script:
90     - cmake
91         -S . -B _build
92         -DCMAKE_INSTALL_PREFIX=`pwd`/install
93         -DCMAKE_BUILD_TYPE=Debug
94         -Dwaffle_has_gbm=1
95         -Dwaffle_has_glx=1
96         -Dwaffle_has_x11_egl=1
97         -Dwaffle_has_wayland=1
98         -Dwaffle_has_surfaceless=1
99         -Dwaffle_build_manpages=1
100         -Dwaffle_build_htmldocs=1
101         -Dwaffle_build_examples=1
102     - make -C _build -j4
103     - make -C _build check
104     - make -C _build install
106 cmake-mingw:
107   extends:
108     - .build
109   script:
110     - .gitlab-ci/build-cmake-mingw.sh
111   # TODO: Only create artifacts on certain builds.  See also:
112   # - https://docs.gitlab.com/ee/ci/yaml/README.html#artifactspaths
113   # - https://docs.gitlab.com/ee/ci/yaml/README.html#complete-example-for-release
114   artifacts:
115     paths:
116       - publish/*/waffle-*.zip
118 pages:
119   stage: www
120   image: alpine
121   script:
122   - apk add --no-cache git git-lfs
123   - git lfs install
124   - mkdir public
125   - git checkout origin/website
126   - git log --oneline -1
127   - cp -r files man public
128   - git checkout origin/master
129   - git log --oneline -1
130   - cd www
131   - cp -r *.jpg *.html *.css ../public
132   artifacts:
133     paths:
134     - public
135   only:
136     refs:
137       - master
138 # TODO: Trigger pages only when the `www` directory changes. But, with this
139 # `changes` code, it never triggers the job.
140 #    changes:
141 #      - www/**