core/tests: correct function type
[mesa-waffle.git] / .gitlab-ci.yml
blobb03a24f2064ecd47279a0fa99783d24e89ebf9b2
1 variables:
2   FDO_UPSTREAM_REPO: mesa/waffle
3   FDO_DISTRIBUTION_TAG: '2021-01-26_4'
4   FDO_DISTRIBUTION_VERSION: 'buster-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
33    
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       libegl1-mesa-dev
44       libgbm-dev
45       libgl1-mesa-dev
46       libudev-dev
47       libwayland-dev
48       libx11-dev
49       libxcb1-dev
50       make
51       meson
52       mingw-w64
53       pkg-config
54       wayland-protocols
55       xauth
56       xsltproc
57       xvfb
59 # BUILD
60 .build:
61   extends: 
62     - .ci-run-policy
63     - .fdo.container-build@debian
64   stage: build
65   variables:
66     GIT_DEPTH: 100
67   image: "$CI_REGISTRY_IMAGE/debian/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG"
68   needs:
69     - container
70     
72 meson:
73   extends:
74     - .build
75   script:
76     - bash .gitlab-ci/build-meson.sh x11
77     - bash .gitlab-ci/build-meson.sh wayland
78     - bash .gitlab-ci/build-meson.sh gbm
79     - bash .gitlab-ci/build-meson.sh surfaceless
80   artifacts:
81     when: on_failure
82     paths:
83       - _build/meson-logs/*.txt
85 cmake:
86   extends:
87     - .build
88   script:
89     - cmake
90         -S . -B _build
91         -DCMAKE_INSTALL_PREFIX=`pwd`/install
92         -DCMAKE_BUILD_TYPE=Debug
93         -Dwaffle_has_gbm=1
94         -Dwaffle_has_glx=1
95         -Dwaffle_has_x11_egl=1
96         -Dwaffle_has_wayland=1
97         -Dwaffle_has_surfaceless=1
98         -Dwaffle_build_manpages=1
99         -Dwaffle_build_htmldocs=1
100         -Dwaffle_build_examples=1
101     - make -C _build -j4
102     - make -C _build check
103     - make -C _build install
105 cmake-mingw:
106   extends:
107     - .build
108   script:
109     - .gitlab-ci/build-cmake-mingw.sh
110   # TODO: Only create artifacts on certain builds.  See also:
111   # - https://docs.gitlab.com/ee/ci/yaml/README.html#artifactspaths
112   # - https://docs.gitlab.com/ee/ci/yaml/README.html#complete-example-for-release
113   artifacts:
114     paths:
115       - publish/*/waffle-*.zip
117 pages:
118   stage: www
119   image: alpine
120   script:
121   - apk add --no-cache git git-lfs
122   - git lfs install
123   - mkdir public
124   - git checkout origin/website
125   - git log --oneline -1
126   - cp -r files man public
127   - git checkout origin/master
128   - git log --oneline -1
129   - cd www
130   - cp -r *.jpg *.html *.css ../public
131   artifacts:
132     paths:
133     - public
134   only:
135     refs:
136       - master
137 # TODO: Trigger pages only when the `www` directory changes. But, with this
138 # `changes` code, it never triggers the job.
139 #    changes:
140 #      - www/**