153a5a1b3Sopenharmony_ci# The build has two stages. The 'container' stage is used to build a Docker 253a5a1b3Sopenharmony_ci# container and push it to the project's container registry on fd.o GitLab. 353a5a1b3Sopenharmony_ci# This step is only run when the tag for the container changes, else it is 453a5a1b3Sopenharmony_ci# effectively a no-op. All of this infrastructure is inherited from the 553a5a1b3Sopenharmony_ci# wayland/ci-templates repository which is the recommended way to set up CI 653a5a1b3Sopenharmony_ci# infrastructure on fd.o GitLab. 753a5a1b3Sopenharmony_ci# 853a5a1b3Sopenharmony_ci# Once the container stage is done, we move on to the 'build' stage where we 953a5a1b3Sopenharmony_ci# run meson build. Currently, tests are also run as part of the build stage as 1053a5a1b3Sopenharmony_ci# there doesn't seem to be significant value to splitting the stages at the 1153a5a1b3Sopenharmony_ci# moment. 1253a5a1b3Sopenharmony_ci 1353a5a1b3Sopenharmony_cistages: 1453a5a1b3Sopenharmony_ci - container 1553a5a1b3Sopenharmony_ci - build 1653a5a1b3Sopenharmony_ci 1753a5a1b3Sopenharmony_civariables: 1853a5a1b3Sopenharmony_ci # Update this tag when you want to trigger a rebuild the container in which 1953a5a1b3Sopenharmony_ci # CI runs, for example when adding new packages to FDO_DISTRIBUTION_PACKAGES. 2053a5a1b3Sopenharmony_ci # The tag is an arbitrary string that identifies the exact container 2153a5a1b3Sopenharmony_ci # contents. 2253a5a1b3Sopenharmony_ci FDO_DISTRIBUTION_TAG: '2021-11-03-00' 2353a5a1b3Sopenharmony_ci FDO_DISTRIBUTION_VERSION: '20.04' 2453a5a1b3Sopenharmony_ci FDO_UPSTREAM_REPO: 'pulseaudio/pulseaudio' 2553a5a1b3Sopenharmony_ci UBUNTU_IMAGE: "$CI_REGISTRY_IMAGE/ubuntu/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG" 2653a5a1b3Sopenharmony_ci 2753a5a1b3Sopenharmony_ciinclude: 2853a5a1b3Sopenharmony_ci # We pull templates from master to avoid the overhead of periodically 2953a5a1b3Sopenharmony_ci # scanning for changes upstream. This does means builds might occasionally 3053a5a1b3Sopenharmony_ci # break due to upstream changing things, so if you see unexpected build 3153a5a1b3Sopenharmony_ci # failures, this might be one cause. 3253a5a1b3Sopenharmony_ci - project: 'wayland/ci-templates' 3353a5a1b3Sopenharmony_ci ref: 'master' 3453a5a1b3Sopenharmony_ci file: '/templates/ubuntu.yml' 3553a5a1b3Sopenharmony_ci 3653a5a1b3Sopenharmony_cibuild-container: 3753a5a1b3Sopenharmony_ci extends: .fdo.container-ifnot-exists@ubuntu 3853a5a1b3Sopenharmony_ci stage: container 3953a5a1b3Sopenharmony_ci variables: 4053a5a1b3Sopenharmony_ci GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image 4153a5a1b3Sopenharmony_ci 4253a5a1b3Sopenharmony_ci # Remember to update FDO_DISTRIBUTION_TAG when modifying this package list! 4353a5a1b3Sopenharmony_ci # Otherwise the changes won't have effect since an old container image will 4453a5a1b3Sopenharmony_ci # be used. 4553a5a1b3Sopenharmony_ci FDO_DISTRIBUTION_PACKAGES: >- 4653a5a1b3Sopenharmony_ci autopoint 4753a5a1b3Sopenharmony_ci bash-completion 4853a5a1b3Sopenharmony_ci check 4953a5a1b3Sopenharmony_ci curl 5053a5a1b3Sopenharmony_ci dbus-x11 5153a5a1b3Sopenharmony_ci g++ 5253a5a1b3Sopenharmony_ci gcc 5353a5a1b3Sopenharmony_ci gettext 5453a5a1b3Sopenharmony_ci git-core 5553a5a1b3Sopenharmony_ci libasound2-dev 5653a5a1b3Sopenharmony_ci libasyncns-dev 5753a5a1b3Sopenharmony_ci libavahi-client-dev 5853a5a1b3Sopenharmony_ci libbluetooth-dev 5953a5a1b3Sopenharmony_ci libcap-dev 6053a5a1b3Sopenharmony_ci libfftw3-dev 6153a5a1b3Sopenharmony_ci libglib2.0-dev 6253a5a1b3Sopenharmony_ci libgtk-3-dev 6353a5a1b3Sopenharmony_ci libice-dev 6453a5a1b3Sopenharmony_ci libjack-dev 6553a5a1b3Sopenharmony_ci liblircclient-dev 6653a5a1b3Sopenharmony_ci libltdl-dev 6753a5a1b3Sopenharmony_ci liborc-0.4-dev 6853a5a1b3Sopenharmony_ci libsbc-dev 6953a5a1b3Sopenharmony_ci libsndfile1-dev 7053a5a1b3Sopenharmony_ci libsoxr-dev 7153a5a1b3Sopenharmony_ci libspeexdsp-dev 7253a5a1b3Sopenharmony_ci libssl-dev 7353a5a1b3Sopenharmony_ci libsystemd-dev 7453a5a1b3Sopenharmony_ci libtdb-dev 7553a5a1b3Sopenharmony_ci libudev-dev 7653a5a1b3Sopenharmony_ci libwebrtc-audio-processing-dev 7753a5a1b3Sopenharmony_ci libwrap0-dev 7853a5a1b3Sopenharmony_ci libx11-xcb-dev 7953a5a1b3Sopenharmony_ci libxcb1-dev 8053a5a1b3Sopenharmony_ci libxml-parser-perl 8153a5a1b3Sopenharmony_ci libxml2-utils 8253a5a1b3Sopenharmony_ci libxtst-dev 8353a5a1b3Sopenharmony_ci m4 8453a5a1b3Sopenharmony_ci ninja-build 8553a5a1b3Sopenharmony_ci pkg-config 8653a5a1b3Sopenharmony_ci python3-setuptools 8753a5a1b3Sopenharmony_ci systemd 8853a5a1b3Sopenharmony_ci wget 8953a5a1b3Sopenharmony_ci 9053a5a1b3Sopenharmony_cibuild-meson: 9153a5a1b3Sopenharmony_ci stage: build 9253a5a1b3Sopenharmony_ci image: $UBUNTU_IMAGE 9353a5a1b3Sopenharmony_ci script: 9453a5a1b3Sopenharmony_ci # Install meson 9553a5a1b3Sopenharmony_ci - wget -q https://github.com/mesonbuild/meson/releases/download/0.50.0/meson-0.50.0.tar.gz 9653a5a1b3Sopenharmony_ci - tar -xf meson-0.50.0.tar.gz 9753a5a1b3Sopenharmony_ci - cd meson-0.50.0 9853a5a1b3Sopenharmony_ci - python3 setup.py install 9953a5a1b3Sopenharmony_ci - cd .. 10053a5a1b3Sopenharmony_ci # Do the actual build 10153a5a1b3Sopenharmony_ci - meson build --werror 10253a5a1b3Sopenharmony_ci - cd build 10353a5a1b3Sopenharmony_ci - ninja 10453a5a1b3Sopenharmony_ci - ulimit -c 0 # don't dump core files on tests that are supposed to assert 10553a5a1b3Sopenharmony_ci - ninja test 10653a5a1b3Sopenharmony_ci - ninja test-daemon 10753a5a1b3Sopenharmony_ci - ninja dist 10853a5a1b3Sopenharmony_ci artifacts: 10953a5a1b3Sopenharmony_ci paths: 11053a5a1b3Sopenharmony_ci - build/ 111