mesa-demos: NOTE! Default branch is now main
[mesa-demos.git] / .gitlab-ci.yml
blob3cd5356c62fc167b4bb26ea7606d02aa821a36b4
1 variables:
2   UPSTREAM_REPO: mesa/demos
4 include:
5   - project: 'wayland/ci-templates'
6     ref: f69acac60d5dde0410124fd5674764600821b7a6
7     file: '/templates/debian.yml'
9 stages:
10   - container
11   - build
14 # When & how to run the CI
15 .ci-run-policy:
16   retry:
17     max: 2
18     when:
19       - runner_system_failure
20   # Cancel CI run if a newer commit is pushed to the same branch
21   interruptible: true
24 # CONTAINERS
26 # Debian 10 based x86 build image
27 x86_build:
28   stage: container
29   extends:
30     - .debian@container-ifnot-exists
31     - .ci-run-policy
32   variables:
33     DEBIAN_VERSION: buster-slim
34     REPO_SUFFIX: $CI_JOB_NAME
35     # No need to pull the whole repo to build the container image
36     GIT_STRATEGY: none
37     # /!\ Bump the TAG when modifying the DEBS
38     DEBIAN_TAG: &x86_build "2021-03-23"
39     DEBIAN_DEBS: >-
40       build-essential
41       autoconf
42       automake
43       libtool
44       make
45       pkg-config
46       cmake
47       ninja-build
48       mingw-w64
50       freeglut3-dev
51       libegl1-mesa-dev
52       libgbm-dev
53       libgl1-mesa-dev
54       libudev-dev
55       libwayland-dev
56       libx11-dev
57       libxcb1-dev
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   stage: build
70   extends:
71     - .ci-run-policy
72   variables:
73     GIT_DEPTH: 10
75 .cmake-build:
76   extends:
77     - .build
78   script:
79     - cmake -S . -B _build
80       -DCMAKE_INSTALL_PREFIX=$PWD/install
81       -DCMAKE_BUILD_TYPE=Debug
82       -G Ninja
83     - ninja -C _build -j4
84     - ninja -C _build install
86 .autotools-build:
87   extends:
88     - .build
89   script:
90     - ./autogen.sh
91     - make -j4
92     - make check
93     - DESTDIR=$PWD/install make install
95 cmake:
96   extends:
97     - .use-x86_build
98     - .cmake-build
100 cmake-mingw:
101   extends:
102     - .use-x86_build
103     - .build
104   script:
105     - .gitlab-ci/build-mingw.sh
107 autotools:
108   extends:
109     - .use-x86_build
110     - .autotools-build