mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-27 01:46:51 +00:00
ci: Try again: Switch to using ci-fairy templates
Also drops buster support.
This commit is contained in:
parent
856d2d39c8
commit
ad197771ae
708
.gitlab-ci.yml
708
.gitlab-ci.yml
|
@ -1,82 +1,68 @@
|
|||
# SPDX-License-Identifier: CC0-1.0
|
||||
# SPDX-FileCopyrightText: 2018-2021 Collabora, Ltd. and the Monado contributors
|
||||
# SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors
|
||||
|
||||
######################################
|
||||
# GENERATED - DO NOT EDIT #
|
||||
# see .gitlab-ci/ci.template instead #
|
||||
######################################
|
||||
|
||||
variables:
|
||||
FDO_UPSTREAM_REPO: monado/monado
|
||||
|
||||
.templates_sha: &templates_sha 14731f78c23c7b523a85a26a068ade9ac1ecd2f3
|
||||
|
||||
# Variables listing packages for Debian-based distros
|
||||
.monado.variables.debian-based-packages:
|
||||
variables:
|
||||
# Packages required for build and some other basic jobs
|
||||
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"
|
||||
|
||||
# These are optional packages, that we're building against to ensure we build as much code as possible
|
||||
FEATURE_PACKAGES: "libhidapi-dev libwayland-dev libuvc-dev libavcodec-dev libopencv-dev libv4l-dev libcjson-dev libsdl2-dev libegl1-mesa-dev libdbus-1-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libsystemd-dev libbsd-dev"
|
||||
|
||||
# Only used for building packages
|
||||
PACKAGING_PACKAGES: "devscripts debhelper dput-ng gettext-base pandoc"
|
||||
|
||||
# Used for ancillary "not compilation" jobs/features, like docs, changelogs, formatting, etc.
|
||||
TOOLS_REQUIRED_PACKAGES: "codespell doxygen graphviz python3-pip python3-click"
|
||||
|
||||
# The NDK builder uses only these packages
|
||||
NDK_PACKAGES: "git wget unzip cmake meson ninja-build libeigen3-dev python3 pkg-config ca-certificates glslang-tools"
|
||||
|
||||
# Variables for build and usage of Debian 10 (Buster) image
|
||||
.monado.variables.debian:buster:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: buster
|
||||
FDO_DISTRIBUTION_TAG: "2022-01-21.0"
|
||||
|
||||
# Variables for build and usage of Debian 11 (Bullseye) image
|
||||
.monado.variables.debian:bullseye:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: bullseye
|
||||
FDO_DISTRIBUTION_TAG: "2022-01-21.0"
|
||||
|
||||
# Variables for build and usage of Ubuntu 20.04 LTS (Focal) image
|
||||
.monado.variables.ubuntu:focal:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: "20.04"
|
||||
FDO_DISTRIBUTION_TAG: "2022-01-21.0"
|
||||
|
||||
# Variables for build and usage of Ubuntu 21.04 (Hirsute) image
|
||||
.monado.variables.ubuntu:hirsute:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: "21.04"
|
||||
FDO_DISTRIBUTION_TAG: "2022-01-21.0"
|
||||
|
||||
# Variables for build and usage of Ubuntu 21.10 (Impish) image
|
||||
.monado.variables.ubuntu:impish:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: "21.10"
|
||||
FDO_DISTRIBUTION_TAG: "2022-01-21.0"
|
||||
|
||||
# Variables for build and usage of Debian 10 (Buster) + Android NDK image
|
||||
.monado.variables.debian:buster-ndk:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: buster
|
||||
FDO_DISTRIBUTION_TAG: "2022-01-21.2"
|
||||
FDO_REPO_SUFFIX: ndk
|
||||
|
||||
# Variables for build and usage of Arch Linux image
|
||||
.monado.variables.arch:rolling:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_TAG: "2022-01-21.0"
|
||||
.templates_sha: &templates_sha 34039cd573a2df832d465bc9e4c5f543571f5241
|
||||
|
||||
include:
|
||||
# Debian
|
||||
- project: "freedesktop/ci-templates"
|
||||
ref: *templates_sha
|
||||
file: "/templates/debian.yml"
|
||||
# Ubuntu
|
||||
- project: "freedesktop/ci-templates"
|
||||
ref: *templates_sha
|
||||
file: "/templates/ubuntu.yml"
|
||||
# Arch
|
||||
- project: "freedesktop/ci-templates"
|
||||
ref: *templates_sha
|
||||
file: "/templates/arch.yml"
|
||||
|
||||
|
||||
# Variables for build and usage of Debian bullseye image
|
||||
.monado.variables.debian:bullseye:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: "bullseye"
|
||||
FDO_DISTRIBUTION_TAG: "2022-01-24.0"
|
||||
|
||||
# Variables for build and usage of Debian bullseye-ndk image
|
||||
.monado.variables.debian:bullseye-ndk:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: "bullseye"
|
||||
FDO_DISTRIBUTION_TAG: "2022-01-24.0"
|
||||
FDO_REPO_SUFFIX: ndk
|
||||
|
||||
# Variables for build and usage of Ubuntu focal image
|
||||
.monado.variables.ubuntu:focal:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: "20.04"
|
||||
FDO_DISTRIBUTION_TAG: "2022-01-24.0"
|
||||
|
||||
# Variables for build and usage of Ubuntu hirsute image
|
||||
.monado.variables.ubuntu:hirsute:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: "21.04"
|
||||
FDO_DISTRIBUTION_TAG: "2022-01-24.0"
|
||||
|
||||
# Variables for build and usage of Ubuntu impish image
|
||||
.monado.variables.ubuntu:impish:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: "21.10"
|
||||
FDO_DISTRIBUTION_TAG: "2022-01-24.0"
|
||||
|
||||
# Variables for build and usage of Arch rolling image
|
||||
.monado.variables.arch:rolling:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: "rolling"
|
||||
FDO_DISTRIBUTION_TAG: "2022-01-24.0"
|
||||
|
||||
stages:
|
||||
- container_prep
|
||||
- build
|
||||
|
@ -87,106 +73,112 @@ stages:
|
|||
|
||||
###
|
||||
# Container prep jobs
|
||||
|
||||
# Base for all container prep
|
||||
.monado.variables.container-prep-base:
|
||||
# "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
|
||||
# Each most-derived container prep job has a script to set up stuff for it.
|
||||
FDO_DISTRIBUTION_EXEC: "bash .gitlab-ci/$(echo ${CI_JOB_NAME} | sed 's/:/_/g').sh"
|
||||
|
||||
# Debian Buster (x64 + i386)
|
||||
debian:buster:container_prep:
|
||||
stage: container_prep
|
||||
extends:
|
||||
- .monado.variables.debian:buster
|
||||
- .monado.variables.container-prep-base
|
||||
- .monado.variables.debian-based-packages
|
||||
- .fdo.container-build@debian # from ci-templates
|
||||
variables:
|
||||
# a list of packages to install - assembled from .monado.variables.debian-based-packages, plus clang-format-7 (which we don't actually need anymore)
|
||||
FDO_DISTRIBUTION_PACKAGES: "${CORE_REQUIRED_PACKAGES} ${FEATURE_PACKAGES} ${PACKAGING_PACKAGES} ${TOOLS_REQUIRED_PACKAGES} clang-format-7"
|
||||
|
||||
# Debian Bullseye (x64 + i386)
|
||||
# Make Debian bullseye image
|
||||
debian:bullseye:container_prep:
|
||||
stage: container_prep
|
||||
extends:
|
||||
- .monado.variables.debian:bullseye
|
||||
- .monado.variables.container-prep-base
|
||||
- .monado.variables.debian-based-packages
|
||||
- .fdo.container-build@debian # from ci-templates
|
||||
variables:
|
||||
# a list of packages to install - assembled from .monado.variables.debian-based-packages, plus clang-format.
|
||||
FDO_DISTRIBUTION_PACKAGES: "${CORE_REQUIRED_PACKAGES} ${FEATURE_PACKAGES} ${PACKAGING_PACKAGES} ${TOOLS_REQUIRED_PACKAGES} clang-format"
|
||||
FDO_DISTRIBUTION_PACKAGES: 'build-essential ca-certificates clang-format cmake codespell curl debhelper devscripts doxygen dput-ng gettext-base git glslang-tools graphviz libavcodec-dev libbsd-dev libcjson-dev libdbus-1-dev libegl1-mesa-dev libeigen3-dev libgl1-mesa-dev libglvnd-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libhidapi-dev libopencv-dev libsdl2-dev libsystemd-dev libudev-dev libusb-1.0-0-dev libuvc-dev libv4l-dev libvulkan-dev libwayland-dev libx11-dev libx11-xcb-dev libxcb-randr0-dev libxrandr-dev libxxf86vm-dev meson ninja-build pandoc patch pkg-config python3 python3-click python3-pip unzip wget'
|
||||
FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/i386_and_proclamation_container_prep.sh'
|
||||
|
||||
# Arch Linux (x64)
|
||||
arch:container_prep:
|
||||
# Make Debian bullseye-ndk image
|
||||
debian:bullseye-ndk:container_prep:
|
||||
stage: container_prep
|
||||
extends:
|
||||
- .monado.variables.arch:rolling
|
||||
- .monado.variables.container-prep-base
|
||||
- .fdo.container-build@arch # from ci-templates
|
||||
- .monado.variables.debian:bullseye-ndk
|
||||
- .fdo.container-build@debian # from ci-templates
|
||||
variables:
|
||||
# a list of packages to install
|
||||
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"
|
||||
FDO_DISTRIBUTION_PACKAGES: 'ca-certificates cmake git glslang-tools libeigen3-dev meson ninja-build pkg-config python3 unzip wget'
|
||||
FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/ndk_container_prep.sh'
|
||||
|
||||
# Ubuntu Focal (x64)
|
||||
# Make Ubuntu focal image
|
||||
ubuntu:focal:container_prep:
|
||||
stage: container_prep
|
||||
extends:
|
||||
- .monado.variables.ubuntu:focal
|
||||
- .monado.variables.container-prep-base
|
||||
- .monado.variables.debian-based-packages
|
||||
- .fdo.container-build@ubuntu # from ci-templates
|
||||
variables:
|
||||
# a list of packages to install - assembled from .monado.variables.debian-based-packages
|
||||
FDO_DISTRIBUTION_PACKAGES: "${CORE_REQUIRED_PACKAGES} ${FEATURE_PACKAGES} ${PACKAGING_PACKAGES}"
|
||||
FDO_DISTRIBUTION_PACKAGES: 'build-essential ca-certificates cmake curl debhelper devscripts dput-ng gettext-base git glslang-tools libavcodec-dev libbsd-dev libcjson-dev libdbus-1-dev libegl1-mesa-dev libeigen3-dev libgl1-mesa-dev libglvnd-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libhidapi-dev libopencv-dev libsdl2-dev libsystemd-dev libudev-dev libusb-1.0-0-dev libuvc-dev libv4l-dev libvulkan-dev libwayland-dev libx11-dev libx11-xcb-dev libxcb-randr0-dev libxrandr-dev libxxf86vm-dev meson ninja-build pandoc patch pkg-config python3 unzip wget'
|
||||
|
||||
# Ubuntu Hirsute (x64)
|
||||
# Make Ubuntu hirsute image
|
||||
ubuntu:hirsute:container_prep:
|
||||
stage: container_prep
|
||||
extends:
|
||||
- .monado.variables.ubuntu:hirsute
|
||||
- .monado.variables.container-prep-base
|
||||
- .monado.variables.debian-based-packages
|
||||
- .fdo.container-build@ubuntu # from ci-templates
|
||||
variables:
|
||||
# a list of packages to install - assembled from .monado.variables.debian-based-packages
|
||||
FDO_DISTRIBUTION_PACKAGES: "${CORE_REQUIRED_PACKAGES} ${FEATURE_PACKAGES} ${PACKAGING_PACKAGES}"
|
||||
FDO_DISTRIBUTION_PACKAGES: 'build-essential ca-certificates cmake curl debhelper devscripts dput-ng gettext-base git glslang-tools libavcodec-dev libbsd-dev libcjson-dev libdbus-1-dev libegl1-mesa-dev libeigen3-dev libgl1-mesa-dev libglvnd-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libhidapi-dev libopencv-dev libsdl2-dev libsystemd-dev libudev-dev libusb-1.0-0-dev libuvc-dev libv4l-dev libvulkan-dev libwayland-dev libx11-dev libx11-xcb-dev libxcb-randr0-dev libxrandr-dev libxxf86vm-dev meson ninja-build pandoc patch pkg-config python3 unzip wget'
|
||||
|
||||
# Ubuntu Impish (x64)
|
||||
# Make Ubuntu impish image
|
||||
ubuntu:impish:container_prep:
|
||||
stage: container_prep
|
||||
extends:
|
||||
- .monado.variables.ubuntu:impish
|
||||
- .monado.variables.container-prep-base
|
||||
- .monado.variables.debian-based-packages
|
||||
- .fdo.container-build@ubuntu # from ci-templates
|
||||
variables:
|
||||
# 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} reprepro"
|
||||
FDO_DISTRIBUTION_PACKAGES: 'build-essential ca-certificates cmake curl debhelper devscripts dput-ng gettext-base git glslang-tools libavcodec-dev libbsd-dev libcjson-dev libdbus-1-dev libegl1-mesa-dev libeigen3-dev libgl1-mesa-dev libglvnd-dev libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libhidapi-dev libopencv-dev libsdl2-dev libsystemd-dev libudev-dev libusb-1.0-0-dev libuvc-dev libv4l-dev libvulkan-dev libwayland-dev libx11-dev libx11-xcb-dev libxcb-randr0-dev libxrandr-dev libxxf86vm-dev meson ninja-build pandoc patch pkg-config python3 reprepro unzip wget'
|
||||
|
||||
# Debian Buster + the Android NDK in /opt/android-ndk
|
||||
# The NDK itself gets installed by .gitlab-ci/ndk:container_prep.sh
|
||||
ndk:container_prep:
|
||||
# Make Arch rolling image
|
||||
arch:rolling:container_prep:
|
||||
stage: container_prep
|
||||
extends:
|
||||
- .monado.variables.debian:buster-ndk
|
||||
- .monado.variables.container-prep-base
|
||||
- .monado.variables.debian-based-packages
|
||||
- .fdo.container-build@debian # from ci-templates
|
||||
- .monado.variables.arch:rolling
|
||||
- .fdo.container-build@arch # from ci-templates
|
||||
variables:
|
||||
# Repo suffix is set in .monado.variables.debian:buster-ndk
|
||||
# a list of packages to install
|
||||
FDO_DISTRIBUTION_PACKAGES: "${NDK_PACKAGES}"
|
||||
FDO_DISTRIBUTION_PACKAGES: 'check clang cmake diffutils doxygen eigen ffmpeg gcc git glfw-x11 glslang graphviz gtk3 hidapi libusb libxrandr mesa meson ninja opencv patch pkgconfig python3 qt5-base v4l-utils vulkan-headers vulkan-icd-loader'
|
||||
|
||||
###
|
||||
# Container usage base jobs
|
||||
|
||||
# Base for using Debian bullseye image
|
||||
.monado.image.debian:bullseye:
|
||||
extends:
|
||||
- .monado.variables.debian:bullseye
|
||||
- .fdo.distribution-image@debian # from ci-templates
|
||||
|
||||
|
||||
# Base for using Debian bullseye-ndk image
|
||||
.monado.image.debian:bullseye-ndk:
|
||||
extends:
|
||||
- .monado.variables.debian:bullseye-ndk
|
||||
- .fdo.suffixed-image@debian # from ci-templates
|
||||
|
||||
|
||||
# Base for using Ubuntu focal image
|
||||
.monado.image.ubuntu:focal:
|
||||
extends:
|
||||
- .monado.variables.ubuntu:focal
|
||||
- .fdo.distribution-image@ubuntu # from ci-templates
|
||||
|
||||
|
||||
# Base for using Ubuntu hirsute image
|
||||
.monado.image.ubuntu:hirsute:
|
||||
extends:
|
||||
- .monado.variables.ubuntu:hirsute
|
||||
- .fdo.distribution-image@ubuntu # from ci-templates
|
||||
|
||||
|
||||
# Base for using Ubuntu impish image
|
||||
.monado.image.ubuntu:impish:
|
||||
extends:
|
||||
- .monado.variables.ubuntu:impish
|
||||
- .fdo.distribution-image@ubuntu # from ci-templates
|
||||
|
||||
|
||||
# Base for using Arch rolling image
|
||||
.monado.image.arch:rolling:
|
||||
extends:
|
||||
- .monado.variables.arch:rolling
|
||||
- .fdo.distribution-image@arch # from ci-templates
|
||||
|
||||
|
||||
# Style check job
|
||||
format-and-spellcheck:
|
||||
extends:
|
||||
- .monado.variables.debian:bullseye
|
||||
- .fdo.distribution-image@debian # from ci-templates
|
||||
- .monado.image.debian:bullseye
|
||||
|
||||
stage: build
|
||||
script:
|
||||
- scripts/format-and-spellcheck.sh
|
||||
|
@ -205,160 +197,183 @@ reuse:
|
|||
script:
|
||||
- reuse lint
|
||||
|
||||
# "Base" job for a CMake build
|
||||
.monado.base-job.build-cmake:
|
||||
stage: build
|
||||
script:
|
||||
- rm -rf build
|
||||
- mkdir build
|
||||
- pushd build
|
||||
- cmake -GNinja .. $CMAKE_ARGS
|
||||
# List build options
|
||||
- grep "^XRT_" CMakeCache.txt
|
||||
- ninja
|
||||
- ctest --output-on-failure
|
||||
|
||||
# "Base" job for a Meson build
|
||||
.monado.base-job.build-meson:
|
||||
debian:cmake:
|
||||
stage: build
|
||||
script:
|
||||
- rm -rf build
|
||||
- mkdir build
|
||||
- pushd build
|
||||
- meson .. $MESON_ARGS
|
||||
- ninja
|
||||
|
||||
debian:bullseye:cmake:
|
||||
extends:
|
||||
- .monado.variables.debian:bullseye
|
||||
- .fdo.distribution-image@debian # from ci-templates
|
||||
- .monado.base-job.build-cmake
|
||||
- .monado.image.debian:bullseye
|
||||
|
||||
before_script:
|
||||
# Generate "changes since last release" and add to changelog,
|
||||
# since this is the build that makes our docs.
|
||||
- pushd doc/changes
|
||||
- proclamation build --overwrite vNEXT
|
||||
- popd
|
||||
script:
|
||||
- rm -rf build
|
||||
- cmake -GNinja -B build -S .
|
||||
- echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
|
||||
- ninja -C build
|
||||
- cd build && ctest --output-on-failure
|
||||
artifacts:
|
||||
paths:
|
||||
- build/doc/html/
|
||||
|
||||
debian:cmake-no-opencv:
|
||||
extends:
|
||||
- .monado.variables.debian:buster
|
||||
- .fdo.distribution-image@debian # from ci-templates
|
||||
- .monado.base-job.build-cmake
|
||||
variables:
|
||||
CMAKE_ARGS: -DXRT_HAVE_OPENCV=OFF
|
||||
|
||||
debian:cmake-no-opengl:
|
||||
extends:
|
||||
- .monado.variables.debian:buster
|
||||
- .fdo.distribution-image@debian # from ci-templates
|
||||
- .monado.base-job.build-cmake
|
||||
variables:
|
||||
CMAKE_ARGS: -DXRT_HAVE_OPENGL=OFF
|
||||
|
||||
debian:cmake-no-sdl2:
|
||||
extends:
|
||||
- .monado.variables.debian:buster
|
||||
- .fdo.distribution-image@debian # from ci-templates
|
||||
- .monado.base-job.build-cmake
|
||||
variables:
|
||||
CMAKE_ARGS: -DXRT_HAVE_SDL2=OFF
|
||||
|
||||
debian:cmake-no-service:
|
||||
extends:
|
||||
- .monado.variables.debian:buster
|
||||
- .fdo.distribution-image@debian # from ci-templates
|
||||
- .monado.base-job.build-cmake
|
||||
variables:
|
||||
CMAKE_ARGS: -DXRT_FEATURE_SERVICE=OFF
|
||||
|
||||
arch:cmake:
|
||||
extends:
|
||||
- .monado.variables.arch:rolling
|
||||
- .fdo.distribution-image@arch # from ci-templates
|
||||
- .monado.base-job.build-cmake
|
||||
|
||||
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++
|
||||
|
||||
ubuntu:cmake:
|
||||
extends:
|
||||
- .monado.variables.ubuntu:focal
|
||||
- .fdo.distribution-image@ubuntu # from ci-templates
|
||||
- .monado.base-job.build-cmake
|
||||
|
||||
debian:meson:
|
||||
extends:
|
||||
- .monado.variables.debian:buster
|
||||
- .fdo.distribution-image@debian # from ci-templates
|
||||
- .monado.base-job.build-meson
|
||||
|
||||
ubuntu:meson:
|
||||
extends:
|
||||
- .monado.variables.ubuntu:focal
|
||||
- .fdo.distribution-image@ubuntu # from ci-templates
|
||||
- .monado.base-job.build-meson
|
||||
|
||||
arch:meson:
|
||||
extends:
|
||||
- .monado.variables.arch:rolling
|
||||
- .fdo.distribution-image@arch # from ci-templates
|
||||
- .monado.base-job.build-meson
|
||||
variables:
|
||||
MESON_ARGS: -Ddocs=disabled
|
||||
|
||||
# Cross-compiling
|
||||
debian:meson:32bit:
|
||||
extends:
|
||||
- .monado.variables.debian:buster
|
||||
- .fdo.distribution-image@debian # from ci-templates
|
||||
- .monado.base-job.build-meson
|
||||
variables:
|
||||
MESON_ARGS: --prefix /usr --libdir /usr/lib/i386-linux-gnu --cross-file ../.gitlab-ci/i386-cross.txt
|
||||
|
||||
debian:cmake:32bit:
|
||||
extends:
|
||||
- .monado.variables.debian:buster
|
||||
- .fdo.distribution-image@debian # from ci-templates
|
||||
- .monado.base-job.build-cmake
|
||||
variables:
|
||||
# OpenCV and local OpenHMD doesn't play nicely with us in multi-arch.
|
||||
CMAKE_ARGS: -DCMAKE_TOOLCHAIN_FILE=../.gitlab-ci/i386.cmake -DXRT_HAVE_OPENCV=off -DXRT_BUILD_DRIVER_OHMD=off
|
||||
|
||||
# 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:
|
||||
- .monado.variables.debian:buster-ndk
|
||||
- .fdo.suffixed-image@debian # from ci-templates
|
||||
variables:
|
||||
ANDROID_PLATFORM: 26
|
||||
- .monado.image.debian:bullseye
|
||||
|
||||
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/
|
||||
- grep "^XRT_" CMakeCache.txt
|
||||
- ninja
|
||||
- rm -rf build
|
||||
- cmake -GNinja -B build -S . -DBUILD_DOC=OFF -DXRT_HAVE_OPENCV=OFF
|
||||
- echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
|
||||
- ninja -C build
|
||||
- cd build && ctest --output-on-failure
|
||||
|
||||
debian:cmake-no-sdl2:
|
||||
stage: build
|
||||
extends:
|
||||
- .monado.image.debian:bullseye
|
||||
|
||||
script:
|
||||
- rm -rf build
|
||||
- cmake -GNinja -B build -S . -DBUILD_DOC=OFF -DXRT_HAVE_SDL2=OFF
|
||||
- echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
|
||||
- ninja -C build
|
||||
- cd build && ctest --output-on-failure
|
||||
|
||||
debian:cmake-no-service:
|
||||
stage: build
|
||||
extends:
|
||||
- .monado.image.debian:bullseye
|
||||
|
||||
script:
|
||||
- rm -rf build
|
||||
- cmake -GNinja -B build -S . -DBUILD_DOC=OFF -DXRT_FEATURE_SERVICE=OFF
|
||||
- echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
|
||||
- ninja -C build
|
||||
- cd build && ctest --output-on-failure
|
||||
|
||||
debian:cmake:32bit:
|
||||
stage: build
|
||||
extends:
|
||||
- .monado.image.debian:bullseye
|
||||
|
||||
script:
|
||||
- rm -rf build
|
||||
- cmake -GNinja -B build -S . -DCMAKE_TOOLCHAIN_FILE=.gitlab-ci/i386.cmake -DXRT_HAVE_OPENCV=OFF
|
||||
- echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
|
||||
- ninja -C build
|
||||
- cd build && ctest --output-on-failure
|
||||
|
||||
debian:meson:
|
||||
stage: build
|
||||
extends:
|
||||
- .monado.image.debian:bullseye
|
||||
|
||||
script:
|
||||
- rm -rf build
|
||||
- meson setup build .
|
||||
- ninja -C build
|
||||
|
||||
debian:meson:32bit:
|
||||
stage: build
|
||||
extends:
|
||||
- .monado.image.debian:bullseye
|
||||
|
||||
script:
|
||||
- rm -rf build
|
||||
- meson setup build . --prefix=/usr --libdir=/usr/lib/i386-linux-gnu --cross-file=.gitlab-ci/i386-cross.txt
|
||||
- ninja -C build
|
||||
|
||||
ndk:armeabi-v7a:
|
||||
extends: .monado.ndk:build-base
|
||||
stage: build
|
||||
extends:
|
||||
- .monado.image.debian:bullseye-ndk
|
||||
|
||||
script:
|
||||
- rm -rf build
|
||||
- cmake -GNinja -B build -S . -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=26 -DBUILD_DOC=OFF -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk/build/cmake/android.toolchain.cmake -DEigen3_DIR=/usr/lib/cmake/eigen3/ -DEIGEN3_INCLUDE_DIR=/usr/include/eigen3
|
||||
- echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
|
||||
- ninja -C build
|
||||
|
||||
ndk:arm64-v8a:
|
||||
extends: .monado.ndk:build-base
|
||||
stage: build
|
||||
extends:
|
||||
- .monado.image.debian:bullseye-ndk
|
||||
|
||||
script:
|
||||
- rm -rf build
|
||||
- cmake -GNinja -B build -S . -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=26 -DBUILD_DOC=OFF -DCMAKE_TOOLCHAIN_FILE=/opt/android-ndk/build/cmake/android.toolchain.cmake -DEigen3_DIR=/usr/lib/cmake/eigen3/ -DEIGEN3_INCLUDE_DIR=/usr/include/eigen3
|
||||
- echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
|
||||
- ninja -C build
|
||||
|
||||
ubuntu:cmake:
|
||||
stage: build
|
||||
extends:
|
||||
- .monado.image.ubuntu:focal
|
||||
|
||||
script:
|
||||
- rm -rf build
|
||||
- cmake -GNinja -B build -S . -DBUILD_DOC=OFF
|
||||
- echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
|
||||
- ninja -C build
|
||||
- cd build && ctest --output-on-failure
|
||||
|
||||
ubuntu:meson:
|
||||
stage: build
|
||||
extends:
|
||||
- .monado.image.ubuntu:focal
|
||||
|
||||
script:
|
||||
- rm -rf build
|
||||
- meson setup build .
|
||||
- ninja -C build
|
||||
|
||||
ubuntu:latest:cmake:
|
||||
stage: build
|
||||
extends:
|
||||
- .monado.image.ubuntu:impish
|
||||
|
||||
script:
|
||||
- rm -rf build
|
||||
- cmake -GNinja -B build -S . -DBUILD_DOC=OFF
|
||||
- echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
|
||||
- ninja -C build
|
||||
- cd build && ctest --output-on-failure
|
||||
|
||||
arch:cmake:
|
||||
stage: build
|
||||
extends:
|
||||
- .monado.image.arch:rolling
|
||||
|
||||
script:
|
||||
- rm -rf build
|
||||
- cmake -GNinja -B build -S .
|
||||
- echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
|
||||
- ninja -C build
|
||||
- cd build && ctest --output-on-failure
|
||||
|
||||
arch:cmake:clang:
|
||||
stage: build
|
||||
extends:
|
||||
- .monado.image.arch:rolling
|
||||
|
||||
script:
|
||||
- rm -rf build
|
||||
- cmake -GNinja -B build -S . -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++
|
||||
- echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
|
||||
- ninja -C build
|
||||
- cd build && ctest --output-on-failure
|
||||
|
||||
arch:meson:
|
||||
stage: build
|
||||
extends:
|
||||
- .monado.image.arch:rolling
|
||||
|
||||
script:
|
||||
- rm -rf build
|
||||
- meson setup build .
|
||||
- ninja -C build
|
||||
|
||||
# Packaging
|
||||
.monado.packaging.conditions:
|
||||
|
@ -369,127 +384,124 @@ ndk:arm64-v8a:
|
|||
# Otherwise, don't build packages.
|
||||
- when: never
|
||||
|
||||
.monado.base-job.debuild:
|
||||
|
||||
|
||||
debian:bullseye:package:
|
||||
extends:
|
||||
- .monado.image.debian:bullseye
|
||||
- .monado.packaging.conditions
|
||||
variables:
|
||||
GIT_STRATEGY: clone
|
||||
DEBFULLNAME: "Monado CI"
|
||||
DEBEMAIL: "ryan.pavlik@collabora.com"
|
||||
DISTRO: debian
|
||||
CODENAME: bullseye
|
||||
DEB_VERSION_SUFFIX: bpo11
|
||||
stage: package
|
||||
before_script:
|
||||
# Configure git - needed despite not actually committing here.
|
||||
- git config --global user.email "ryan.pavlik@collabora.com"
|
||||
- git config --global user.name "Monado CI"
|
||||
- git config --global user.name Monado CI
|
||||
- git config --global user.email ryan.pavlik@collabora.com
|
||||
script:
|
||||
# Prep the source tree
|
||||
- git clean -dfx
|
||||
- git merge origin/${PACKAGE_BRANCH} --no-commit
|
||||
- DEBFULLNAME="Monado CI" DEBEMAIL="ryan.pavlik@collabora.com" debian/extra/prepare-commit-package.sh ${CI_COMMIT_SHA} 1~${BACKPORT_SUFFIX}~ci$(date --utc "+%Y%m%d")
|
||||
# Build the package
|
||||
- debuild -uc -us
|
||||
# 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
|
||||
# Call this script to build binary and source packages.
|
||||
# Can try locally by exporting the right variables and passing -B to get only a binary package to avoid complaints.
|
||||
- .gitlab-ci/build-and-submit-package.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- "incoming/"
|
||||
expire_in: 2 days
|
||||
|
||||
debian:buster:package:
|
||||
extends:
|
||||
- .monado.variables.debian:buster
|
||||
- .fdo.distribution-image@debian # from ci-templates
|
||||
- .monado.base-job.debuild
|
||||
variables:
|
||||
BACKPORT_SUFFIX: bpo10
|
||||
PACKAGE_BRANCH: debian/buster-backports
|
||||
DISTRO: buster
|
||||
|
||||
debian:bullseye:package:
|
||||
extends:
|
||||
- .monado.variables.debian:bullseye
|
||||
- .fdo.distribution-image@debian # from ci-templates
|
||||
- .monado.base-job.debuild
|
||||
variables:
|
||||
BACKPORT_SUFFIX: bpo11
|
||||
PACKAGE_BRANCH: debian/bullseye
|
||||
DISTRO: bullseye
|
||||
|
||||
ubuntu:focal:package:
|
||||
extends:
|
||||
- .monado.variables.ubuntu:focal
|
||||
- .fdo.distribution-image@ubuntu # from ci-templates
|
||||
- .monado.base-job.debuild
|
||||
- .monado.image.ubuntu:focal
|
||||
- .monado.packaging.conditions
|
||||
variables:
|
||||
BACKPORT_SUFFIX: ubuntu2004
|
||||
PACKAGE_BRANCH: ubuntu/focal
|
||||
DISTRO: focal
|
||||
GIT_STRATEGY: clone
|
||||
DEBFULLNAME: "Monado CI"
|
||||
DEBEMAIL: "ryan.pavlik@collabora.com"
|
||||
DISTRO: ubuntu
|
||||
CODENAME: focal
|
||||
DEB_VERSION_SUFFIX: ubuntu2004
|
||||
stage: package
|
||||
before_script:
|
||||
- git config --global user.name Monado CI
|
||||
- git config --global user.email ryan.pavlik@collabora.com
|
||||
script:
|
||||
# Prep the source tree
|
||||
- git clean -dfx
|
||||
# Call this script to build binary and source packages.
|
||||
# Can try locally by exporting the right variables and passing -B to get only a binary package to avoid complaints.
|
||||
- .gitlab-ci/build-and-submit-package.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- "incoming/"
|
||||
expire_in: 2 days
|
||||
|
||||
ubuntu:hirsute:package:
|
||||
extends:
|
||||
- .monado.variables.ubuntu:hirsute
|
||||
- .fdo.distribution-image@ubuntu # from ci-templates
|
||||
- .monado.base-job.debuild
|
||||
|
||||
- .monado.image.ubuntu:hirsute
|
||||
- .monado.packaging.conditions
|
||||
variables:
|
||||
BACKPORT_SUFFIX: ubuntu2104
|
||||
PACKAGE_BRANCH: ubuntu/hirsute
|
||||
DISTRO: hirsute
|
||||
GIT_STRATEGY: clone
|
||||
DEBFULLNAME: "Monado CI"
|
||||
DEBEMAIL: "ryan.pavlik@collabora.com"
|
||||
DISTRO: ubuntu
|
||||
CODENAME: hirsute
|
||||
DEB_VERSION_SUFFIX: ubuntu2104
|
||||
stage: package
|
||||
before_script:
|
||||
- git config --global user.name Monado CI
|
||||
- git config --global user.email ryan.pavlik@collabora.com
|
||||
script:
|
||||
# Prep the source tree
|
||||
- git clean -dfx
|
||||
# Call this script to build binary and source packages.
|
||||
# Can try locally by exporting the right variables and passing -B to get only a binary package to avoid complaints.
|
||||
- .gitlab-ci/build-and-submit-package.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- "incoming/"
|
||||
expire_in: 2 days
|
||||
|
||||
ubuntu:impish:package:
|
||||
extends:
|
||||
- .monado.variables.ubuntu:impish
|
||||
- .fdo.distribution-image@ubuntu # from ci-templates
|
||||
- .monado.base-job.debuild
|
||||
|
||||
- .monado.image.ubuntu:impish
|
||||
- .monado.packaging.conditions
|
||||
variables:
|
||||
BACKPORT_SUFFIX: ubuntu2110
|
||||
PACKAGE_BRANCH: ubuntu/impish
|
||||
DISTRO: impish
|
||||
GIT_STRATEGY: clone
|
||||
DEBFULLNAME: "Monado CI"
|
||||
DEBEMAIL: "ryan.pavlik@collabora.com"
|
||||
DISTRO: ubuntu
|
||||
CODENAME: impish
|
||||
DEB_VERSION_SUFFIX: ubuntu2110
|
||||
stage: package
|
||||
before_script:
|
||||
- git config --global user.name Monado CI
|
||||
- git config --global user.email ryan.pavlik@collabora.com
|
||||
script:
|
||||
# Prep the source tree
|
||||
- git clean -dfx
|
||||
# Call this script to build binary and source packages.
|
||||
# Can try locally by exporting the right variables and passing -B to get only a binary package to avoid complaints.
|
||||
- .gitlab-ci/build-and-submit-package.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- "incoming/"
|
||||
expire_in: 2 days
|
||||
|
||||
reprepro:package:
|
||||
stage: reprepro
|
||||
extends:
|
||||
- .monado.variables.ubuntu:impish
|
||||
- .monado.packaging.conditions
|
||||
- .fdo.distribution-image@ubuntu # from ci-templates
|
||||
- .monado.image.ubuntu:impish
|
||||
|
||||
dependencies:
|
||||
- debian:buster:package
|
||||
- debian:bullseye:package
|
||||
- ubuntu:focal:package
|
||||
- ubuntu:hirsute:package
|
||||
- ubuntu:impish: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
|
||||
- bash .gitlab-ci/reprepro.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- "repo/"
|
||||
|
@ -503,7 +515,7 @@ pages:
|
|||
only:
|
||||
- main
|
||||
dependencies:
|
||||
- debian:bullseye:cmake
|
||||
- debian:cmake
|
||||
- reprepro:package
|
||||
script:
|
||||
- mkdir -p public
|
||||
|
@ -511,4 +523,4 @@ pages:
|
|||
- mv repo public/apt
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
- public
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Copyright 2018-2020, Collabora, Ltd. and the Monado contributors
|
||||
# SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
(
|
||||
cd $(dirname $0)
|
||||
bash ./build-openxr-openhmd.sh
|
||||
)
|
38
.gitlab-ci/build-and-submit-package.sh
Executable file
38
.gitlab-ci/build-and-submit-package.sh
Executable file
|
@ -0,0 +1,38 @@
|
|||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
# SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors
|
||||
#
|
||||
# Requires some environment variables (normally set by CI)
|
||||
# Any extra args get passed to debuild, so try -B for a local binary-only build
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo "DISTRO ${DISTRO}"
|
||||
echo "CODENAME ${CODENAME}"
|
||||
echo "DEB_VERSION_SUFFIX ${DEB_VERSION_SUFFIX}"
|
||||
echo "CI_COMMIT_SHA ${CI_COMMIT_SHA}"
|
||||
|
||||
git remote update --prune
|
||||
|
||||
# Prep the source tree: grab the debian directory from the packaging branch.
|
||||
git checkout "origin/${DISTRO}/${CODENAME}" -- debian/
|
||||
datestamp=$(date --utc "+%Y%m%d")
|
||||
|
||||
|
||||
if [ ! "${CI_COMMIT_SHA}" ]; then
|
||||
echo "Why don't I know what the commit hash is?"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
debian/extra/prepare-commit-package.sh "${CI_COMMIT_SHA}" "1~${DEB_VERSION_SUFFIX}~ci${datestamp}"
|
||||
# Build the package
|
||||
debuild -uc -us "$@"
|
||||
# Stash the package version in a convenient file for a later job.
|
||||
INCOMING="$(pwd)/incoming"
|
||||
export INCOMING
|
||||
mkdir -p "$INCOMING"
|
||||
dpkg-parsechangelog --show-field version > "incoming/${CODENAME}.distro"
|
||||
# Use dput-ng to move the package-related files into some artifacts.
|
||||
mkdir -p ~/.dput.d/profiles
|
||||
envsubst < .gitlab-ci/localhost.json > ~/.dput.d/profiles/localhost.json
|
||||
dput --debug localhost "../monado_$(dpkg-parsechangelog --show-field version)_amd64.changes"
|
|
@ -1,22 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Copyright 2018-2020, Collabora, Ltd. and the Monado contributors
|
||||
# SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
# Install the OpenXR SDK, whatever version, installed system-wide.
|
||||
git clone https://github.com/KhronosGroup/OpenXR-SDK
|
||||
pushd OpenXR-SDK
|
||||
mkdir build
|
||||
pushd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=Off -DPRESENTATION_BACKEND=xlib -DDYNAMIC_LOADER=ON -DOpenGL_GL_PREFERENCE=GLVND -GNinja ..
|
||||
ninja install
|
||||
popd
|
||||
popd
|
||||
|
||||
# Install OpenHMD from git master, as released versions are not sufficient
|
||||
# for us to build.
|
||||
git clone https://github.com/OpenHMD/OpenHMD
|
||||
pushd OpenHMD
|
||||
mkdir build
|
||||
meson --prefix=/usr/local --libdir=lib build
|
||||
ninja -C build install
|
||||
popd
|
26
.gitlab-ci/ci-scripts.mk
Normal file
26
.gitlab-ci/ci-scripts.mk
Normal file
|
@ -0,0 +1,26 @@
|
|||
# SPDX-License-Identifier: CC0-1.0
|
||||
# SPDX-FileCopyrightText: 2022 Collabora, Ltd. and the Monado contributors
|
||||
#
|
||||
# To generate all the templated files, run this from the root of the repo:
|
||||
# make -f .gitlab-ci/ci-scripts.mk
|
||||
|
||||
# These also all have their template named the same with a .template suffix.
|
||||
FILES_IN_SUBDIR := \
|
||||
.gitlab-ci/distributions \
|
||||
.gitlab-ci/reprepro.sh \
|
||||
|
||||
CONFIG_FILE := .gitlab-ci/config.yml
|
||||
all: .gitlab-ci.yml $(FILES_IN_SUBDIR)
|
||||
.PHONY: all
|
||||
|
||||
clean:
|
||||
rm -f .gitlab-ci.yml $(FILES_IN_SUBDIR)
|
||||
.PHONY: clean
|
||||
|
||||
# As the default thing for ci-fairy to template, this is special cased
|
||||
.gitlab-ci.yml: .gitlab-ci/ci.template $(CONFIG_FILE)
|
||||
ci-fairy generate-template
|
||||
|
||||
# Everything else is structured alike
|
||||
$(FILES_IN_SUBDIR): %: %.jinja $(CONFIG_FILE)
|
||||
ci-fairy generate-template --config=$(CONFIG_FILE) $< > $@
|
254
.gitlab-ci/ci.template
Normal file
254
.gitlab-ci/ci.template
Normal file
|
@ -0,0 +1,254 @@
|
|||
# SPDX-License-Identifier: CC0-1.0
|
||||
# SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors
|
||||
|
||||
{# ignore the warning, this is actually the template to edit. #}
|
||||
######################################
|
||||
# GENERATED - DO NOT EDIT #
|
||||
# see .gitlab-ci/ci.template instead #
|
||||
######################################
|
||||
{#
|
||||
useful links:
|
||||
https://freedesktop.pages.freedesktop.org/ci-templates/
|
||||
https://freedesktop.pages.freedesktop.org/ci-templates/ci-fairy.html#templating-gitlab-ci-yml
|
||||
https://gitlab.freedesktop.org/freedesktop/ci-templates
|
||||
|
||||
Config file used for all templates: .gitlab-ci/config.yml
|
||||
.gitlab-ci.yml template: .gitlab-ci/ci.template
|
||||
.gitlab-ci/distributions template (for reprepro): .gitlab-ci/distributions.jinja
|
||||
.gitlab-ci/reprepro.sh template: .gitlab-ci/reprepro.sh.jinja
|
||||
|
||||
The following will update all files from templates:
|
||||
make -f .gitlab-ci/ci-scripts.mk
|
||||
#}
|
||||
|
||||
variables:
|
||||
FDO_UPSTREAM_REPO: monado/monado
|
||||
|
||||
.templates_sha: &templates_sha {{fdo_ci_templates_sha}}
|
||||
|
||||
include:
|
||||
{% for distro in distributions %}
|
||||
# {{ distro.name | capitalize }}
|
||||
- project: "freedesktop/ci-templates"
|
||||
ref: *templates_sha
|
||||
file: "/templates/{{distro.name}}.yml"
|
||||
{% endfor %}
|
||||
|
||||
{% for distro in distributions -%} {%- for image in distro.images %}
|
||||
|
||||
# Variables for build and usage of {{ distro.name|capitalize }} {{image.codename}} image
|
||||
.monado.variables.{{distro.name}}:{{image.codename}}:
|
||||
variables:
|
||||
FDO_DISTRIBUTION_VERSION: "{{ image["distro_version"] | default(image.codename) }}"
|
||||
FDO_DISTRIBUTION_TAG: "{{image["tag"]}}"
|
||||
{% if "repo_suffix" in image %}
|
||||
FDO_REPO_SUFFIX: {{image["repo_suffix"]}}
|
||||
{% endif %}
|
||||
{% endfor -%} {%- endfor %}
|
||||
|
||||
stages:
|
||||
- container_prep
|
||||
- build
|
||||
- package
|
||||
- reprepro
|
||||
- pages
|
||||
- deploy
|
||||
|
||||
###
|
||||
# Container prep jobs
|
||||
|
||||
{%- for distro in distributions -%} {%- for image in distro.images %}
|
||||
|
||||
# Make {{ distro.name|capitalize }} {{image.codename}} image
|
||||
{{distro.name}}:{{image.codename}}:container_prep:
|
||||
stage: container_prep
|
||||
extends:
|
||||
- .monado.variables.{{distro.name}}:{{image.codename}}
|
||||
- .fdo.container-build@{{distro.name}} # from ci-templates
|
||||
variables:
|
||||
{# The packages list is actually a mapping, not an array, but the same syntax works. #}
|
||||
{# Needed to be a mapping so it could be "merged" #}
|
||||
FDO_DISTRIBUTION_PACKAGES: '{{image.packages | sort | join(" ")}}'
|
||||
{% if "script" in image %}
|
||||
FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/{{image["script"]}}'
|
||||
{% endif %}
|
||||
{% endfor -%} {%- endfor %}
|
||||
|
||||
{# Macro to compute job name to extend to use image given distro and image objects#}
|
||||
{% macro base_job_to_use_image(distro, image) %}.monado.image.{{distro.name}}:{{image.codename}}{% endmacro -%}
|
||||
|
||||
###
|
||||
# Container usage base jobs
|
||||
{% for distro in distributions -%} {%- for image in distro.images %}
|
||||
|
||||
# Base for using {{ distro.name|capitalize }} {{image.codename}} image
|
||||
{{base_job_to_use_image(distro, image)}}:
|
||||
extends:
|
||||
- .monado.variables.{{distro.name}}:{{image.codename}}
|
||||
- .fdo.{{ "suffixed" if "repo_suffix" in image else "distribution" }}-image@{{distro.name}} # from ci-templates
|
||||
|
||||
{% endfor -%} {%- endfor %}
|
||||
|
||||
{# Macro to compute job name to extend to use image given a package we want#}
|
||||
{% macro base_job_to_use_image_containing(package) %}
|
||||
{% for distro in distributions -%} {%- for image in distro.images if package in image.packages %}
|
||||
{{ base_job_to_use_image(distro, image) if loop.first }}
|
||||
{% endfor -%} {%- endfor %}
|
||||
{% endmacro -%}
|
||||
|
||||
# Style check job
|
||||
format-and-spellcheck:
|
||||
extends:
|
||||
- {{base_job_to_use_image_containing("codespell")}}
|
||||
stage: build
|
||||
script:
|
||||
- scripts/format-and-spellcheck.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- patches/
|
||||
expire_in: 1 week
|
||||
when: on_failure
|
||||
|
||||
# Verify REUSE compliance
|
||||
reuse:
|
||||
stage: build
|
||||
image:
|
||||
name: fsfe/reuse:latest
|
||||
entrypoint: [""]
|
||||
script:
|
||||
- reuse lint
|
||||
|
||||
{% macro make_cmake_args(cmake_defines) %}
|
||||
{% if cmake_defines is defined %}
|
||||
{%- for k, v in cmake_defines |dictsort %} -D{{ k }}={{ v }}{% endfor %}
|
||||
{%- endif %}
|
||||
{%- endmacro -%}
|
||||
|
||||
{#### Main build jobs ####}
|
||||
{% for distro in distributions -%} {%- for image in distro.images if image.build_jobs -%} {%- for job in image.build_jobs %}
|
||||
|
||||
{{job.name}}:
|
||||
stage: build
|
||||
extends:
|
||||
- {{base_job_to_use_image(distro, image)}}
|
||||
|
||||
{% if job.before_script %}
|
||||
before_script:
|
||||
{% for line in job.before_script %}
|
||||
- {{line}}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
script:
|
||||
- rm -rf build
|
||||
|
||||
{#- meson builds -#}
|
||||
{%- if "meson" in job.name %}
|
||||
|
||||
- meson setup build .
|
||||
{%- if job.args %} {{ job.args | join(' ') }}{% endif %}
|
||||
|
||||
- ninja -C build
|
||||
|
||||
{#- regular or NDK cmake builds -#}
|
||||
{%- elif "cmake" in job.name or "ndk" in job.name %}
|
||||
|
||||
- cmake -GNinja -B build -S . {{- make_cmake_args(job.cmake_defines) }}
|
||||
- echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
|
||||
- ninja -C build
|
||||
|
||||
{%- else %}
|
||||
|
||||
{# error message #}
|
||||
CANNOT GUESS JOB TYPE
|
||||
|
||||
{%- endif %}
|
||||
|
||||
{%- if "cmake" in job.name %}
|
||||
|
||||
- cd build && ctest --output-on-failure
|
||||
{%- endif %}
|
||||
|
||||
{%- if job.artifact_path %}
|
||||
|
||||
artifacts:
|
||||
paths:
|
||||
- {{ job.artifact_path }}
|
||||
{%- endif %}
|
||||
|
||||
{% endfor -%} {%- endfor -%} {%- endfor %}
|
||||
|
||||
# Packaging
|
||||
.monado.packaging.conditions:
|
||||
rules:
|
||||
# Only the default branch of the "upstream" repo.
|
||||
- if: "$CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH"
|
||||
when: on_success
|
||||
# Otherwise, don't build packages.
|
||||
- when: never
|
||||
|
||||
{% macro packaging_job_name(distro, image) -%}
|
||||
{{distro.name}}:{{image.codename}}:package
|
||||
{%- endmacro %}
|
||||
|
||||
{% for distro in distributions -%} {%- for image in distro.images if "deb_version_suffix" in image %}
|
||||
|
||||
{{packaging_job_name(distro, image)}}:
|
||||
extends:
|
||||
- {{base_job_to_use_image(distro, image)}}
|
||||
- .monado.packaging.conditions
|
||||
variables:
|
||||
GIT_STRATEGY: clone
|
||||
DEBFULLNAME: "{{packaging.name}}"
|
||||
DEBEMAIL: "{{packaging.email}}"
|
||||
DISTRO: {{distro.name}}
|
||||
CODENAME: {{image.codename}}
|
||||
DEB_VERSION_SUFFIX: {{image.deb_version_suffix}}
|
||||
stage: package
|
||||
before_script:
|
||||
{# Configure git - needed despite not actually committing here. #}
|
||||
- git config --global user.name {{packaging.name}}
|
||||
- git config --global user.email {{packaging.email}}
|
||||
script:
|
||||
# Prep the source tree
|
||||
- git clean -dfx
|
||||
# Call this script to build binary and source packages.
|
||||
# Can try locally by exporting the right variables and passing -B to get only a binary package to avoid complaints.
|
||||
- .gitlab-ci/build-and-submit-package.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- "incoming/"
|
||||
expire_in: 2 days
|
||||
{% endfor -%} {%- endfor %}
|
||||
|
||||
reprepro:package:
|
||||
stage: reprepro
|
||||
extends:
|
||||
- {{ base_job_to_use_image_containing("reprepro") }}
|
||||
dependencies:
|
||||
{% for distro in distributions -%} {%- for image in distro.images if "deb_version_suffix" in image %}
|
||||
- {{packaging_job_name(distro, image)}}
|
||||
{% endfor -%} {%- endfor %}
|
||||
script:
|
||||
- bash .gitlab-ci/reprepro.sh
|
||||
artifacts:
|
||||
paths:
|
||||
- "repo/"
|
||||
expire_in: 2 days
|
||||
|
||||
###
|
||||
# Pages
|
||||
###
|
||||
pages:
|
||||
stage: pages
|
||||
only:
|
||||
- main
|
||||
dependencies:
|
||||
- debian:cmake
|
||||
- reprepro:package
|
||||
script:
|
||||
- mkdir -p public
|
||||
- mv build/doc/html/* public/
|
||||
- mv repo public/apt
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
235
.gitlab-ci/config.yml
Normal file
235
.gitlab-ci/config.yml
Normal file
|
@ -0,0 +1,235 @@
|
|||
# SPDX-License-Identifier: CC0-1.0
|
||||
# SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors
|
||||
|
||||
# Please run the following from the repo root after modifying this file:
|
||||
# make -f .gitlab-ci/ci-scripts.mk
|
||||
|
||||
fdo_ci_templates_sha: 34039cd573a2df832d465bc9e4c5f543571f5241
|
||||
|
||||
# These are a mapping, instead of a list/array, so we can merge.
|
||||
.default_debian_packages:
|
||||
&default_debian_packages # Packages required for build and some other basic jobs
|
||||
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:
|
||||
# These are optional packages, that we're building against to ensure we build as much code as possible
|
||||
libhidapi-dev:
|
||||
libwayland-dev:
|
||||
libuvc-dev:
|
||||
libavcodec-dev:
|
||||
libopencv-dev:
|
||||
libv4l-dev:
|
||||
libcjson-dev:
|
||||
libsdl2-dev:
|
||||
libegl1-mesa-dev:
|
||||
libdbus-1-dev:
|
||||
libgstreamer1.0-dev:
|
||||
libgstreamer-plugins-base1.0-dev:
|
||||
libsystemd-dev:
|
||||
libbsd-dev:
|
||||
# Only used for building packages
|
||||
devscripts:
|
||||
debhelper:
|
||||
dput-ng:
|
||||
gettext-base:
|
||||
pandoc:
|
||||
|
||||
# These config defines are used for all NDK builds
|
||||
.android_cmake_defines: &android_cmake_defines
|
||||
ANDROID_PLATFORM: 26
|
||||
CMAKE_TOOLCHAIN_FILE: /opt/android-ndk/build/cmake/android.toolchain.cmake
|
||||
Eigen3_DIR: /usr/lib/cmake/eigen3/
|
||||
EIGEN3_INCLUDE_DIR: /usr/include/eigen3
|
||||
|
||||
# The distributions we'll make an image for
|
||||
distributions:
|
||||
- name: debian
|
||||
images:
|
||||
# This image does some extra work.
|
||||
- codename: bullseye
|
||||
script: i386_and_proclamation_container_prep.sh
|
||||
tag: "2022-01-24.0"
|
||||
deb_version_suffix: bpo11
|
||||
packages:
|
||||
<<: *default_debian_packages
|
||||
codespell:
|
||||
doxygen:
|
||||
graphviz:
|
||||
python3-pip:
|
||||
python3-click:
|
||||
clang-format:
|
||||
build_jobs:
|
||||
- name: "debian:cmake"
|
||||
# Generate "changes since last release" and add to changelog,
|
||||
# since this is the build that makes our docs.
|
||||
before_script:
|
||||
- pushd doc/changes
|
||||
- proclamation build --overwrite vNEXT
|
||||
- popd
|
||||
artifact_path: build/doc/html/
|
||||
|
||||
- name: "debian:cmake-no-opencv"
|
||||
cmake_defines:
|
||||
BUILD_DOC: "OFF"
|
||||
XRT_HAVE_OPENCV: "OFF"
|
||||
|
||||
- name: "debian:cmake-no-sdl2"
|
||||
cmake_defines:
|
||||
BUILD_DOC: "OFF"
|
||||
XRT_HAVE_SDL2: "OFF"
|
||||
|
||||
- name: "debian:cmake-no-service"
|
||||
cmake_defines:
|
||||
BUILD_DOC: "OFF"
|
||||
XRT_FEATURE_SERVICE: "OFF"
|
||||
|
||||
- name: "debian:cmake:32bit"
|
||||
cmake_defines:
|
||||
CMAKE_TOOLCHAIN_FILE: .gitlab-ci/i386.cmake
|
||||
# OpenCV doesn't play nicely with us in multi-arch.
|
||||
XRT_HAVE_OPENCV: "OFF"
|
||||
|
||||
- name: "debian:meson"
|
||||
|
||||
- name: "debian:meson:32bit"
|
||||
args:
|
||||
- --prefix=/usr
|
||||
- --libdir=/usr/lib/i386-linux-gnu
|
||||
- --cross-file=.gitlab-ci/i386-cross.txt
|
||||
|
||||
# This one is pretty minimal, compared to the others.
|
||||
- codename: bullseye-ndk
|
||||
distro_version: bullseye
|
||||
repo_suffix: ndk
|
||||
script: ndk_container_prep.sh
|
||||
tag: "2022-01-24.0"
|
||||
packages:
|
||||
git:
|
||||
wget:
|
||||
unzip:
|
||||
cmake:
|
||||
meson:
|
||||
ninja-build:
|
||||
libeigen3-dev:
|
||||
python3:
|
||||
pkg-config:
|
||||
ca-certificates:
|
||||
glslang-tools:
|
||||
build_jobs:
|
||||
- name: "ndk:armeabi-v7a"
|
||||
cmake_defines:
|
||||
<<: *android_cmake_defines
|
||||
BUILD_DOC: "OFF"
|
||||
ANDROID_ABI: armeabi-v7a
|
||||
|
||||
- name: "ndk:arm64-v8a"
|
||||
cmake_defines:
|
||||
<<: *android_cmake_defines
|
||||
BUILD_DOC: "OFF"
|
||||
ANDROID_ABI: arm64-v8a
|
||||
|
||||
- name: ubuntu
|
||||
images:
|
||||
# LTS
|
||||
- codename: focal
|
||||
distro_version: "20.04"
|
||||
tag: "2022-01-24.0"
|
||||
deb_version_suffix: ubuntu2004
|
||||
packages:
|
||||
<<: *default_debian_packages
|
||||
build_jobs:
|
||||
- name: "ubuntu:cmake"
|
||||
cmake_defines:
|
||||
BUILD_DOC: "OFF"
|
||||
|
||||
- name: "ubuntu:meson"
|
||||
|
||||
- codename: hirsute
|
||||
distro_version: "21.04"
|
||||
tag: "2022-01-24.0"
|
||||
deb_version_suffix: ubuntu2104
|
||||
packages:
|
||||
<<: *default_debian_packages
|
||||
|
||||
- codename: impish
|
||||
distro_version: "21.10"
|
||||
tag: "2022-01-24.0"
|
||||
deb_version_suffix: ubuntu2110
|
||||
packages:
|
||||
<<: *default_debian_packages
|
||||
reprepro:
|
||||
build_jobs:
|
||||
- name: "ubuntu:latest:cmake"
|
||||
cmake_defines:
|
||||
BUILD_DOC: "OFF"
|
||||
|
||||
- name: arch
|
||||
images:
|
||||
- codename: rolling
|
||||
tag: "2022-01-24.0"
|
||||
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:
|
||||
build_jobs:
|
||||
- name: "arch:cmake"
|
||||
|
||||
- name: "arch:cmake:clang"
|
||||
cmake_defines:
|
||||
CMAKE_C_COMPILER: /usr/bin/clang
|
||||
CMAKE_CXX_COMPILER: /usr/bin/clang++
|
||||
|
||||
- name: "arch:meson"
|
||||
|
||||
android:
|
||||
platform: 26
|
||||
|
||||
packaging:
|
||||
# Name and email associated with the package
|
||||
name: "Monado CI"
|
||||
email: "ryan.pavlik@collabora.com"
|
|
@ -1,12 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Copyright 2018-2020, Collabora, Ltd. and the Monado contributors
|
||||
# SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
(
|
||||
cd $(dirname $0)
|
||||
bash ./install-cross.sh
|
||||
)
|
||||
(
|
||||
cd $(dirname $0)
|
||||
bash ./build-openxr-openhmd.sh
|
||||
)
|
|
@ -1,7 +1,32 @@
|
|||
Origin: monado.freedesktop.org
|
||||
Description: Monado CI apt repository
|
||||
Codename: ${DISTRO}
|
||||
Codename: bullseye
|
||||
Architectures: amd64 i386 source
|
||||
Components: main
|
||||
Tracking: minimal
|
||||
SignWith: ${MONADO_GPG_FINGERPRINT}
|
||||
|
||||
Origin: monado.freedesktop.org
|
||||
Description: Monado CI apt repository
|
||||
Codename: focal
|
||||
Architectures: amd64 i386 source
|
||||
Components: main
|
||||
Tracking: minimal
|
||||
SignWith: ${MONADO_GPG_FINGERPRINT}
|
||||
|
||||
Origin: monado.freedesktop.org
|
||||
Description: Monado CI apt repository
|
||||
Codename: hirsute
|
||||
Architectures: amd64 i386 source
|
||||
Components: main
|
||||
Tracking: minimal
|
||||
SignWith: ${MONADO_GPG_FINGERPRINT}
|
||||
|
||||
Origin: monado.freedesktop.org
|
||||
Description: Monado CI apt repository
|
||||
Codename: impish
|
||||
Architectures: amd64 i386 source
|
||||
Components: main
|
||||
Tracking: minimal
|
||||
SignWith: ${MONADO_GPG_FINGERPRINT}
|
||||
|
||||
|
|
33
.gitlab-ci/distributions.jinja
Normal file
33
.gitlab-ci/distributions.jinja
Normal file
|
@ -0,0 +1,33 @@
|
|||
{#
|
||||
Copyright 2020-2022, Collabora, Ltd.
|
||||
|
||||
SPDX-License-Identifier: BSL-1.0
|
||||
#}
|
||||
{#
|
||||
Template for reprepro distributions config file.
|
||||
|
||||
After this template gets expanded, with a paragraph for each
|
||||
distribution codename supported,
|
||||
the GPG fingerprint gets substituted into that at CI time using envsubst,
|
||||
(not ahead of time using ci-fairy)
|
||||
because the fingerprint is included in the "secrets" in CI.
|
||||
|
||||
Note: There is no way to indicate comments in the reprepro distributions config
|
||||
file format, and whitespace is meaningful (need blank lines between paragraphs).
|
||||
|
||||
Please run the following after modifying this file:
|
||||
|
||||
ci-fairy generate-template --config .gitlab-ci/config.yml .gitlab-ci/distributions.jinja > .gitlab-ci/distributions
|
||||
|
||||
or just use the makefile.
|
||||
#}
|
||||
{% for distro in distributions -%} {%- for image in distro.images if "deb_version_suffix" in image %}
|
||||
Origin: monado.freedesktop.org
|
||||
Description: Monado CI apt repository
|
||||
Codename: {{ image.codename }}
|
||||
Architectures: amd64 i386 source
|
||||
Components: main
|
||||
Tracking: minimal
|
||||
SignWith: ${MONADO_GPG_FINGERPRINT}
|
||||
|
||||
{% endfor -%} {%- endfor %}
|
|
@ -1,3 +1,5 @@
|
|||
Copyright 2020, Collabora, Ltd.
|
||||
Copyright 2020-2022, Collabora, Ltd.
|
||||
|
||||
SPDX-License-Identifier: BSL-1.0
|
||||
SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
Generated from distributions.jinja with ci-fairy
|
||||
|
|
5
.gitlab-ci/gpg-agent.conf
Normal file
5
.gitlab-ci/gpg-agent.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
# SPDX-License-Identifier: CC0-1.0
|
||||
# SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors
|
||||
|
||||
# Used for CI package building.
|
||||
allow-loopback-pinentry
|
6
.gitlab-ci/gpg.conf
Normal file
6
.gitlab-ci/gpg.conf
Normal file
|
@ -0,0 +1,6 @@
|
|||
# SPDX-License-Identifier: CC0-1.0
|
||||
# SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors
|
||||
|
||||
# Used for CI package building.
|
||||
use-agent
|
||||
pinentry-mode loopback
|
|
@ -6,9 +6,5 @@
|
|||
cd $(dirname $0)
|
||||
bash ./install-cross.sh
|
||||
)
|
||||
(
|
||||
cd $(dirname $0)
|
||||
bash ./build-openxr-openhmd.sh
|
||||
)
|
||||
|
||||
python3 -m pip install proclamation
|
71
.gitlab-ci/reprepro.sh
Normal file
71
.gitlab-ci/reprepro.sh
Normal file
|
@ -0,0 +1,71 @@
|
|||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
# SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors
|
||||
|
||||
###############################################
|
||||
# GENERATED - DO NOT EDIT #
|
||||
# see .gitlab-ci/reprepro.sh.template instead #
|
||||
###############################################
|
||||
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Convince gnupg to work properly in CI
|
||||
echo "Import and cache the GPG key"
|
||||
mkdir -p ~/.gnupg && chmod 700 ~/.gnupg
|
||||
cp .gitlab-ci/gpg.conf .gitlab-ci/gpg-agent.conf ~/.gnupg
|
||||
echo RELOADAGENT | gpg-connect-agent
|
||||
gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase "${MONADO_GPG_PASSPHRASE}" --import "${MONADO_GPG_SECRET_KEY}"
|
||||
|
||||
echo "Prepare reprepro config"
|
||||
mkdir -p repo/conf
|
||||
# Substitute in the GPG fingerprint into the repository config.
|
||||
# This file is itself generated with ci-fairy.
|
||||
cat .gitlab-ci/distributions | envsubst > repo/conf/distributions
|
||||
|
||||
echo "reprepro config file:"
|
||||
echo "---------------------"
|
||||
cat repo/conf/distributions
|
||||
echo "---------------------"
|
||||
|
||||
# For each distro, sign the changes file and add it to the repo.
|
||||
|
||||
# bullseye
|
||||
if [ -f "incoming/bullseye.distro" ]; then
|
||||
VERSION=$(cat incoming/bullseye.distro)
|
||||
echo "Signing and processing bullseye: ${VERSION}"
|
||||
debsign -k "${MONADO_GPG_FINGERPRINT}" -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE}" "incoming/monado_${VERSION}_amd64.changes"
|
||||
reprepro -V --ignore=wrongdistribution -b repo include bullseye "incoming/monado_${VERSION}_amd64.changes"
|
||||
else
|
||||
echo "Skipping bullseye - no artifact found"
|
||||
fi
|
||||
|
||||
# focal
|
||||
if [ -f "incoming/focal.distro" ]; then
|
||||
VERSION=$(cat incoming/focal.distro)
|
||||
echo "Signing and processing focal: ${VERSION}"
|
||||
debsign -k "${MONADO_GPG_FINGERPRINT}" -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE}" "incoming/monado_${VERSION}_amd64.changes"
|
||||
reprepro -V --ignore=wrongdistribution -b repo include focal "incoming/monado_${VERSION}_amd64.changes"
|
||||
else
|
||||
echo "Skipping focal - no artifact found"
|
||||
fi
|
||||
|
||||
# hirsute
|
||||
if [ -f "incoming/hirsute.distro" ]; then
|
||||
VERSION=$(cat incoming/hirsute.distro)
|
||||
echo "Signing and processing hirsute: ${VERSION}"
|
||||
debsign -k "${MONADO_GPG_FINGERPRINT}" -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE}" "incoming/monado_${VERSION}_amd64.changes"
|
||||
reprepro -V --ignore=wrongdistribution -b repo include hirsute "incoming/monado_${VERSION}_amd64.changes"
|
||||
else
|
||||
echo "Skipping hirsute - no artifact found"
|
||||
fi
|
||||
|
||||
# impish
|
||||
if [ -f "incoming/impish.distro" ]; then
|
||||
VERSION=$(cat incoming/impish.distro)
|
||||
echo "Signing and processing impish: ${VERSION}"
|
||||
debsign -k "${MONADO_GPG_FINGERPRINT}" -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE}" "incoming/monado_${VERSION}_amd64.changes"
|
||||
reprepro -V --ignore=wrongdistribution -b repo include impish "incoming/monado_${VERSION}_amd64.changes"
|
||||
else
|
||||
echo "Skipping impish - no artifact found"
|
||||
fi
|
48
.gitlab-ci/reprepro.sh.jinja
Normal file
48
.gitlab-ci/reprepro.sh.jinja
Normal file
|
@ -0,0 +1,48 @@
|
|||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
# SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors
|
||||
|
||||
{# ignore the warning, this is actually the template to edit. #}
|
||||
###############################################
|
||||
# GENERATED - DO NOT EDIT #
|
||||
# see .gitlab-ci/reprepro.sh.template instead #
|
||||
###############################################
|
||||
{#
|
||||
Please run the following after editing:
|
||||
ci-fairy generate-template --config .gitlab-ci/config.yml .gitlab-ci/reprepro.sh.template > .gitlab-ci/reprepro.sh
|
||||
#}
|
||||
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Convince gnupg to work properly in CI
|
||||
echo "Import and cache the GPG key"
|
||||
mkdir -p ~/.gnupg && chmod 700 ~/.gnupg
|
||||
cp .gitlab-ci/gpg.conf .gitlab-ci/gpg-agent.conf ~/.gnupg
|
||||
echo RELOADAGENT | gpg-connect-agent
|
||||
gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase "${MONADO_GPG_PASSPHRASE}" --import "${MONADO_GPG_SECRET_KEY}"
|
||||
|
||||
echo "Prepare reprepro config"
|
||||
mkdir -p repo/conf
|
||||
# Substitute in the GPG fingerprint into the repository config.
|
||||
# This file is itself generated with ci-fairy.
|
||||
cat .gitlab-ci/distributions | envsubst > repo/conf/distributions
|
||||
|
||||
echo "reprepro config file:"
|
||||
echo "---------------------"
|
||||
cat repo/conf/distributions
|
||||
echo "---------------------"
|
||||
|
||||
# For each distro, sign the changes file and add it to the repo.
|
||||
{% for distro in distributions -%} {%- for image in distro.images if "deb_version_suffix" in image %}
|
||||
|
||||
# {{ image.codename }}
|
||||
if [ -f "incoming/{{image.codename}}.distro" ]; then
|
||||
VERSION=$(cat incoming/{{image.codename}}.distro)
|
||||
echo "Signing and processing {{image.codename}}: ${VERSION}"
|
||||
debsign -k "${MONADO_GPG_FINGERPRINT}" -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE}" "incoming/monado_${VERSION}_amd64.changes"
|
||||
reprepro -V --ignore=wrongdistribution -b repo include {{image.codename}} "incoming/monado_${VERSION}_amd64.changes"
|
||||
else
|
||||
echo "Skipping {{image.codename}} - no artifact found"
|
||||
fi
|
||||
{% endfor -%} {%- endfor %}
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Copyright 2018-2020, Collabora, Ltd. and the Monado contributors
|
||||
# SPDX-License-Identifier: BSL-1.0
|
||||
(
|
||||
cd $(dirname $0)
|
||||
bash ./build-openxr-openhmd.sh
|
||||
)
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Copyright 2021, Collabora, Ltd. and the Monado contributors
|
||||
# SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
# Nothing really needed.
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Copyright 2021, Collabora, Ltd. and the Monado contributors
|
||||
# SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
# Nothing really needed.
|
Loading…
Reference in a new issue