include: - project: 'steam/steam-ci-pipeline' file: '/steam-gitlab-ci-common.yml' - project: 'steam/steam-ci-pipeline' file: '/steam-gitlab-ci-pipeline.yml' variables: BUILD_IMAGE: registry.gitlab.steamos.cloud/steamrt/scout/sdk:beta STEAM_CI_USE_BINARIES_FROM: autopkgtest STEAM_CI_DEPENDENCIES: >- debhelper glslang-tools gtk-doc-tools libegl1-mesa-dev libgl1-mesa-dev libgles2-mesa-dev libglib2.0-dev libjson-glib-dev libtheora-dev libva-dev libvdpau-dev libvulkan-dev libx11-dev libxau-dev libxcb1-dev libxcomposite-dev locales meson pandoc python3 python3.5 zlib1g # Set non-empty to require CI_NEED_NEWER_STEAM_RUNTIME_TOOLS: '' DEBIAN_FRONTEND: noninteractive SCOUT_DOCKER_REGISTRY: registry.gitlab.steamos.cloud SCOUT_DOCKER_IMAGE: steamrt/scout/sdk:beta SCOUT_APT_SOURCES_FILE: '' DEVEL_DOCKER_REGISTRY: '' DEVEL_DOCKER_IMAGE: '' # Set non-empty to allow CI_ALLOW_MISSING_SOURCES: '' STEAM_RUNTIME_TOOLS_GIT_REPO: https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.steamos.cloud/steam/steam-runtime-tools.git STEAM_RUNTIME_TOOLS_GIT_BRANCH: master build:devel: stage: build tags: - docker - linux rules: - if: '$DEVEL_DOCKER_REGISTRY != "" && $DEVEL_DOCKER_IMAGE != ""' image: "${DEVEL_DOCKER_REGISTRY}/${DEVEL_DOCKER_IMAGE}" script: - | set -eux apt-get -y --no-install-recommends install \ clang \ clang-tools \ ${NULL+} git clone \ -b${STEAM_RUNTIME_TOOLS_GIT_BRANCH} \ ${STEAM_RUNTIME_TOOLS_GIT_REPO} \ subprojects/steam-runtime-tools meson --werror -Dman=true _build ninja -C _build ninja -C _build install meson test --verbose -C _build --suite pressure-vessel export CC=clang export CXX=clang++ rm -fr _build meson \ -Db_lundef=false \ -Db_sanitize=address,undefined \ --werror \ _build ninja -C _build ninja -C _build scan-build ninja -C _build install meson test --verbose -C _build --suite pressure-vessel build:scout: stage: build tags: - docker - linux image: "${SCOUT_DOCKER_REGISTRY}/${SCOUT_DOCKER_IMAGE}" script: - | set -eux if [ -n "${SCOUT_APT_SOURCES_FILE}" ]; then cp "${SCOUT_APT_SOURCES_FILE}" /etc/apt/sources.list echo >> /etc/apt/sources.list if [ -n "${STEAM_CI_EXTRA_APT_SOURCES-}" ]; then echo "${STEAM_CI_EXTRA_APT_SOURCES}" | while read -r first rest; do if [ "x$first" = xboth ]; then echo "deb $rest" >> /etc/apt/sources.list echo "deb-src $rest" >> /etc/apt/sources.list else echo "$first $rest" >> /etc/apt/sources.list fi done fi apt-get -y update fi # We need up-to-date packages for the relocatable install to # be able to get its source code apt-get -y dist-upgrade apt-get -y --no-install-recommends install \ bubblewrap \ libcapsule0 \ libcapsule-tools-relocatable:amd64 \ libcapsule-tools-relocatable:i386 \ libglib2.0-dev \ libxau-dev \ meson \ ${NULL+} if [ -n "$CI_NEED_NEWER_STEAM_RUNTIME_TOOLS" ]; then git clone \ -b${STEAM_RUNTIME_TOOLS_GIT_BRANCH} \ ${STEAM_RUNTIME_TOOLS_GIT_REPO} \ subprojects/steam-runtime-tools else apt-get -y --no-install-recommends install \ libsteam-runtime-tools-0-dev \ libsteam-runtime-tools-0-helpers:amd64 \ libsteam-runtime-tools-0-helpers:i386 \ steam-runtime-tools-bin ${NULL+} fi # g++ 4.6 is too old for the submodule (see also debian/rules) export CXX=g++-4.8 meson \ --prefix="$(pwd)/_build/prefix" \ -Dsrcdir=src \ --werror \ _build ninja -C _build meson test --verbose -C _build ninja -C _build install # We can only build the relocatable installation if the # system copy of steam-runtime-tools is new enough. if [ -z "$CI_NEED_NEWER_STEAM_RUNTIME_TOOLS" ]; then rm -fr _build/relocatable-install _build/prefix/bin/pressure-vessel-build-relocatable-install \ --output _build/relocatable-install \ --archive "$(pwd)/_build" \ ${CI_ALLOW_MISSING_SOURCES:+--allow-missing-sources} \ ${NULL+} prove -epython3.5 -v ./tests/relocatable-install.py :: \ "$(pwd)/_build/relocatable-install" fi artifacts: paths: - _build/pressure-vessel-*-bin.tar.gz - _build/pressure-vessel-*-bin+src.tar.gz # These packaging-oriented jobs need a suitable steam-runtime-tools version # available via apt build: rules: - if: '$CI_NEED_NEWER_STEAM_RUNTIME_TOOLS == ""' autopkgtest: variables: STEAM_CI_INSTALL_SCRIPT: | # We need up-to-date packages for the relocatable install to # be able to get its source code apt-get -y dist-upgrade rules: - if: '$CI_NEED_NEWER_STEAM_RUNTIME_TOOLS == ""' # vim:set sw=4 sts=4 et: