summaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
blob: b2e174fee429427d84ee48d0a54e08a75646ad09 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
.templates_sha: &template_sha bd8010dd0123d3f0dda4ef691078566af2842613 # see https://docs.gitlab.com/ee/ci/yaml/#includefile


include:
  # Debian container builder template
  - project: 'freedesktop/ci-templates'
    ref: *template_sha
    file: '/templates/debian.yml'


stages:
  - prep
  - build


variables:
  DEBIAN_PACKAGES: 'build-essential automake autoconf libtool pkg-config libexpat1-dev libffi-dev libxml2-dev doxygen graphviz xmlto xsltproc docbook-xsl python3-pip python3-setuptools ninja-build'
  DEBIAN_EXEC: 'pip3 install meson==0.52.1'
  # these tags should be updated each time the list of packages is updated
  # changing these will force rebuilding the associated image
  # Note: these tags have no meaning and are not tied to a particular
  # wayland version
  DEBIAN_TAG: '2020-06-05.1'
  FDO_UPSTREAM_REPO: wayland/wayland


.debian.buster:
  variables:
    FDO_DISTRIBUTION_PACKAGES: $DEBIAN_PACKAGES
    FDO_DISTRIBUTION_TAG: $DEBIAN_TAG
    FDO_DISTRIBUTION_VERSION: 'buster'
    FDO_DISTRIBUTION_EXEC: $DEBIAN_EXEC


debian:buster@container-prep:
  extends:
    - .debian.buster
    - .fdo.container-build@debian
  stage: prep
  variables:
    GIT_STRATEGY: none


build-native-autotools:
  extends:
    - .debian.buster
    - .fdo.distribution-image@debian
  stage: build
  script:
  - export BUILD_ID="wayland-$CI_JOB_NAME_$CI_COMMIT_SHA-$CI_JOB_ID"
  - export PREFIX="$(pwd)/prefix-$BUILD_ID"
  - export BUILDDIR="$(pwd)/build-$BUILD_ID"
  - export MAKEFLAGS="-j4"
  - mkdir "$BUILDDIR" "$PREFIX"
  - cd "$BUILDDIR"
  - ../autogen.sh --prefix="$PREFIX" --with-icondir=/usr/share/X11/icons
  - make all
  - make check
  - make install
  - make distcheck
  artifacts:
    name: wayland-$CI_COMMIT_SHA-$CI_JOB_ID
    when: always
    paths:
    - build-*/wayland-*.tar.xz
    - build-*/wayland*/_build/sub/*.log
    - build-*/*.log
    - prefix-*


build-native-meson:
  extends:
    - .debian.buster
    - .fdo.distribution-image@debian
  stage: build
  script:
  - export BUILD_ID="wayland-$CI_JOB_NAME_$CI_COMMIT_SHA-$CI_JOB_ID"
  - export PREFIX="$(pwd)/prefix-$BUILD_ID"
  - export BUILDDIR="$(pwd)/build-$BUILD_ID"
  - mkdir "$BUILDDIR" "$PREFIX"
  - cd "$BUILDDIR"
  - meson --prefix="$PREFIX" -Dicon_directory=/usr/share/X11/icons ..
  - ninja -k0 test
  - ninja clean
  artifacts:
    name: wayland-meson-$CI_COMMIT_SHA-$CI_JOB_ID
    when: always
    paths:
    - build-meson/meson-logs
    - prefix-*