2020-03-18 16:42:27 +00:00
|
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
# SPDX-FileCopyrightText: 2018-2020 Collabora, Ltd. and the Monado contributors
|
|
|
|
|
2019-03-19 08:04:39 +00:00
|
|
|
variables:
|
2020-04-27 22:49:46 +00:00
|
|
|
FDO_UPSTREAM_REPO: monado/monado
|
2019-04-09 16:07:14 +00:00
|
|
|
|
2020-04-27 22:49:46 +00:00
|
|
|
.templates_sha: &templates_sha 322bf2b8f29b6491caeb13861201e96969ddc169
|
|
|
|
|
2020-05-11 16:16:32 +00:00
|
|
|
.package_only_branch: &package_only_branch master
|
|
|
|
|
2020-05-06 17:59:27 +00:00
|
|
|
# Variables listing packages for Debian-based distros
|
2020-05-11 16:16:32 +00:00
|
|
|
.monado.variables.debian-based-packages:
|
2020-05-06 17:59:27 +00:00
|
|
|
variables:
|
2020-05-06 22:31:36 +00:00
|
|
|
CORE_REQUIRED_PACKAGES: "build-essential git wget unzip cmake meson ninja-build libeigen3-dev curl patch python3 pkg-config libx11-dev libx11-xcb-dev libxxf86vm-dev libxrandr-dev libxcb-randr0-dev libvulkan-dev glslang-tools libglvnd-dev libgl1-mesa-dev ca-certificates libusb-1.0-0-dev libudev-dev"
|
2020-05-06 17:59:27 +00:00
|
|
|
FEATURE_PACKAGES: "libhidapi-dev libwayland-dev libuvc-dev libavcodec-dev libopencv-dev libv4l-dev libcjson-dev libsdl2-dev libegl1-mesa-dev"
|
2020-05-11 16:16:32 +00:00
|
|
|
PACKAGING_PACKAGES: "devscripts debhelper osc osc-plugins-dput dput-ng gettext-base"
|
2020-05-06 17:59:27 +00:00
|
|
|
TOOLS_REQUIRED_PACKAGES: "clang-format-7 codespell doxygen graphviz python3-pip python3-click"
|
|
|
|
|
2020-04-27 22:49:46 +00:00
|
|
|
# Variables for build and usage of Debian 10 (Buster) image
|
2020-05-11 16:16:32 +00:00
|
|
|
.monado.variables.debian:buster:
|
2020-04-27 22:49:46 +00:00
|
|
|
variables:
|
|
|
|
FDO_DISTRIBUTION_VERSION: buster
|
2020-05-11 16:16:32 +00:00
|
|
|
FDO_DISTRIBUTION_TAG: "2020-05-11.0"
|
2020-04-27 22:49:46 +00:00
|
|
|
|
2020-05-06 22:27:14 +00:00
|
|
|
# Variables for build and usage of Ubuntu 20.04 LTS (Focal) image
|
2020-05-11 16:16:32 +00:00
|
|
|
.monado.variables.ubuntu:focal:
|
2020-05-06 22:27:14 +00:00
|
|
|
variables:
|
|
|
|
FDO_DISTRIBUTION_VERSION: "20.04"
|
2020-05-11 16:16:32 +00:00
|
|
|
FDO_DISTRIBUTION_TAG: "2020-05-11.1"
|
2020-05-06 22:27:14 +00:00
|
|
|
|
2020-04-28 16:48:59 +00:00
|
|
|
# Variables for build and usage of Debian 10 (Buster) + Android NDK image
|
2020-05-11 16:16:32 +00:00
|
|
|
.monado.variables.debian:buster-ndk:
|
2020-04-28 16:48:59 +00:00
|
|
|
variables:
|
|
|
|
FDO_DISTRIBUTION_VERSION: buster
|
2020-05-06 17:59:27 +00:00
|
|
|
FDO_DISTRIBUTION_TAG: "2020-05-06.0"
|
2020-04-28 16:48:59 +00:00
|
|
|
FDO_REPO_SUFFIX: ndk
|
|
|
|
|
2020-04-27 22:49:46 +00:00
|
|
|
# Variables for build and usage of Arch Linux image
|
2020-05-11 16:16:32 +00:00
|
|
|
.monado.variables.arch:rolling:
|
2020-04-27 22:49:46 +00:00
|
|
|
variables:
|
2020-05-12 16:49:21 +00:00
|
|
|
FDO_DISTRIBUTION_TAG: "2020-05-12.0"
|
2020-04-27 22:49:46 +00:00
|
|
|
|
2019-03-19 08:04:39 +00:00
|
|
|
include:
|
2020-04-27 22:49:46 +00:00
|
|
|
- project: "freedesktop/ci-templates"
|
|
|
|
ref: *templates_sha
|
2020-03-23 20:33:57 +00:00
|
|
|
file: "/templates/debian.yml"
|
2020-05-06 22:27:14 +00:00
|
|
|
- project: "freedesktop/ci-templates"
|
|
|
|
ref: *templates_sha
|
|
|
|
file: "/templates/ubuntu.yml"
|
2020-04-27 22:49:46 +00:00
|
|
|
- project: "freedesktop/ci-templates"
|
|
|
|
ref: *templates_sha
|
2020-03-23 20:33:57 +00:00
|
|
|
file: "/templates/arch.yml"
|
2019-03-19 08:04:39 +00:00
|
|
|
|
|
|
|
stages:
|
|
|
|
- container_prep
|
|
|
|
- build
|
2020-05-07 16:25:42 +00:00
|
|
|
- package
|
2020-05-11 16:16:32 +00:00
|
|
|
- reprepro
|
2019-08-23 14:42:41 +00:00
|
|
|
- pages
|
2019-08-23 14:07:49 +00:00
|
|
|
- deploy
|
2019-03-19 08:04:39 +00:00
|
|
|
|
2020-04-27 22:49:46 +00:00
|
|
|
###
|
|
|
|
# Container prep jobs
|
|
|
|
|
|
|
|
# Base for all container prep
|
2020-05-11 16:16:32 +00:00
|
|
|
.monado.variables.container-prep-base:
|
2020-04-27 22:49:46 +00:00
|
|
|
# "stage" set here doesn't work, for some reason
|
|
|
|
variables:
|
|
|
|
# no need to pull the whole tree for rebuilding the image - is this still needed?
|
|
|
|
GIT_STRATEGY: none
|
2020-05-11 16:16:32 +00:00
|
|
|
# Each most-derived container prep job has a script to set up stuff for it.
|
2020-05-28 19:29:34 +00:00
|
|
|
FDO_DISTRIBUTION_EXEC: "bash .gitlab-ci/$(echo ${CI_JOB_NAME} | sed 's/:/_/g').sh"
|
2020-04-27 22:49:46 +00:00
|
|
|
|
2020-04-27 22:50:56 +00:00
|
|
|
# Debian Buster (x64 + i386)
|
2019-04-09 16:07:14 +00:00
|
|
|
debian:container_prep:
|
2019-03-19 08:04:39 +00:00
|
|
|
stage: container_prep
|
2020-04-27 22:49:46 +00:00
|
|
|
extends:
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.variables.debian:buster
|
|
|
|
- .monado.variables.container-prep-base
|
|
|
|
- .monado.variables.debian-based-packages
|
2020-04-27 22:49:46 +00:00
|
|
|
- .fdo.container-build@debian # from ci-templates
|
2019-12-03 15:15:33 +00:00
|
|
|
variables:
|
2020-05-11 16:16:32 +00:00
|
|
|
# a list of packages to install - assembled from .monado.variables.debian-based-packages, plus reprepro
|
|
|
|
FDO_DISTRIBUTION_PACKAGES: "${CORE_REQUIRED_PACKAGES} ${FEATURE_PACKAGES} ${PACKAGING_PACKAGES} ${TOOLS_REQUIRED_PACKAGES} reprepro"
|
2019-03-19 08:04:39 +00:00
|
|
|
|
2020-04-27 22:49:46 +00:00
|
|
|
# Arch Linux (x64)
|
2019-04-09 16:07:14 +00:00
|
|
|
arch:container_prep:
|
|
|
|
stage: container_prep
|
2020-04-27 22:49:46 +00:00
|
|
|
extends:
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.variables.arch:rolling
|
|
|
|
- .monado.variables.container-prep-base
|
2020-04-27 22:49:46 +00:00
|
|
|
- .fdo.container-build@arch # from ci-templates
|
2019-12-03 15:15:33 +00:00
|
|
|
variables:
|
|
|
|
# a list of packages to install
|
2020-05-12 16:49:21 +00:00
|
|
|
FDO_DISTRIBUTION_PACKAGES: "git gcc clang cmake meson ninja pkgconfig python3 diffutils patch doxygen graphviz eigen hidapi libxrandr mesa glslang vulkan-headers vulkan-icd-loader check glfw-x11 libusb opencv gtk3 ffmpeg v4l-utils qt5-base"
|
2019-04-09 16:07:14 +00:00
|
|
|
|
2020-05-07 20:45:45 +00:00
|
|
|
# Ubuntu Focal (x64)
|
2020-05-06 22:27:14 +00:00
|
|
|
ubuntu:container_prep:
|
|
|
|
stage: container_prep
|
|
|
|
extends:
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.variables.ubuntu:focal
|
|
|
|
- .monado.variables.container-prep-base
|
|
|
|
- .monado.variables.debian-based-packages
|
2020-05-06 22:27:14 +00:00
|
|
|
- .fdo.container-build@ubuntu # from ci-templates
|
|
|
|
variables:
|
2020-05-11 16:16:32 +00:00
|
|
|
# a list of packages to install - assembled from .monado.variables.debian-based-packages
|
2020-05-07 20:45:45 +00:00
|
|
|
FDO_DISTRIBUTION_PACKAGES: "${CORE_REQUIRED_PACKAGES} ${FEATURE_PACKAGES} ${PACKAGING_PACKAGES} ${TOOLS_REQUIRED_PACKAGES}"
|
2020-05-06 22:27:14 +00:00
|
|
|
|
2020-04-28 16:48:59 +00:00
|
|
|
# Debian Buster + the Android NDK in /opt/android-ndk
|
|
|
|
# The NDK itself gets installed by .gitlab-ci/ndk:container_prep.sh
|
|
|
|
ndk:container_prep:
|
|
|
|
stage: container_prep
|
|
|
|
extends:
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.variables.debian:buster-ndk
|
|
|
|
- .monado.variables.container-prep-base
|
2020-04-28 16:48:59 +00:00
|
|
|
- .fdo.container-build@debian # from ci-templates
|
|
|
|
variables:
|
2020-05-11 16:16:32 +00:00
|
|
|
# Repo suffix is set in .monado.variables.debian:buster-ndk
|
2020-04-28 16:48:59 +00:00
|
|
|
# a list of packages to install
|
|
|
|
FDO_DISTRIBUTION_PACKAGES: "git wget unzip cmake meson ninja-build libeigen3-dev python3 pkg-config ca-certificates glslang-tools"
|
|
|
|
|
2020-05-11 16:16:32 +00:00
|
|
|
# Style check job
|
2019-06-18 16:27:12 +00:00
|
|
|
format-and-spellcheck:
|
2020-04-27 22:49:46 +00:00
|
|
|
extends:
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.variables.debian:buster
|
2020-04-27 22:49:46 +00:00
|
|
|
- .fdo.distribution-image@debian # from ci-templates
|
2019-06-18 16:27:12 +00:00
|
|
|
stage: build
|
|
|
|
script:
|
2020-03-23 20:33:57 +00:00
|
|
|
- scripts/format-and-spellcheck.sh
|
2019-06-18 16:27:12 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- patches/
|
|
|
|
expire_in: 1 week
|
|
|
|
when: on_failure
|
|
|
|
|
2020-04-27 22:49:46 +00:00
|
|
|
# "Base" job for a CMake build
|
2020-05-11 16:16:32 +00:00
|
|
|
.monado.base-job.build-cmake:
|
2019-04-09 16:07:14 +00:00
|
|
|
stage: build
|
|
|
|
script:
|
2020-03-23 20:33:57 +00:00
|
|
|
- mkdir build
|
|
|
|
- pushd build
|
2020-04-27 22:49:46 +00:00
|
|
|
- cmake -GNinja .. $CMAKE_ARGS
|
2020-05-12 16:45:49 +00:00
|
|
|
# List build options
|
|
|
|
- grep "^XRT_" CMakeCache.txt
|
2020-03-23 20:33:57 +00:00
|
|
|
- ninja
|
2020-06-15 15:58:48 +00:00
|
|
|
- ctest --output-on-failure
|
2019-09-24 14:13:11 +00:00
|
|
|
|
2020-04-27 22:49:46 +00:00
|
|
|
# "Base" job for a Meson build
|
2020-05-11 16:16:32 +00:00
|
|
|
.monado.base-job.build-meson:
|
2019-09-24 14:13:11 +00:00
|
|
|
stage: build
|
|
|
|
script:
|
2020-03-23 20:33:57 +00:00
|
|
|
- mkdir build
|
|
|
|
- pushd build
|
2020-04-27 22:49:46 +00:00
|
|
|
- meson .. $MESON_ARGS
|
2020-03-23 20:33:57 +00:00
|
|
|
- ninja
|
2019-09-24 14:13:11 +00:00
|
|
|
|
2020-04-27 22:49:46 +00:00
|
|
|
debian:cmake:
|
|
|
|
extends:
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.variables.debian:buster
|
2020-04-27 22:49:46 +00:00
|
|
|
- .fdo.distribution-image@debian # from ci-templates
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.base-job.build-cmake
|
2020-04-27 22:49:46 +00:00
|
|
|
before_script:
|
|
|
|
# Generate "changes since last release" and add to changelog,
|
|
|
|
# since this is the build that makes our docs.
|
2020-03-23 20:33:57 +00:00
|
|
|
- pip3 install proclamation
|
|
|
|
- pushd doc/changes
|
|
|
|
- proclamation build --overwrite vNEXT
|
|
|
|
- popd
|
2019-08-23 14:07:49 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- build/doc/html/
|
2019-04-09 16:07:14 +00:00
|
|
|
|
2020-04-28 16:15:34 +00:00
|
|
|
debian:cmake-no-opencv:
|
|
|
|
extends:
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.variables.debian:buster
|
2020-04-28 16:15:34 +00:00
|
|
|
- .fdo.distribution-image@debian # from ci-templates
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.base-job.build-cmake
|
2020-04-28 16:15:34 +00:00
|
|
|
variables:
|
2020-04-29 23:11:43 +00:00
|
|
|
CMAKE_ARGS: -DXRT_HAVE_OPENCV=OFF
|
2020-04-28 16:15:34 +00:00
|
|
|
|
|
|
|
debian:cmake-no-opengl:
|
|
|
|
extends:
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.variables.debian:buster
|
2020-04-28 16:15:34 +00:00
|
|
|
- .fdo.distribution-image@debian # from ci-templates
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.base-job.build-cmake
|
2020-04-28 16:15:34 +00:00
|
|
|
variables:
|
2020-04-29 23:11:43 +00:00
|
|
|
CMAKE_ARGS: -DXRT_HAVE_OPENGL=OFF
|
2020-04-28 16:15:34 +00:00
|
|
|
|
|
|
|
debian:cmake-no-sdl2:
|
|
|
|
extends:
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.variables.debian:buster
|
2020-04-28 16:15:34 +00:00
|
|
|
- .fdo.distribution-image@debian # from ci-templates
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.base-job.build-cmake
|
2020-04-28 16:15:34 +00:00
|
|
|
variables:
|
2020-04-29 23:11:43 +00:00
|
|
|
CMAKE_ARGS: -DXRT_HAVE_SDL2=OFF
|
2020-04-28 16:15:34 +00:00
|
|
|
|
2020-04-29 23:18:36 +00:00
|
|
|
debian:cmake-no-service:
|
|
|
|
extends:
|
|
|
|
- .monado.variables.debian:buster
|
|
|
|
- .fdo.distribution-image@debian # from ci-templates
|
|
|
|
- .monado.base-job.build-cmake
|
|
|
|
variables:
|
2020-04-29 23:11:43 +00:00
|
|
|
CMAKE_ARGS: -DXRT_FEATURE_SERVICE=OFF
|
2020-04-29 23:18:36 +00:00
|
|
|
|
2020-04-27 22:49:46 +00:00
|
|
|
arch:cmake:
|
|
|
|
extends:
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.variables.arch:rolling
|
2020-04-27 22:49:46 +00:00
|
|
|
- .fdo.distribution-image@arch # from ci-templates
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.base-job.build-cmake
|
2020-04-27 22:49:46 +00:00
|
|
|
|
2020-05-12 16:49:21 +00:00
|
|
|
arch:cmake:clang:
|
|
|
|
extends:
|
|
|
|
- .monado.variables.arch:rolling
|
|
|
|
- .fdo.distribution-image@arch # from ci-templates
|
|
|
|
- .monado.base-job.build-cmake
|
|
|
|
variables:
|
|
|
|
CMAKE_ARGS: -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++
|
|
|
|
|
2020-05-06 22:27:14 +00:00
|
|
|
ubuntu:cmake:
|
|
|
|
extends:
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.variables.ubuntu:focal
|
2020-05-06 22:27:14 +00:00
|
|
|
- .fdo.distribution-image@ubuntu # from ci-templates
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.base-job.build-cmake
|
2020-05-06 22:27:14 +00:00
|
|
|
|
2020-04-27 22:49:46 +00:00
|
|
|
debian:meson:
|
|
|
|
extends:
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.variables.debian:buster
|
2020-04-27 22:49:46 +00:00
|
|
|
- .fdo.distribution-image@debian # from ci-templates
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.base-job.build-meson
|
2020-04-27 22:49:46 +00:00
|
|
|
|
2020-05-06 22:27:14 +00:00
|
|
|
ubuntu:meson:
|
|
|
|
extends:
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.variables.ubuntu:focal
|
2020-05-06 22:27:14 +00:00
|
|
|
- .fdo.distribution-image@ubuntu # from ci-templates
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.base-job.build-meson
|
2020-05-06 22:27:14 +00:00
|
|
|
|
2020-04-27 22:49:46 +00:00
|
|
|
arch:meson:
|
|
|
|
extends:
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.variables.arch:rolling
|
2020-04-27 22:49:46 +00:00
|
|
|
- .fdo.distribution-image@arch # from ci-templates
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.base-job.build-meson
|
2020-04-27 22:49:46 +00:00
|
|
|
variables:
|
|
|
|
MESON_ARGS: -Ddocs=disabled
|
2019-08-23 14:07:49 +00:00
|
|
|
|
2020-04-27 22:50:56 +00:00
|
|
|
# Cross-compiling
|
|
|
|
debian:meson:32bit:
|
|
|
|
extends:
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.variables.debian:buster
|
2020-04-27 22:50:56 +00:00
|
|
|
- .fdo.distribution-image@debian # from ci-templates
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.base-job.build-meson
|
2020-04-27 22:50:56 +00:00
|
|
|
variables:
|
|
|
|
MESON_ARGS: --prefix /usr --libdir /usr/lib/i386-linux-gnu --cross-file ../.gitlab-ci/i386-cross.txt
|
|
|
|
|
|
|
|
debian:cmake:32bit:
|
|
|
|
extends:
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.variables.debian:buster
|
2020-04-27 22:50:56 +00:00
|
|
|
- .fdo.distribution-image@debian # from ci-templates
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.base-job.build-cmake
|
2020-04-27 22:50:56 +00:00
|
|
|
variables:
|
|
|
|
# OpenCV and local OpenHMD doesn't play nicely with us in multi-arch.
|
2020-04-29 23:11:43 +00:00
|
|
|
CMAKE_ARGS: -DCMAKE_TOOLCHAIN_FILE=../.gitlab-ci/i386.cmake -DXRT_HAVE_OPENCV=off -DXRT_BUILD_DRIVER_OHMD=off
|
2020-04-27 22:50:56 +00:00
|
|
|
|
2020-05-07 16:25:42 +00:00
|
|
|
# Packaging
|
2020-05-11 16:16:32 +00:00
|
|
|
.monado.base-job.debuild:
|
2020-05-07 20:45:45 +00:00
|
|
|
stage: package
|
2020-05-07 16:25:42 +00:00
|
|
|
only:
|
2020-05-11 16:16:32 +00:00
|
|
|
- *package_only_branch
|
2020-05-08 23:10:54 +00:00
|
|
|
before_script:
|
2020-05-11 16:16:32 +00:00
|
|
|
# Configure git - needed despite not actually committing here.
|
|
|
|
- git config --global user.email "ryan.pavlik@collabora.com"
|
|
|
|
- git config --global user.name "Monado CI"
|
2020-05-07 16:25:42 +00:00
|
|
|
script:
|
2020-05-08 23:10:54 +00:00
|
|
|
# Prep the source tree
|
2020-05-08 20:34:39 +00:00
|
|
|
- git clean -dfx
|
2020-05-07 16:25:42 +00:00
|
|
|
- git merge origin/${PACKAGE_BRANCH} --no-commit
|
|
|
|
- FULLNAME="Monado CI <ryan.pavlik@collabora.com>" debian/extra/prepare-commit-package.sh ${CI_COMMIT_SHA} 1~${BACKPORT_SUFFIX}~ci$(date --utc "+%Y%m%d")
|
2020-05-08 23:10:54 +00:00
|
|
|
# Build the package
|
2020-05-07 16:25:42 +00:00
|
|
|
- debuild -uc -us
|
2020-05-11 16:16:32 +00:00
|
|
|
# Use dput-ng to move the package-related files into some artifacts.
|
|
|
|
- export INCOMING=$(pwd)/incoming
|
|
|
|
- mkdir -p $INCOMING
|
|
|
|
- mkdir -p ~/.dput.d/profiles
|
|
|
|
- cat .gitlab-ci/localhost.json | envsubst > ~/.dput.d/profiles/localhost.json
|
|
|
|
- dpkg-parsechangelog --show-field version > incoming/${DISTRO}.distro
|
|
|
|
- dput --debug localhost ../monado_$(dpkg-parsechangelog --show-field version)_amd64.changes
|
2020-05-07 16:25:42 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2020-05-11 16:16:32 +00:00
|
|
|
- "incoming/"
|
|
|
|
expire_in: 2 days
|
2020-05-07 16:25:42 +00:00
|
|
|
|
2020-05-07 20:45:45 +00:00
|
|
|
debian:buster:package:
|
|
|
|
extends:
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.variables.debian:buster
|
2020-05-07 20:45:45 +00:00
|
|
|
- .fdo.distribution-image@debian # from ci-templates
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.base-job.debuild
|
2020-05-07 20:45:45 +00:00
|
|
|
variables:
|
|
|
|
BACKPORT_SUFFIX: bpo10
|
|
|
|
PACKAGE_BRANCH: debian/buster-backports
|
|
|
|
DISTRO: buster
|
|
|
|
|
|
|
|
ubuntu:focal:package:
|
|
|
|
extends:
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.variables.ubuntu:focal
|
2020-05-07 20:45:45 +00:00
|
|
|
- .fdo.distribution-image@ubuntu # from ci-templates
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.base-job.debuild
|
2020-05-07 20:45:45 +00:00
|
|
|
variables:
|
|
|
|
BACKPORT_SUFFIX: ubuntu20.04
|
|
|
|
PACKAGE_BRANCH: ubuntu/focal
|
|
|
|
DISTRO: focal
|
|
|
|
|
2020-05-11 16:16:32 +00:00
|
|
|
reprepro:package:
|
|
|
|
stage: reprepro
|
|
|
|
only:
|
|
|
|
- *package_only_branch
|
|
|
|
extends:
|
|
|
|
- .monado.variables.debian:buster
|
|
|
|
- .fdo.distribution-image@debian # from ci-templates
|
|
|
|
dependencies:
|
|
|
|
- debian:buster:package
|
|
|
|
- ubuntu:focal:package
|
|
|
|
before_script:
|
|
|
|
# Convince gnupg to work properly in CI
|
|
|
|
- mkdir -p ~/.gnupg && chmod 700 ~/.gnupg
|
|
|
|
- touch ~/.gnupg/gpg.conf
|
|
|
|
- echo 'use-agent' > ~/.gnupg/gpg.conf
|
|
|
|
- echo 'pinentry-mode loopback' >> ~/.gnupg/gpg.conf
|
|
|
|
- touch ~/.gnupg/gpg-agent.conf
|
|
|
|
- echo 'allow-loopback-pinentry' > ~/.gnupg/gpg-agent.conf
|
|
|
|
- echo RELOADAGENT | gpg-connect-agent
|
|
|
|
- gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE} --import ${MONADO_GPG_SECRET_KEY}
|
|
|
|
|
|
|
|
script:
|
|
|
|
# Use reprepro to create an apt repository in our artifacts
|
|
|
|
- mkdir -p repo/conf
|
|
|
|
# For each distro, sign the changes file and add it to the repo.
|
|
|
|
- |
|
|
|
|
for fn in incoming/*.distro; do
|
|
|
|
# parse the distro name out
|
|
|
|
export DISTRO=$(echo $fn | sed -e 's:incoming/::' -e 's:[.]distro::')
|
|
|
|
echo "Processing $DISTRO"
|
|
|
|
# add distro to repository config - blank line is mandatory!
|
|
|
|
cat .gitlab-ci/distributions | envsubst >> repo/conf/distributions
|
|
|
|
echo >> repo/conf/distributions
|
|
|
|
|
|
|
|
echo "Signing package for $DISTRO"
|
|
|
|
debsign -k ${MONADO_GPG_FINGERPRINT} -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE}" incoming/monado_$(cat $fn)_amd64.changes
|
|
|
|
|
|
|
|
echo "Adding package for $DISTRO to the repository"
|
|
|
|
reprepro -V --ignore=wrongdistribution -b repo include ${DISTRO} incoming/monado_$(cat $fn)_amd64.changes
|
|
|
|
done
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- "repo/"
|
|
|
|
expire_in: 2 days
|
|
|
|
|
2020-04-28 16:48:59 +00:00
|
|
|
# Base of Android NDK builds.
|
|
|
|
# Takes the last :-delimited part of the name as the ABI to build for,
|
|
|
|
# so you don't need to do anything other than "extends" in the job
|
|
|
|
.monado.ndk:build-base:
|
|
|
|
stage: build
|
|
|
|
extends:
|
2020-05-11 16:16:32 +00:00
|
|
|
- .monado.variables.debian:buster-ndk
|
2020-04-28 16:48:59 +00:00
|
|
|
- .fdo.suffixed-image@debian # from ci-templates
|
|
|
|
variables:
|
|
|
|
ANDROID_PLATFORM: 24
|
|
|
|
script:
|
|
|
|
- mkdir build
|
|
|
|
- pushd build
|
|
|
|
# This extracts the ABI from the job name
|
|
|
|
- export ABI=$(echo $CI_JOB_NAME | cut --delimiter=":" -f 2)
|
|
|
|
# Note we are pointing CMake to the host install of Eigen3 because it's header-only
|
|
|
|
# and thus this is safe to do.
|
|
|
|
- cmake -GNinja .. -DANDROID_PLATFORM=$ANDROID_PLATFORM -DANDROID_ABI=$ABI -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk/build/cmake/android.toolchain.cmake -DEigen3_DIR=/usr/lib/cmake/eigen3/
|
2020-05-12 16:45:49 +00:00
|
|
|
- grep "^XRT_" CMakeCache.txt
|
2020-04-28 16:48:59 +00:00
|
|
|
- ninja
|
|
|
|
|
|
|
|
ndk:armeabi-v7a:
|
|
|
|
extends: .monado.ndk:build-base
|
|
|
|
|
|
|
|
ndk:arm64-v8a:
|
|
|
|
extends: .monado.ndk:build-base
|
|
|
|
|
2019-08-23 14:07:49 +00:00
|
|
|
###
|
|
|
|
# Pages
|
|
|
|
###
|
|
|
|
pages:
|
2019-08-23 14:42:41 +00:00
|
|
|
stage: pages
|
2019-08-23 14:11:25 +00:00
|
|
|
only:
|
|
|
|
- master
|
2019-08-23 14:07:49 +00:00
|
|
|
dependencies:
|
2020-04-27 22:49:46 +00:00
|
|
|
- debian:cmake
|
2020-05-11 16:16:32 +00:00
|
|
|
- reprepro:package
|
2019-08-23 14:07:49 +00:00
|
|
|
script:
|
2019-09-22 14:59:17 +00:00
|
|
|
- mkdir -p public
|
|
|
|
- mv build/doc/html/* public/
|
2020-05-11 16:16:32 +00:00
|
|
|
- mv repo public/apt
|
2019-08-23 14:07:49 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public
|