• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# The build has two stages. The 'container' stage is used to build a Docker
2# container and push it to the project's container registry on fd.o GitLab.
3# This step is only run when the tag for the container changes, else it is
4# effectively a no-op. All of this infrastructure is inherited from the
5# wayland/ci-templates repository which is the recommended way to set up CI
6# infrastructure on fd.o GitLab.
7#
8# Once the container stage is done, we move on to the 'build' stage where we
9# run meson build. Currently, tests are also run as part of the build stage as
10# there doesn't seem to be significant value to splitting the stages at the
11# moment.
12
13stages:
14  - container
15  - build
16
17variables:
18  # Update this tag when you want to trigger a rebuild the container in which
19  # CI runs, for example when adding new packages to FDO_DISTRIBUTION_PACKAGES.
20  # The tag is an arbitrary string that identifies the exact container
21  # contents.
22  FDO_DISTRIBUTION_TAG: '2021-11-03-00'
23  FDO_DISTRIBUTION_VERSION: '20.04'
24  FDO_UPSTREAM_REPO: 'pulseaudio/pulseaudio'
25  UBUNTU_IMAGE: "$CI_REGISTRY_IMAGE/ubuntu/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG"
26
27include:
28  # We pull templates from master to avoid the overhead of periodically
29  # scanning for changes upstream. This does means builds might occasionally
30  # break due to upstream changing things, so if you see unexpected build
31  # failures, this might be one cause.
32  - project: 'wayland/ci-templates'
33    ref: 'master'
34    file: '/templates/ubuntu.yml'
35
36build-container:
37  extends: .fdo.container-ifnot-exists@ubuntu
38  stage: container
39  variables:
40    GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
41
42    # Remember to update FDO_DISTRIBUTION_TAG when modifying this package list!
43    # Otherwise the changes won't have effect since an old container image will
44    # be used.
45    FDO_DISTRIBUTION_PACKAGES: >-
46      autopoint
47      bash-completion
48      check
49      curl
50      dbus-x11
51      g++
52      gcc
53      gettext
54      git-core
55      libasound2-dev
56      libasyncns-dev
57      libavahi-client-dev
58      libbluetooth-dev
59      libcap-dev
60      libfftw3-dev
61      libglib2.0-dev
62      libgtk-3-dev
63      libice-dev
64      libjack-dev
65      liblircclient-dev
66      libltdl-dev
67      liborc-0.4-dev
68      libsbc-dev
69      libsndfile1-dev
70      libsoxr-dev
71      libspeexdsp-dev
72      libssl-dev
73      libsystemd-dev
74      libtdb-dev
75      libudev-dev
76      libwebrtc-audio-processing-dev
77      libwrap0-dev
78      libx11-xcb-dev
79      libxcb1-dev
80      libxml-parser-perl
81      libxml2-utils
82      libxtst-dev
83      m4
84      ninja-build
85      pkg-config
86      python3-setuptools
87      systemd
88      wget
89
90build-meson:
91  stage: build
92  image: $UBUNTU_IMAGE
93  script:
94    # Install meson
95    - wget -q https://github.com/mesonbuild/meson/releases/download/0.50.0/meson-0.50.0.tar.gz
96    - tar -xf meson-0.50.0.tar.gz
97    - cd meson-0.50.0
98    - python3 setup.py install
99    - cd ..
100    # Do the actual build
101    - meson build --werror
102    - cd build
103    - ninja
104    - ulimit -c 0 # don't dump core files on tests that are supposed to assert
105    - ninja test
106    - ninja test-daemon
107    - ninja dist
108  artifacts:
109    paths:
110      - build/
111