The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ci: Try again: Switch to using ci-fairy templates

Also drops buster support.

+1073 -381
+327 -315
.gitlab-ci.yml
··· 1 1 # SPDX-License-Identifier: CC0-1.0 2 - # SPDX-FileCopyrightText: 2018-2021 Collabora, Ltd. and the Monado contributors 2 + # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors 3 + 4 + ###################################### 5 + # GENERATED - DO NOT EDIT # 6 + # see .gitlab-ci/ci.template instead # 7 + ###################################### 3 8 4 9 variables: 5 10 FDO_UPSTREAM_REPO: monado/monado 6 11 7 - .templates_sha: &templates_sha 14731f78c23c7b523a85a26a068ade9ac1ecd2f3 12 + .templates_sha: &templates_sha 34039cd573a2df832d465bc9e4c5f543571f5241 8 13 9 - # Variables listing packages for Debian-based distros 10 - .monado.variables.debian-based-packages: 11 - variables: 12 - # Packages required for build and some other basic jobs 13 - 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" 14 - 15 - # These are optional packages, that we're building against to ensure we build as much code as possible 16 - 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" 17 - 18 - # Only used for building packages 19 - PACKAGING_PACKAGES: "devscripts debhelper dput-ng gettext-base pandoc" 14 + include: 15 + # Debian 16 + - project: "freedesktop/ci-templates" 17 + ref: *templates_sha 18 + file: "/templates/debian.yml" 19 + # Ubuntu 20 + - project: "freedesktop/ci-templates" 21 + ref: *templates_sha 22 + file: "/templates/ubuntu.yml" 23 + # Arch 24 + - project: "freedesktop/ci-templates" 25 + ref: *templates_sha 26 + file: "/templates/arch.yml" 20 27 21 - # Used for ancillary "not compilation" jobs/features, like docs, changelogs, formatting, etc. 22 - TOOLS_REQUIRED_PACKAGES: "codespell doxygen graphviz python3-pip python3-click" 23 28 24 - # The NDK builder uses only these packages 25 - NDK_PACKAGES: "git wget unzip cmake meson ninja-build libeigen3-dev python3 pkg-config ca-certificates glslang-tools" 26 - 27 - # Variables for build and usage of Debian 10 (Buster) image 28 - .monado.variables.debian:buster: 29 + # Variables for build and usage of Debian bullseye image 30 + .monado.variables.debian:bullseye: 29 31 variables: 30 - FDO_DISTRIBUTION_VERSION: buster 31 - FDO_DISTRIBUTION_TAG: "2022-01-21.0" 32 + FDO_DISTRIBUTION_VERSION: "bullseye" 33 + FDO_DISTRIBUTION_TAG: "2022-01-24.0" 32 34 33 - # Variables for build and usage of Debian 11 (Bullseye) image 34 - .monado.variables.debian:bullseye: 35 + # Variables for build and usage of Debian bullseye-ndk image 36 + .monado.variables.debian:bullseye-ndk: 35 37 variables: 36 - FDO_DISTRIBUTION_VERSION: bullseye 37 - FDO_DISTRIBUTION_TAG: "2022-01-21.0" 38 + FDO_DISTRIBUTION_VERSION: "bullseye" 39 + FDO_DISTRIBUTION_TAG: "2022-01-24.0" 40 + FDO_REPO_SUFFIX: ndk 38 41 39 - # Variables for build and usage of Ubuntu 20.04 LTS (Focal) image 42 + # Variables for build and usage of Ubuntu focal image 40 43 .monado.variables.ubuntu:focal: 41 44 variables: 42 45 FDO_DISTRIBUTION_VERSION: "20.04" 43 - FDO_DISTRIBUTION_TAG: "2022-01-21.0" 46 + FDO_DISTRIBUTION_TAG: "2022-01-24.0" 44 47 45 - # Variables for build and usage of Ubuntu 21.04 (Hirsute) image 48 + # Variables for build and usage of Ubuntu hirsute image 46 49 .monado.variables.ubuntu:hirsute: 47 50 variables: 48 51 FDO_DISTRIBUTION_VERSION: "21.04" 49 - FDO_DISTRIBUTION_TAG: "2022-01-21.0" 52 + FDO_DISTRIBUTION_TAG: "2022-01-24.0" 50 53 51 - # Variables for build and usage of Ubuntu 21.10 (Impish) image 54 + # Variables for build and usage of Ubuntu impish image 52 55 .monado.variables.ubuntu:impish: 53 56 variables: 54 57 FDO_DISTRIBUTION_VERSION: "21.10" 55 - FDO_DISTRIBUTION_TAG: "2022-01-21.0" 56 - 57 - # Variables for build and usage of Debian 10 (Buster) + Android NDK image 58 - .monado.variables.debian:buster-ndk: 59 - variables: 60 - FDO_DISTRIBUTION_VERSION: buster 61 - FDO_DISTRIBUTION_TAG: "2022-01-21.2" 62 - FDO_REPO_SUFFIX: ndk 58 + FDO_DISTRIBUTION_TAG: "2022-01-24.0" 63 59 64 - # Variables for build and usage of Arch Linux image 60 + # Variables for build and usage of Arch rolling image 65 61 .monado.variables.arch:rolling: 66 62 variables: 67 - FDO_DISTRIBUTION_TAG: "2022-01-21.0" 68 - 69 - include: 70 - - project: "freedesktop/ci-templates" 71 - ref: *templates_sha 72 - file: "/templates/debian.yml" 73 - - project: "freedesktop/ci-templates" 74 - ref: *templates_sha 75 - file: "/templates/ubuntu.yml" 76 - - project: "freedesktop/ci-templates" 77 - ref: *templates_sha 78 - file: "/templates/arch.yml" 63 + FDO_DISTRIBUTION_VERSION: "rolling" 64 + FDO_DISTRIBUTION_TAG: "2022-01-24.0" 79 65 80 66 stages: 81 67 - container_prep ··· 87 73 88 74 ### 89 75 # Container prep jobs 90 - 91 - # Base for all container prep 92 - .monado.variables.container-prep-base: 93 - # "stage" set here doesn't work, for some reason 94 - variables: 95 - # no need to pull the whole tree for rebuilding the image - is this still needed? 96 - GIT_STRATEGY: none 97 - # Each most-derived container prep job has a script to set up stuff for it. 98 - FDO_DISTRIBUTION_EXEC: "bash .gitlab-ci/$(echo ${CI_JOB_NAME} | sed 's/:/_/g').sh" 99 - 100 - # Debian Buster (x64 + i386) 101 - debian:buster:container_prep: 102 - stage: container_prep 103 - extends: 104 - - .monado.variables.debian:buster 105 - - .monado.variables.container-prep-base 106 - - .monado.variables.debian-based-packages 107 - - .fdo.container-build@debian # from ci-templates 108 - variables: 109 - # a list of packages to install - assembled from .monado.variables.debian-based-packages, plus clang-format-7 (which we don't actually need anymore) 110 - FDO_DISTRIBUTION_PACKAGES: "${CORE_REQUIRED_PACKAGES} ${FEATURE_PACKAGES} ${PACKAGING_PACKAGES} ${TOOLS_REQUIRED_PACKAGES} clang-format-7" 111 - 112 - # Debian Bullseye (x64 + i386) 76 + # Make Debian bullseye image 113 77 debian:bullseye:container_prep: 114 78 stage: container_prep 115 79 extends: 116 80 - .monado.variables.debian:bullseye 117 - - .monado.variables.container-prep-base 118 - - .monado.variables.debian-based-packages 119 81 - .fdo.container-build@debian # from ci-templates 120 82 variables: 121 - # a list of packages to install - assembled from .monado.variables.debian-based-packages, plus clang-format. 122 - FDO_DISTRIBUTION_PACKAGES: "${CORE_REQUIRED_PACKAGES} ${FEATURE_PACKAGES} ${PACKAGING_PACKAGES} ${TOOLS_REQUIRED_PACKAGES} clang-format" 83 + 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' 84 + FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/i386_and_proclamation_container_prep.sh' 123 85 124 - # Arch Linux (x64) 125 - arch:container_prep: 86 + # Make Debian bullseye-ndk image 87 + debian:bullseye-ndk:container_prep: 126 88 stage: container_prep 127 89 extends: 128 - - .monado.variables.arch:rolling 129 - - .monado.variables.container-prep-base 130 - - .fdo.container-build@arch # from ci-templates 90 + - .monado.variables.debian:bullseye-ndk 91 + - .fdo.container-build@debian # from ci-templates 131 92 variables: 132 - # a list of packages to install 133 - 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" 93 + FDO_DISTRIBUTION_PACKAGES: 'ca-certificates cmake git glslang-tools libeigen3-dev meson ninja-build pkg-config python3 unzip wget' 94 + FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/ndk_container_prep.sh' 134 95 135 - # Ubuntu Focal (x64) 96 + # Make Ubuntu focal image 136 97 ubuntu:focal:container_prep: 137 98 stage: container_prep 138 99 extends: 139 100 - .monado.variables.ubuntu:focal 140 - - .monado.variables.container-prep-base 141 - - .monado.variables.debian-based-packages 142 101 - .fdo.container-build@ubuntu # from ci-templates 143 102 variables: 144 - # a list of packages to install - assembled from .monado.variables.debian-based-packages 145 - FDO_DISTRIBUTION_PACKAGES: "${CORE_REQUIRED_PACKAGES} ${FEATURE_PACKAGES} ${PACKAGING_PACKAGES}" 103 + 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' 146 104 147 - # Ubuntu Hirsute (x64) 105 + # Make Ubuntu hirsute image 148 106 ubuntu:hirsute:container_prep: 149 107 stage: container_prep 150 108 extends: 151 109 - .monado.variables.ubuntu:hirsute 152 - - .monado.variables.container-prep-base 153 - - .monado.variables.debian-based-packages 154 110 - .fdo.container-build@ubuntu # from ci-templates 155 111 variables: 156 - # a list of packages to install - assembled from .monado.variables.debian-based-packages 157 - FDO_DISTRIBUTION_PACKAGES: "${CORE_REQUIRED_PACKAGES} ${FEATURE_PACKAGES} ${PACKAGING_PACKAGES}" 112 + 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' 158 113 159 - # Ubuntu Impish (x64) 114 + # Make Ubuntu impish image 160 115 ubuntu:impish:container_prep: 161 116 stage: container_prep 162 117 extends: 163 118 - .monado.variables.ubuntu:impish 164 - - .monado.variables.container-prep-base 165 - - .monado.variables.debian-based-packages 166 119 - .fdo.container-build@ubuntu # from ci-templates 167 120 variables: 168 - # a list of packages to install - assembled from .monado.variables.debian-based-packages, plus reprepro 169 - FDO_DISTRIBUTION_PACKAGES: "${CORE_REQUIRED_PACKAGES} ${FEATURE_PACKAGES} ${PACKAGING_PACKAGES} reprepro" 121 + 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' 170 122 171 - # Debian Buster + the Android NDK in /opt/android-ndk 172 - # The NDK itself gets installed by .gitlab-ci/ndk:container_prep.sh 173 - ndk:container_prep: 123 + # Make Arch rolling image 124 + arch:rolling:container_prep: 174 125 stage: container_prep 175 126 extends: 176 - - .monado.variables.debian:buster-ndk 177 - - .monado.variables.container-prep-base 178 - - .monado.variables.debian-based-packages 179 - - .fdo.container-build@debian # from ci-templates 127 + - .monado.variables.arch:rolling 128 + - .fdo.container-build@arch # from ci-templates 180 129 variables: 181 - # Repo suffix is set in .monado.variables.debian:buster-ndk 182 - # a list of packages to install 183 - FDO_DISTRIBUTION_PACKAGES: "${NDK_PACKAGES}" 130 + 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' 184 131 185 - # Style check job 186 - format-and-spellcheck: 132 + ### 133 + # Container usage base jobs 134 + 135 + # Base for using Debian bullseye image 136 + .monado.image.debian:bullseye: 187 137 extends: 188 138 - .monado.variables.debian:bullseye 189 139 - .fdo.distribution-image@debian # from ci-templates 140 + 141 + 142 + # Base for using Debian bullseye-ndk image 143 + .monado.image.debian:bullseye-ndk: 144 + extends: 145 + - .monado.variables.debian:bullseye-ndk 146 + - .fdo.suffixed-image@debian # from ci-templates 147 + 148 + 149 + # Base for using Ubuntu focal image 150 + .monado.image.ubuntu:focal: 151 + extends: 152 + - .monado.variables.ubuntu:focal 153 + - .fdo.distribution-image@ubuntu # from ci-templates 154 + 155 + 156 + # Base for using Ubuntu hirsute image 157 + .monado.image.ubuntu:hirsute: 158 + extends: 159 + - .monado.variables.ubuntu:hirsute 160 + - .fdo.distribution-image@ubuntu # from ci-templates 161 + 162 + 163 + # Base for using Ubuntu impish image 164 + .monado.image.ubuntu:impish: 165 + extends: 166 + - .monado.variables.ubuntu:impish 167 + - .fdo.distribution-image@ubuntu # from ci-templates 168 + 169 + 170 + # Base for using Arch rolling image 171 + .monado.image.arch:rolling: 172 + extends: 173 + - .monado.variables.arch:rolling 174 + - .fdo.distribution-image@arch # from ci-templates 175 + 176 + 177 + # Style check job 178 + format-and-spellcheck: 179 + extends: 180 + - .monado.image.debian:bullseye 181 + 190 182 stage: build 191 183 script: 192 184 - scripts/format-and-spellcheck.sh ··· 205 197 script: 206 198 - reuse lint 207 199 208 - # "Base" job for a CMake build 209 - .monado.base-job.build-cmake: 210 - stage: build 211 - script: 212 - - rm -rf build 213 - - mkdir build 214 - - pushd build 215 - - cmake -GNinja .. $CMAKE_ARGS 216 - # List build options 217 - - grep "^XRT_" CMakeCache.txt 218 - - ninja 219 - - ctest --output-on-failure 220 200 221 - # "Base" job for a Meson build 222 - .monado.base-job.build-meson: 201 + debian:cmake: 223 202 stage: build 224 - script: 225 - - rm -rf build 226 - - mkdir build 227 - - pushd build 228 - - meson .. $MESON_ARGS 229 - - ninja 230 - 231 - debian:bullseye:cmake: 232 203 extends: 233 - - .monado.variables.debian:bullseye 234 - - .fdo.distribution-image@debian # from ci-templates 235 - - .monado.base-job.build-cmake 204 + - .monado.image.debian:bullseye 205 + 236 206 before_script: 237 - # Generate "changes since last release" and add to changelog, 238 - # since this is the build that makes our docs. 239 207 - pushd doc/changes 240 208 - proclamation build --overwrite vNEXT 241 209 - popd 210 + script: 211 + - rm -rf build 212 + - cmake -GNinja -B build -S . 213 + - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt 214 + - ninja -C build 215 + - cd build && ctest --output-on-failure 242 216 artifacts: 243 217 paths: 244 218 - build/doc/html/ 245 219 246 220 debian:cmake-no-opencv: 221 + stage: build 247 222 extends: 248 - - .monado.variables.debian:buster 249 - - .fdo.distribution-image@debian # from ci-templates 250 - - .monado.base-job.build-cmake 251 - variables: 252 - CMAKE_ARGS: -DXRT_HAVE_OPENCV=OFF 223 + - .monado.image.debian:bullseye 253 224 254 - debian:cmake-no-opengl: 255 - extends: 256 - - .monado.variables.debian:buster 257 - - .fdo.distribution-image@debian # from ci-templates 258 - - .monado.base-job.build-cmake 259 - variables: 260 - CMAKE_ARGS: -DXRT_HAVE_OPENGL=OFF 225 + script: 226 + - rm -rf build 227 + - cmake -GNinja -B build -S . -DBUILD_DOC=OFF -DXRT_HAVE_OPENCV=OFF 228 + - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt 229 + - ninja -C build 230 + - cd build && ctest --output-on-failure 261 231 262 232 debian:cmake-no-sdl2: 233 + stage: build 263 234 extends: 264 - - .monado.variables.debian:buster 265 - - .fdo.distribution-image@debian # from ci-templates 266 - - .monado.base-job.build-cmake 267 - variables: 268 - CMAKE_ARGS: -DXRT_HAVE_SDL2=OFF 235 + - .monado.image.debian:bullseye 236 + 237 + script: 238 + - rm -rf build 239 + - cmake -GNinja -B build -S . -DBUILD_DOC=OFF -DXRT_HAVE_SDL2=OFF 240 + - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt 241 + - ninja -C build 242 + - cd build && ctest --output-on-failure 269 243 270 244 debian:cmake-no-service: 245 + stage: build 271 246 extends: 272 - - .monado.variables.debian:buster 273 - - .fdo.distribution-image@debian # from ci-templates 274 - - .monado.base-job.build-cmake 275 - variables: 276 - CMAKE_ARGS: -DXRT_FEATURE_SERVICE=OFF 247 + - .monado.image.debian:bullseye 277 248 278 - arch:cmake: 249 + script: 250 + - rm -rf build 251 + - cmake -GNinja -B build -S . -DBUILD_DOC=OFF -DXRT_FEATURE_SERVICE=OFF 252 + - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt 253 + - ninja -C build 254 + - cd build && ctest --output-on-failure 255 + 256 + debian:cmake:32bit: 257 + stage: build 279 258 extends: 280 - - .monado.variables.arch:rolling 281 - - .fdo.distribution-image@arch # from ci-templates 282 - - .monado.base-job.build-cmake 259 + - .monado.image.debian:bullseye 283 260 284 - arch:cmake:clang: 261 + script: 262 + - rm -rf build 263 + - cmake -GNinja -B build -S . -DCMAKE_TOOLCHAIN_FILE=.gitlab-ci/i386.cmake -DXRT_HAVE_OPENCV=OFF 264 + - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt 265 + - ninja -C build 266 + - cd build && ctest --output-on-failure 267 + 268 + debian:meson: 269 + stage: build 285 270 extends: 286 - - .monado.variables.arch:rolling 287 - - .fdo.distribution-image@arch # from ci-templates 288 - - .monado.base-job.build-cmake 289 - variables: 290 - CMAKE_ARGS: -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ 271 + - .monado.image.debian:bullseye 272 + 273 + script: 274 + - rm -rf build 275 + - meson setup build . 276 + - ninja -C build 277 + 278 + debian:meson:32bit: 279 + stage: build 280 + extends: 281 + - .monado.image.debian:bullseye 282 + 283 + script: 284 + - rm -rf build 285 + - meson setup build . --prefix=/usr --libdir=/usr/lib/i386-linux-gnu --cross-file=.gitlab-ci/i386-cross.txt 286 + - ninja -C build 287 + 288 + ndk:armeabi-v7a: 289 + stage: build 290 + extends: 291 + - .monado.image.debian:bullseye-ndk 292 + 293 + script: 294 + - rm -rf build 295 + - 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 296 + - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt 297 + - ninja -C build 298 + 299 + ndk:arm64-v8a: 300 + stage: build 301 + extends: 302 + - .monado.image.debian:bullseye-ndk 303 + 304 + script: 305 + - rm -rf build 306 + - 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 307 + - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt 308 + - ninja -C build 291 309 292 310 ubuntu:cmake: 311 + stage: build 293 312 extends: 294 - - .monado.variables.ubuntu:focal 295 - - .fdo.distribution-image@ubuntu # from ci-templates 296 - - .monado.base-job.build-cmake 313 + - .monado.image.ubuntu:focal 297 314 298 - debian:meson: 299 - extends: 300 - - .monado.variables.debian:buster 301 - - .fdo.distribution-image@debian # from ci-templates 302 - - .monado.base-job.build-meson 315 + script: 316 + - rm -rf build 317 + - cmake -GNinja -B build -S . -DBUILD_DOC=OFF 318 + - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt 319 + - ninja -C build 320 + - cd build && ctest --output-on-failure 303 321 304 322 ubuntu:meson: 323 + stage: build 305 324 extends: 306 - - .monado.variables.ubuntu:focal 307 - - .fdo.distribution-image@ubuntu # from ci-templates 308 - - .monado.base-job.build-meson 325 + - .monado.image.ubuntu:focal 309 326 310 - arch:meson: 327 + script: 328 + - rm -rf build 329 + - meson setup build . 330 + - ninja -C build 331 + 332 + ubuntu:latest:cmake: 333 + stage: build 311 334 extends: 312 - - .monado.variables.arch:rolling 313 - - .fdo.distribution-image@arch # from ci-templates 314 - - .monado.base-job.build-meson 315 - variables: 316 - MESON_ARGS: -Ddocs=disabled 335 + - .monado.image.ubuntu:impish 336 + 337 + script: 338 + - rm -rf build 339 + - cmake -GNinja -B build -S . -DBUILD_DOC=OFF 340 + - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt 341 + - ninja -C build 342 + - cd build && ctest --output-on-failure 317 343 318 - # Cross-compiling 319 - debian:meson:32bit: 344 + arch:cmake: 345 + stage: build 320 346 extends: 321 - - .monado.variables.debian:buster 322 - - .fdo.distribution-image@debian # from ci-templates 323 - - .monado.base-job.build-meson 324 - variables: 325 - MESON_ARGS: --prefix /usr --libdir /usr/lib/i386-linux-gnu --cross-file ../.gitlab-ci/i386-cross.txt 347 + - .monado.image.arch:rolling 326 348 327 - debian:cmake:32bit: 328 - extends: 329 - - .monado.variables.debian:buster 330 - - .fdo.distribution-image@debian # from ci-templates 331 - - .monado.base-job.build-cmake 332 - variables: 333 - # OpenCV and local OpenHMD doesn't play nicely with us in multi-arch. 334 - CMAKE_ARGS: -DCMAKE_TOOLCHAIN_FILE=../.gitlab-ci/i386.cmake -DXRT_HAVE_OPENCV=off -DXRT_BUILD_DRIVER_OHMD=off 349 + script: 350 + - rm -rf build 351 + - cmake -GNinja -B build -S . 352 + - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt 353 + - ninja -C build 354 + - cd build && ctest --output-on-failure 335 355 336 - # Base of Android NDK builds. 337 - # Takes the last :-delimited part of the name as the ABI to build for, 338 - # so you don't need to do anything other than "extends" in the job 339 - .monado.ndk:build-base: 356 + arch:cmake:clang: 340 357 stage: build 341 358 extends: 342 - - .monado.variables.debian:buster-ndk 343 - - .fdo.suffixed-image@debian # from ci-templates 344 - variables: 345 - ANDROID_PLATFORM: 26 359 + - .monado.image.arch:rolling 360 + 346 361 script: 347 - - mkdir build 348 - - pushd build 349 - # This extracts the ABI from the job name 350 - - export ABI=$(echo $CI_JOB_NAME | cut --delimiter=":" -f 2) 351 - # Note we are pointing CMake to the host install of Eigen3 because it's header-only 352 - # and thus this is safe to do. 353 - - 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/ 354 - - grep "^XRT_" CMakeCache.txt 355 - - ninja 362 + - rm -rf build 363 + - cmake -GNinja -B build -S . -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ 364 + - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt 365 + - ninja -C build 366 + - cd build && ctest --output-on-failure 356 367 357 - ndk:armeabi-v7a: 358 - extends: .monado.ndk:build-base 368 + arch:meson: 369 + stage: build 370 + extends: 371 + - .monado.image.arch:rolling 359 372 360 - ndk:arm64-v8a: 361 - extends: .monado.ndk:build-base 373 + script: 374 + - rm -rf build 375 + - meson setup build . 376 + - ninja -C build 362 377 363 378 # Packaging 364 379 .monado.packaging.conditions: ··· 369 384 # Otherwise, don't build packages. 370 385 - when: never 371 386 372 - .monado.base-job.debuild: 387 + 388 + 389 + debian:bullseye:package: 373 390 extends: 391 + - .monado.image.debian:bullseye 374 392 - .monado.packaging.conditions 393 + variables: 394 + GIT_STRATEGY: clone 395 + DEBFULLNAME: "Monado CI" 396 + DEBEMAIL: "ryan.pavlik@collabora.com" 397 + DISTRO: debian 398 + CODENAME: bullseye 399 + DEB_VERSION_SUFFIX: bpo11 375 400 stage: package 376 401 before_script: 377 - # Configure git - needed despite not actually committing here. 378 - - git config --global user.email "ryan.pavlik@collabora.com" 379 - - git config --global user.name "Monado CI" 402 + - git config --global user.name Monado CI 403 + - git config --global user.email ryan.pavlik@collabora.com 380 404 script: 381 405 # Prep the source tree 382 406 - git clean -dfx 383 - - git merge origin/${PACKAGE_BRANCH} --no-commit 384 - - 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") 385 - # Build the package 386 - - debuild -uc -us 387 - # Use dput-ng to move the package-related files into some artifacts. 388 - - export INCOMING=$(pwd)/incoming 389 - - mkdir -p $INCOMING 390 - - mkdir -p ~/.dput.d/profiles 391 - - cat .gitlab-ci/localhost.json | envsubst > ~/.dput.d/profiles/localhost.json 392 - - dpkg-parsechangelog --show-field version > incoming/${DISTRO}.distro 393 - - dput --debug localhost ../monado_$(dpkg-parsechangelog --show-field version)_amd64.changes 407 + # Call this script to build binary and source packages. 408 + # Can try locally by exporting the right variables and passing -B to get only a binary package to avoid complaints. 409 + - .gitlab-ci/build-and-submit-package.sh 394 410 artifacts: 395 411 paths: 396 412 - "incoming/" 397 413 expire_in: 2 days 398 414 399 - debian:buster:package: 400 - extends: 401 - - .monado.variables.debian:buster 402 - - .fdo.distribution-image@debian # from ci-templates 403 - - .monado.base-job.debuild 404 - variables: 405 - BACKPORT_SUFFIX: bpo10 406 - PACKAGE_BRANCH: debian/buster-backports 407 - DISTRO: buster 408 - 409 - debian:bullseye:package: 410 - extends: 411 - - .monado.variables.debian:bullseye 412 - - .fdo.distribution-image@debian # from ci-templates 413 - - .monado.base-job.debuild 414 - variables: 415 - BACKPORT_SUFFIX: bpo11 416 - PACKAGE_BRANCH: debian/bullseye 417 - DISTRO: bullseye 418 - 419 415 ubuntu:focal:package: 420 416 extends: 421 - - .monado.variables.ubuntu:focal 422 - - .fdo.distribution-image@ubuntu # from ci-templates 423 - - .monado.base-job.debuild 417 + - .monado.image.ubuntu:focal 418 + - .monado.packaging.conditions 424 419 variables: 425 - BACKPORT_SUFFIX: ubuntu2004 426 - PACKAGE_BRANCH: ubuntu/focal 427 - DISTRO: focal 420 + GIT_STRATEGY: clone 421 + DEBFULLNAME: "Monado CI" 422 + DEBEMAIL: "ryan.pavlik@collabora.com" 423 + DISTRO: ubuntu 424 + CODENAME: focal 425 + DEB_VERSION_SUFFIX: ubuntu2004 426 + stage: package 427 + before_script: 428 + - git config --global user.name Monado CI 429 + - git config --global user.email ryan.pavlik@collabora.com 430 + script: 431 + # Prep the source tree 432 + - git clean -dfx 433 + # Call this script to build binary and source packages. 434 + # Can try locally by exporting the right variables and passing -B to get only a binary package to avoid complaints. 435 + - .gitlab-ci/build-and-submit-package.sh 436 + artifacts: 437 + paths: 438 + - "incoming/" 439 + expire_in: 2 days 428 440 429 441 ubuntu:hirsute:package: 430 442 extends: 431 - - .monado.variables.ubuntu:hirsute 432 - - .fdo.distribution-image@ubuntu # from ci-templates 433 - - .monado.base-job.debuild 434 - 443 + - .monado.image.ubuntu:hirsute 444 + - .monado.packaging.conditions 435 445 variables: 436 - BACKPORT_SUFFIX: ubuntu2104 437 - PACKAGE_BRANCH: ubuntu/hirsute 438 - DISTRO: hirsute 446 + GIT_STRATEGY: clone 447 + DEBFULLNAME: "Monado CI" 448 + DEBEMAIL: "ryan.pavlik@collabora.com" 449 + DISTRO: ubuntu 450 + CODENAME: hirsute 451 + DEB_VERSION_SUFFIX: ubuntu2104 452 + stage: package 453 + before_script: 454 + - git config --global user.name Monado CI 455 + - git config --global user.email ryan.pavlik@collabora.com 456 + script: 457 + # Prep the source tree 458 + - git clean -dfx 459 + # Call this script to build binary and source packages. 460 + # Can try locally by exporting the right variables and passing -B to get only a binary package to avoid complaints. 461 + - .gitlab-ci/build-and-submit-package.sh 462 + artifacts: 463 + paths: 464 + - "incoming/" 465 + expire_in: 2 days 439 466 440 467 ubuntu:impish:package: 441 468 extends: 442 - - .monado.variables.ubuntu:impish 443 - - .fdo.distribution-image@ubuntu # from ci-templates 444 - - .monado.base-job.debuild 445 - 469 + - .monado.image.ubuntu:impish 470 + - .monado.packaging.conditions 446 471 variables: 447 - BACKPORT_SUFFIX: ubuntu2110 448 - PACKAGE_BRANCH: ubuntu/impish 449 - DISTRO: impish 472 + GIT_STRATEGY: clone 473 + DEBFULLNAME: "Monado CI" 474 + DEBEMAIL: "ryan.pavlik@collabora.com" 475 + DISTRO: ubuntu 476 + CODENAME: impish 477 + DEB_VERSION_SUFFIX: ubuntu2110 478 + stage: package 479 + before_script: 480 + - git config --global user.name Monado CI 481 + - git config --global user.email ryan.pavlik@collabora.com 482 + script: 483 + # Prep the source tree 484 + - git clean -dfx 485 + # Call this script to build binary and source packages. 486 + # Can try locally by exporting the right variables and passing -B to get only a binary package to avoid complaints. 487 + - .gitlab-ci/build-and-submit-package.sh 488 + artifacts: 489 + paths: 490 + - "incoming/" 491 + expire_in: 2 days 450 492 451 493 reprepro:package: 452 494 stage: reprepro 453 495 extends: 454 - - .monado.variables.ubuntu:impish 455 - - .monado.packaging.conditions 456 - - .fdo.distribution-image@ubuntu # from ci-templates 496 + - .monado.image.ubuntu:impish 497 + 457 498 dependencies: 458 - - debian:buster:package 459 499 - debian:bullseye:package 460 500 - ubuntu:focal:package 461 501 - ubuntu:hirsute:package 462 502 - ubuntu:impish:package 463 - before_script: 464 - # Convince gnupg to work properly in CI 465 - - mkdir -p ~/.gnupg && chmod 700 ~/.gnupg 466 - - touch ~/.gnupg/gpg.conf 467 - - echo 'use-agent' > ~/.gnupg/gpg.conf 468 - - echo 'pinentry-mode loopback' >> ~/.gnupg/gpg.conf 469 - - touch ~/.gnupg/gpg-agent.conf 470 - - echo 'allow-loopback-pinentry' > ~/.gnupg/gpg-agent.conf 471 - - echo RELOADAGENT | gpg-connect-agent 472 - - gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE} --import ${MONADO_GPG_SECRET_KEY} 473 - 474 503 script: 475 - # Use reprepro to create an apt repository in our artifacts 476 - - mkdir -p repo/conf 477 - # For each distro, sign the changes file and add it to the repo. 478 - - | 479 - for fn in incoming/*.distro; do 480 - # parse the distro name out 481 - export DISTRO=$(echo $fn | sed -e 's:incoming/::' -e 's:[.]distro::') 482 - echo "Processing $DISTRO" 483 - # add distro to repository config - blank line is mandatory! 484 - cat .gitlab-ci/distributions | envsubst >> repo/conf/distributions 485 - echo >> repo/conf/distributions 486 - 487 - echo "Signing package for $DISTRO" 488 - debsign -k ${MONADO_GPG_FINGERPRINT} -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE}" incoming/monado_$(cat $fn)_amd64.changes 489 - 490 - echo "Adding package for $DISTRO to the repository" 491 - reprepro -V --ignore=wrongdistribution -b repo include ${DISTRO} incoming/monado_$(cat $fn)_amd64.changes 492 - done 504 + - bash .gitlab-ci/reprepro.sh 493 505 artifacts: 494 506 paths: 495 507 - "repo/" ··· 503 515 only: 504 516 - main 505 517 dependencies: 506 - - debian:bullseye:cmake 518 + - debian:cmake 507 519 - reprepro:package 508 520 script: 509 521 - mkdir -p public ··· 511 523 - mv repo public/apt 512 524 artifacts: 513 525 paths: 514 - - public 526 + - public
-8
.gitlab-ci/arch_container_prep.sh
··· 1 - #!/bin/sh 2 - # Copyright 2018-2020, Collabora, Ltd. and the Monado contributors 3 - # SPDX-License-Identifier: BSL-1.0 4 - 5 - ( 6 - cd $(dirname $0) 7 - bash ./build-openxr-openhmd.sh 8 - )
+38
.gitlab-ci/build-and-submit-package.sh
··· 1 + #!/usr/bin/env bash 2 + # SPDX-License-Identifier: CC0-1.0 3 + # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors 4 + # 5 + # Requires some environment variables (normally set by CI) 6 + # Any extra args get passed to debuild, so try -B for a local binary-only build 7 + 8 + set -euo pipefail 9 + 10 + echo "DISTRO ${DISTRO}" 11 + echo "CODENAME ${CODENAME}" 12 + echo "DEB_VERSION_SUFFIX ${DEB_VERSION_SUFFIX}" 13 + echo "CI_COMMIT_SHA ${CI_COMMIT_SHA}" 14 + 15 + git remote update --prune 16 + 17 + # Prep the source tree: grab the debian directory from the packaging branch. 18 + git checkout "origin/${DISTRO}/${CODENAME}" -- debian/ 19 + datestamp=$(date --utc "+%Y%m%d") 20 + 21 + 22 + if [ ! "${CI_COMMIT_SHA}" ]; then 23 + echo "Why don't I know what the commit hash is?" 24 + exit 1 25 + fi 26 + 27 + debian/extra/prepare-commit-package.sh "${CI_COMMIT_SHA}" "1~${DEB_VERSION_SUFFIX}~ci${datestamp}" 28 + # Build the package 29 + debuild -uc -us "$@" 30 + # Stash the package version in a convenient file for a later job. 31 + INCOMING="$(pwd)/incoming" 32 + export INCOMING 33 + mkdir -p "$INCOMING" 34 + dpkg-parsechangelog --show-field version > "incoming/${CODENAME}.distro" 35 + # Use dput-ng to move the package-related files into some artifacts. 36 + mkdir -p ~/.dput.d/profiles 37 + envsubst < .gitlab-ci/localhost.json > ~/.dput.d/profiles/localhost.json 38 + dput --debug localhost "../monado_$(dpkg-parsechangelog --show-field version)_amd64.changes"
-22
.gitlab-ci/build-openxr-openhmd.sh
··· 1 - #!/bin/sh 2 - # Copyright 2018-2020, Collabora, Ltd. and the Monado contributors 3 - # SPDX-License-Identifier: BSL-1.0 4 - 5 - # Install the OpenXR SDK, whatever version, installed system-wide. 6 - git clone https://github.com/KhronosGroup/OpenXR-SDK 7 - pushd OpenXR-SDK 8 - mkdir build 9 - pushd build 10 - 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 .. 11 - ninja install 12 - popd 13 - popd 14 - 15 - # Install OpenHMD from git master, as released versions are not sufficient 16 - # for us to build. 17 - git clone https://github.com/OpenHMD/OpenHMD 18 - pushd OpenHMD 19 - mkdir build 20 - meson --prefix=/usr/local --libdir=lib build 21 - ninja -C build install 22 - popd
+26
.gitlab-ci/ci-scripts.mk
··· 1 + # SPDX-License-Identifier: CC0-1.0 2 + # SPDX-FileCopyrightText: 2022 Collabora, Ltd. and the Monado contributors 3 + # 4 + # To generate all the templated files, run this from the root of the repo: 5 + # make -f .gitlab-ci/ci-scripts.mk 6 + 7 + # These also all have their template named the same with a .template suffix. 8 + FILES_IN_SUBDIR := \ 9 + .gitlab-ci/distributions \ 10 + .gitlab-ci/reprepro.sh \ 11 + 12 + CONFIG_FILE := .gitlab-ci/config.yml 13 + all: .gitlab-ci.yml $(FILES_IN_SUBDIR) 14 + .PHONY: all 15 + 16 + clean: 17 + rm -f .gitlab-ci.yml $(FILES_IN_SUBDIR) 18 + .PHONY: clean 19 + 20 + # As the default thing for ci-fairy to template, this is special cased 21 + .gitlab-ci.yml: .gitlab-ci/ci.template $(CONFIG_FILE) 22 + ci-fairy generate-template 23 + 24 + # Everything else is structured alike 25 + $(FILES_IN_SUBDIR): %: %.jinja $(CONFIG_FILE) 26 + ci-fairy generate-template --config=$(CONFIG_FILE) $< > $@
+254
.gitlab-ci/ci.template
··· 1 + # SPDX-License-Identifier: CC0-1.0 2 + # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors 3 + 4 + {# ignore the warning, this is actually the template to edit. #} 5 + ###################################### 6 + # GENERATED - DO NOT EDIT # 7 + # see .gitlab-ci/ci.template instead # 8 + ###################################### 9 + {# 10 + useful links: 11 + https://freedesktop.pages.freedesktop.org/ci-templates/ 12 + https://freedesktop.pages.freedesktop.org/ci-templates/ci-fairy.html#templating-gitlab-ci-yml 13 + https://gitlab.freedesktop.org/freedesktop/ci-templates 14 + 15 + Config file used for all templates: .gitlab-ci/config.yml 16 + .gitlab-ci.yml template: .gitlab-ci/ci.template 17 + .gitlab-ci/distributions template (for reprepro): .gitlab-ci/distributions.jinja 18 + .gitlab-ci/reprepro.sh template: .gitlab-ci/reprepro.sh.jinja 19 + 20 + The following will update all files from templates: 21 + make -f .gitlab-ci/ci-scripts.mk 22 + #} 23 + 24 + variables: 25 + FDO_UPSTREAM_REPO: monado/monado 26 + 27 + .templates_sha: &templates_sha {{fdo_ci_templates_sha}} 28 + 29 + include: 30 + {% for distro in distributions %} 31 + # {{ distro.name | capitalize }} 32 + - project: "freedesktop/ci-templates" 33 + ref: *templates_sha 34 + file: "/templates/{{distro.name}}.yml" 35 + {% endfor %} 36 + 37 + {% for distro in distributions -%} {%- for image in distro.images %} 38 + 39 + # Variables for build and usage of {{ distro.name|capitalize }} {{image.codename}} image 40 + .monado.variables.{{distro.name}}:{{image.codename}}: 41 + variables: 42 + FDO_DISTRIBUTION_VERSION: "{{ image["distro_version"] | default(image.codename) }}" 43 + FDO_DISTRIBUTION_TAG: "{{image["tag"]}}" 44 + {% if "repo_suffix" in image %} 45 + FDO_REPO_SUFFIX: {{image["repo_suffix"]}} 46 + {% endif %} 47 + {% endfor -%} {%- endfor %} 48 + 49 + stages: 50 + - container_prep 51 + - build 52 + - package 53 + - reprepro 54 + - pages 55 + - deploy 56 + 57 + ### 58 + # Container prep jobs 59 + 60 + {%- for distro in distributions -%} {%- for image in distro.images %} 61 + 62 + # Make {{ distro.name|capitalize }} {{image.codename}} image 63 + {{distro.name}}:{{image.codename}}:container_prep: 64 + stage: container_prep 65 + extends: 66 + - .monado.variables.{{distro.name}}:{{image.codename}} 67 + - .fdo.container-build@{{distro.name}} # from ci-templates 68 + variables: 69 + {# The packages list is actually a mapping, not an array, but the same syntax works. #} 70 + {# Needed to be a mapping so it could be "merged" #} 71 + FDO_DISTRIBUTION_PACKAGES: '{{image.packages | sort | join(" ")}}' 72 + {% if "script" in image %} 73 + FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/{{image["script"]}}' 74 + {% endif %} 75 + {% endfor -%} {%- endfor %} 76 + 77 + {# Macro to compute job name to extend to use image given distro and image objects#} 78 + {% macro base_job_to_use_image(distro, image) %}.monado.image.{{distro.name}}:{{image.codename}}{% endmacro -%} 79 + 80 + ### 81 + # Container usage base jobs 82 + {% for distro in distributions -%} {%- for image in distro.images %} 83 + 84 + # Base for using {{ distro.name|capitalize }} {{image.codename}} image 85 + {{base_job_to_use_image(distro, image)}}: 86 + extends: 87 + - .monado.variables.{{distro.name}}:{{image.codename}} 88 + - .fdo.{{ "suffixed" if "repo_suffix" in image else "distribution" }}-image@{{distro.name}} # from ci-templates 89 + 90 + {% endfor -%} {%- endfor %} 91 + 92 + {# Macro to compute job name to extend to use image given a package we want#} 93 + {% macro base_job_to_use_image_containing(package) %} 94 + {% for distro in distributions -%} {%- for image in distro.images if package in image.packages %} 95 + {{ base_job_to_use_image(distro, image) if loop.first }} 96 + {% endfor -%} {%- endfor %} 97 + {% endmacro -%} 98 + 99 + # Style check job 100 + format-and-spellcheck: 101 + extends: 102 + - {{base_job_to_use_image_containing("codespell")}} 103 + stage: build 104 + script: 105 + - scripts/format-and-spellcheck.sh 106 + artifacts: 107 + paths: 108 + - patches/ 109 + expire_in: 1 week 110 + when: on_failure 111 + 112 + # Verify REUSE compliance 113 + reuse: 114 + stage: build 115 + image: 116 + name: fsfe/reuse:latest 117 + entrypoint: [""] 118 + script: 119 + - reuse lint 120 + 121 + {% macro make_cmake_args(cmake_defines) %} 122 + {% if cmake_defines is defined %} 123 + {%- for k, v in cmake_defines |dictsort %} -D{{ k }}={{ v }}{% endfor %} 124 + {%- endif %} 125 + {%- endmacro -%} 126 + 127 + {#### Main build jobs ####} 128 + {% for distro in distributions -%} {%- for image in distro.images if image.build_jobs -%} {%- for job in image.build_jobs %} 129 + 130 + {{job.name}}: 131 + stage: build 132 + extends: 133 + - {{base_job_to_use_image(distro, image)}} 134 + 135 + {% if job.before_script %} 136 + before_script: 137 + {% for line in job.before_script %} 138 + - {{line}} 139 + {% endfor %} 140 + {% endif %} 141 + script: 142 + - rm -rf build 143 + 144 + {#- meson builds -#} 145 + {%- if "meson" in job.name %} 146 + 147 + - meson setup build . 148 + {%- if job.args %} {{ job.args | join(' ') }}{% endif %} 149 + 150 + - ninja -C build 151 + 152 + {#- regular or NDK cmake builds -#} 153 + {%- elif "cmake" in job.name or "ndk" in job.name %} 154 + 155 + - cmake -GNinja -B build -S . {{- make_cmake_args(job.cmake_defines) }} 156 + - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt 157 + - ninja -C build 158 + 159 + {%- else %} 160 + 161 + {# error message #} 162 + CANNOT GUESS JOB TYPE 163 + 164 + {%- endif %} 165 + 166 + {%- if "cmake" in job.name %} 167 + 168 + - cd build && ctest --output-on-failure 169 + {%- endif %} 170 + 171 + {%- if job.artifact_path %} 172 + 173 + artifacts: 174 + paths: 175 + - {{ job.artifact_path }} 176 + {%- endif %} 177 + 178 + {% endfor -%} {%- endfor -%} {%- endfor %} 179 + 180 + # Packaging 181 + .monado.packaging.conditions: 182 + rules: 183 + # Only the default branch of the "upstream" repo. 184 + - if: "$CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH" 185 + when: on_success 186 + # Otherwise, don't build packages. 187 + - when: never 188 + 189 + {% macro packaging_job_name(distro, image) -%} 190 + {{distro.name}}:{{image.codename}}:package 191 + {%- endmacro %} 192 + 193 + {% for distro in distributions -%} {%- for image in distro.images if "deb_version_suffix" in image %} 194 + 195 + {{packaging_job_name(distro, image)}}: 196 + extends: 197 + - {{base_job_to_use_image(distro, image)}} 198 + - .monado.packaging.conditions 199 + variables: 200 + GIT_STRATEGY: clone 201 + DEBFULLNAME: "{{packaging.name}}" 202 + DEBEMAIL: "{{packaging.email}}" 203 + DISTRO: {{distro.name}} 204 + CODENAME: {{image.codename}} 205 + DEB_VERSION_SUFFIX: {{image.deb_version_suffix}} 206 + stage: package 207 + before_script: 208 + {# Configure git - needed despite not actually committing here. #} 209 + - git config --global user.name {{packaging.name}} 210 + - git config --global user.email {{packaging.email}} 211 + script: 212 + # Prep the source tree 213 + - git clean -dfx 214 + # Call this script to build binary and source packages. 215 + # Can try locally by exporting the right variables and passing -B to get only a binary package to avoid complaints. 216 + - .gitlab-ci/build-and-submit-package.sh 217 + artifacts: 218 + paths: 219 + - "incoming/" 220 + expire_in: 2 days 221 + {% endfor -%} {%- endfor %} 222 + 223 + reprepro:package: 224 + stage: reprepro 225 + extends: 226 + - {{ base_job_to_use_image_containing("reprepro") }} 227 + dependencies: 228 + {% for distro in distributions -%} {%- for image in distro.images if "deb_version_suffix" in image %} 229 + - {{packaging_job_name(distro, image)}} 230 + {% endfor -%} {%- endfor %} 231 + script: 232 + - bash .gitlab-ci/reprepro.sh 233 + artifacts: 234 + paths: 235 + - "repo/" 236 + expire_in: 2 days 237 + 238 + ### 239 + # Pages 240 + ### 241 + pages: 242 + stage: pages 243 + only: 244 + - main 245 + dependencies: 246 + - debian:cmake 247 + - reprepro:package 248 + script: 249 + - mkdir -p public 250 + - mv build/doc/html/* public/ 251 + - mv repo public/apt 252 + artifacts: 253 + paths: 254 + - public
+235
.gitlab-ci/config.yml
··· 1 + # SPDX-License-Identifier: CC0-1.0 2 + # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors 3 + 4 + # Please run the following from the repo root after modifying this file: 5 + # make -f .gitlab-ci/ci-scripts.mk 6 + 7 + fdo_ci_templates_sha: 34039cd573a2df832d465bc9e4c5f543571f5241 8 + 9 + # These are a mapping, instead of a list/array, so we can merge. 10 + .default_debian_packages: 11 + &default_debian_packages # Packages required for build and some other basic jobs 12 + build-essential: 13 + git: 14 + wget: 15 + unzip: 16 + cmake: 17 + meson: 18 + ninja-build: 19 + libeigen3-dev: 20 + curl: 21 + patch: 22 + python3: 23 + pkg-config: 24 + libx11-dev: 25 + libx11-xcb-dev: 26 + libxxf86vm-dev: 27 + libxrandr-dev: 28 + libxcb-randr0-dev: 29 + libvulkan-dev: 30 + glslang-tools: 31 + libglvnd-dev: 32 + libgl1-mesa-dev: 33 + ca-certificates: 34 + libusb-1.0-0-dev: 35 + libudev-dev: 36 + # These are optional packages, that we're building against to ensure we build as much code as possible 37 + libhidapi-dev: 38 + libwayland-dev: 39 + libuvc-dev: 40 + libavcodec-dev: 41 + libopencv-dev: 42 + libv4l-dev: 43 + libcjson-dev: 44 + libsdl2-dev: 45 + libegl1-mesa-dev: 46 + libdbus-1-dev: 47 + libgstreamer1.0-dev: 48 + libgstreamer-plugins-base1.0-dev: 49 + libsystemd-dev: 50 + libbsd-dev: 51 + # Only used for building packages 52 + devscripts: 53 + debhelper: 54 + dput-ng: 55 + gettext-base: 56 + pandoc: 57 + 58 + # These config defines are used for all NDK builds 59 + .android_cmake_defines: &android_cmake_defines 60 + ANDROID_PLATFORM: 26 61 + CMAKE_TOOLCHAIN_FILE: /opt/android-ndk/build/cmake/android.toolchain.cmake 62 + Eigen3_DIR: /usr/lib/cmake/eigen3/ 63 + EIGEN3_INCLUDE_DIR: /usr/include/eigen3 64 + 65 + # The distributions we'll make an image for 66 + distributions: 67 + - name: debian 68 + images: 69 + # This image does some extra work. 70 + - codename: bullseye 71 + script: i386_and_proclamation_container_prep.sh 72 + tag: "2022-01-24.0" 73 + deb_version_suffix: bpo11 74 + packages: 75 + <<: *default_debian_packages 76 + codespell: 77 + doxygen: 78 + graphviz: 79 + python3-pip: 80 + python3-click: 81 + clang-format: 82 + build_jobs: 83 + - name: "debian:cmake" 84 + # Generate "changes since last release" and add to changelog, 85 + # since this is the build that makes our docs. 86 + before_script: 87 + - pushd doc/changes 88 + - proclamation build --overwrite vNEXT 89 + - popd 90 + artifact_path: build/doc/html/ 91 + 92 + - name: "debian:cmake-no-opencv" 93 + cmake_defines: 94 + BUILD_DOC: "OFF" 95 + XRT_HAVE_OPENCV: "OFF" 96 + 97 + - name: "debian:cmake-no-sdl2" 98 + cmake_defines: 99 + BUILD_DOC: "OFF" 100 + XRT_HAVE_SDL2: "OFF" 101 + 102 + - name: "debian:cmake-no-service" 103 + cmake_defines: 104 + BUILD_DOC: "OFF" 105 + XRT_FEATURE_SERVICE: "OFF" 106 + 107 + - name: "debian:cmake:32bit" 108 + cmake_defines: 109 + CMAKE_TOOLCHAIN_FILE: .gitlab-ci/i386.cmake 110 + # OpenCV doesn't play nicely with us in multi-arch. 111 + XRT_HAVE_OPENCV: "OFF" 112 + 113 + - name: "debian:meson" 114 + 115 + - name: "debian:meson:32bit" 116 + args: 117 + - --prefix=/usr 118 + - --libdir=/usr/lib/i386-linux-gnu 119 + - --cross-file=.gitlab-ci/i386-cross.txt 120 + 121 + # This one is pretty minimal, compared to the others. 122 + - codename: bullseye-ndk 123 + distro_version: bullseye 124 + repo_suffix: ndk 125 + script: ndk_container_prep.sh 126 + tag: "2022-01-24.0" 127 + packages: 128 + git: 129 + wget: 130 + unzip: 131 + cmake: 132 + meson: 133 + ninja-build: 134 + libeigen3-dev: 135 + python3: 136 + pkg-config: 137 + ca-certificates: 138 + glslang-tools: 139 + build_jobs: 140 + - name: "ndk:armeabi-v7a" 141 + cmake_defines: 142 + <<: *android_cmake_defines 143 + BUILD_DOC: "OFF" 144 + ANDROID_ABI: armeabi-v7a 145 + 146 + - name: "ndk:arm64-v8a" 147 + cmake_defines: 148 + <<: *android_cmake_defines 149 + BUILD_DOC: "OFF" 150 + ANDROID_ABI: arm64-v8a 151 + 152 + - name: ubuntu 153 + images: 154 + # LTS 155 + - codename: focal 156 + distro_version: "20.04" 157 + tag: "2022-01-24.0" 158 + deb_version_suffix: ubuntu2004 159 + packages: 160 + <<: *default_debian_packages 161 + build_jobs: 162 + - name: "ubuntu:cmake" 163 + cmake_defines: 164 + BUILD_DOC: "OFF" 165 + 166 + - name: "ubuntu:meson" 167 + 168 + - codename: hirsute 169 + distro_version: "21.04" 170 + tag: "2022-01-24.0" 171 + deb_version_suffix: ubuntu2104 172 + packages: 173 + <<: *default_debian_packages 174 + 175 + - codename: impish 176 + distro_version: "21.10" 177 + tag: "2022-01-24.0" 178 + deb_version_suffix: ubuntu2110 179 + packages: 180 + <<: *default_debian_packages 181 + reprepro: 182 + build_jobs: 183 + - name: "ubuntu:latest:cmake" 184 + cmake_defines: 185 + BUILD_DOC: "OFF" 186 + 187 + - name: arch 188 + images: 189 + - codename: rolling 190 + tag: "2022-01-24.0" 191 + packages: 192 + git: 193 + gcc: 194 + clang: 195 + cmake: 196 + meson: 197 + ninja: 198 + pkgconfig: 199 + python3: 200 + diffutils: 201 + patch: 202 + doxygen: 203 + graphviz: 204 + eigen: 205 + hidapi: 206 + libxrandr: 207 + mesa: 208 + glslang: 209 + vulkan-headers: 210 + vulkan-icd-loader: 211 + check: 212 + glfw-x11: 213 + libusb: 214 + opencv: 215 + gtk3: 216 + ffmpeg: 217 + v4l-utils: 218 + qt5-base: 219 + build_jobs: 220 + - name: "arch:cmake" 221 + 222 + - name: "arch:cmake:clang" 223 + cmake_defines: 224 + CMAKE_C_COMPILER: /usr/bin/clang 225 + CMAKE_CXX_COMPILER: /usr/bin/clang++ 226 + 227 + - name: "arch:meson" 228 + 229 + android: 230 + platform: 26 231 + 232 + packaging: 233 + # Name and email associated with the package 234 + name: "Monado CI" 235 + email: "ryan.pavlik@collabora.com"
-4
.gitlab-ci/debian_bullseye_container_prep.sh .gitlab-ci/i386_and_proclamation_container_prep.sh
··· 6 6 cd $(dirname $0) 7 7 bash ./install-cross.sh 8 8 ) 9 - ( 10 - cd $(dirname $0) 11 - bash ./build-openxr-openhmd.sh 12 - ) 13 9 14 10 python3 -m pip install proclamation
-12
.gitlab-ci/debian_buster_container_prep.sh
··· 1 - #!/bin/bash 2 - # Copyright 2018-2020, Collabora, Ltd. and the Monado contributors 3 - # SPDX-License-Identifier: BSL-1.0 4 - 5 - ( 6 - cd $(dirname $0) 7 - bash ./install-cross.sh 8 - ) 9 - ( 10 - cd $(dirname $0) 11 - bash ./build-openxr-openhmd.sh 12 - )
+26 -1
.gitlab-ci/distributions
··· 1 1 Origin: monado.freedesktop.org 2 2 Description: Monado CI apt repository 3 - Codename: ${DISTRO} 3 + Codename: bullseye 4 + Architectures: amd64 i386 source 5 + Components: main 6 + Tracking: minimal 7 + SignWith: ${MONADO_GPG_FINGERPRINT} 8 + 9 + Origin: monado.freedesktop.org 10 + Description: Monado CI apt repository 11 + Codename: focal 12 + Architectures: amd64 i386 source 13 + Components: main 14 + Tracking: minimal 15 + SignWith: ${MONADO_GPG_FINGERPRINT} 16 + 17 + Origin: monado.freedesktop.org 18 + Description: Monado CI apt repository 19 + Codename: hirsute 20 + Architectures: amd64 i386 source 21 + Components: main 22 + Tracking: minimal 23 + SignWith: ${MONADO_GPG_FINGERPRINT} 24 + 25 + Origin: monado.freedesktop.org 26 + Description: Monado CI apt repository 27 + Codename: impish 4 28 Architectures: amd64 i386 source 5 29 Components: main 6 30 Tracking: minimal 7 31 SignWith: ${MONADO_GPG_FINGERPRINT} 32 +
+33
.gitlab-ci/distributions.jinja
··· 1 + {# 2 + Copyright 2020-2022, Collabora, Ltd. 3 + 4 + SPDX-License-Identifier: BSL-1.0 5 + #} 6 + {# 7 + Template for reprepro distributions config file. 8 + 9 + After this template gets expanded, with a paragraph for each 10 + distribution codename supported, 11 + the GPG fingerprint gets substituted into that at CI time using envsubst, 12 + (not ahead of time using ci-fairy) 13 + because the fingerprint is included in the "secrets" in CI. 14 + 15 + Note: There is no way to indicate comments in the reprepro distributions config 16 + file format, and whitespace is meaningful (need blank lines between paragraphs). 17 + 18 + Please run the following after modifying this file: 19 + 20 + ci-fairy generate-template --config .gitlab-ci/config.yml .gitlab-ci/distributions.jinja > .gitlab-ci/distributions 21 + 22 + or just use the makefile. 23 + #} 24 + {% for distro in distributions -%} {%- for image in distro.images if "deb_version_suffix" in image %} 25 + Origin: monado.freedesktop.org 26 + Description: Monado CI apt repository 27 + Codename: {{ image.codename }} 28 + Architectures: amd64 i386 source 29 + Components: main 30 + Tracking: minimal 31 + SignWith: ${MONADO_GPG_FINGERPRINT} 32 + 33 + {% endfor -%} {%- endfor %}
+4 -2
.gitlab-ci/distributions.license
··· 1 - Copyright 2020, Collabora, Ltd. 1 + Copyright 2020-2022, Collabora, Ltd. 2 2 3 - SPDX-License-Identifier: BSL-1.0 3 + SPDX-License-Identifier: BSL-1.0 4 + 5 + Generated from distributions.jinja with ci-fairy
+5
.gitlab-ci/gpg-agent.conf
··· 1 + # SPDX-License-Identifier: CC0-1.0 2 + # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors 3 + 4 + # Used for CI package building. 5 + allow-loopback-pinentry
+6
.gitlab-ci/gpg.conf
··· 1 + # SPDX-License-Identifier: CC0-1.0 2 + # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors 3 + 4 + # Used for CI package building. 5 + use-agent 6 + pinentry-mode loopback
+71
.gitlab-ci/reprepro.sh
··· 1 + #!/usr/bin/env bash 2 + # SPDX-License-Identifier: CC0-1.0 3 + # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors 4 + 5 + ############################################### 6 + # GENERATED - DO NOT EDIT # 7 + # see .gitlab-ci/reprepro.sh.template instead # 8 + ############################################### 9 + 10 + 11 + set -euo pipefail 12 + 13 + # Convince gnupg to work properly in CI 14 + echo "Import and cache the GPG key" 15 + mkdir -p ~/.gnupg && chmod 700 ~/.gnupg 16 + cp .gitlab-ci/gpg.conf .gitlab-ci/gpg-agent.conf ~/.gnupg 17 + echo RELOADAGENT | gpg-connect-agent 18 + gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase "${MONADO_GPG_PASSPHRASE}" --import "${MONADO_GPG_SECRET_KEY}" 19 + 20 + echo "Prepare reprepro config" 21 + mkdir -p repo/conf 22 + # Substitute in the GPG fingerprint into the repository config. 23 + # This file is itself generated with ci-fairy. 24 + cat .gitlab-ci/distributions | envsubst > repo/conf/distributions 25 + 26 + echo "reprepro config file:" 27 + echo "---------------------" 28 + cat repo/conf/distributions 29 + echo "---------------------" 30 + 31 + # For each distro, sign the changes file and add it to the repo. 32 + 33 + # bullseye 34 + if [ -f "incoming/bullseye.distro" ]; then 35 + VERSION=$(cat incoming/bullseye.distro) 36 + echo "Signing and processing bullseye: ${VERSION}" 37 + debsign -k "${MONADO_GPG_FINGERPRINT}" -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE}" "incoming/monado_${VERSION}_amd64.changes" 38 + reprepro -V --ignore=wrongdistribution -b repo include bullseye "incoming/monado_${VERSION}_amd64.changes" 39 + else 40 + echo "Skipping bullseye - no artifact found" 41 + fi 42 + 43 + # focal 44 + if [ -f "incoming/focal.distro" ]; then 45 + VERSION=$(cat incoming/focal.distro) 46 + echo "Signing and processing focal: ${VERSION}" 47 + debsign -k "${MONADO_GPG_FINGERPRINT}" -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE}" "incoming/monado_${VERSION}_amd64.changes" 48 + reprepro -V --ignore=wrongdistribution -b repo include focal "incoming/monado_${VERSION}_amd64.changes" 49 + else 50 + echo "Skipping focal - no artifact found" 51 + fi 52 + 53 + # hirsute 54 + if [ -f "incoming/hirsute.distro" ]; then 55 + VERSION=$(cat incoming/hirsute.distro) 56 + echo "Signing and processing hirsute: ${VERSION}" 57 + debsign -k "${MONADO_GPG_FINGERPRINT}" -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE}" "incoming/monado_${VERSION}_amd64.changes" 58 + reprepro -V --ignore=wrongdistribution -b repo include hirsute "incoming/monado_${VERSION}_amd64.changes" 59 + else 60 + echo "Skipping hirsute - no artifact found" 61 + fi 62 + 63 + # impish 64 + if [ -f "incoming/impish.distro" ]; then 65 + VERSION=$(cat incoming/impish.distro) 66 + echo "Signing and processing impish: ${VERSION}" 67 + debsign -k "${MONADO_GPG_FINGERPRINT}" -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE}" "incoming/monado_${VERSION}_amd64.changes" 68 + reprepro -V --ignore=wrongdistribution -b repo include impish "incoming/monado_${VERSION}_amd64.changes" 69 + else 70 + echo "Skipping impish - no artifact found" 71 + fi
+48
.gitlab-ci/reprepro.sh.jinja
··· 1 + #!/usr/bin/env bash 2 + # SPDX-License-Identifier: CC0-1.0 3 + # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors 4 + 5 + {# ignore the warning, this is actually the template to edit. #} 6 + ############################################### 7 + # GENERATED - DO NOT EDIT # 8 + # see .gitlab-ci/reprepro.sh.template instead # 9 + ############################################### 10 + {# 11 + Please run the following after editing: 12 + ci-fairy generate-template --config .gitlab-ci/config.yml .gitlab-ci/reprepro.sh.template > .gitlab-ci/reprepro.sh 13 + #} 14 + 15 + 16 + set -euo pipefail 17 + 18 + # Convince gnupg to work properly in CI 19 + echo "Import and cache the GPG key" 20 + mkdir -p ~/.gnupg && chmod 700 ~/.gnupg 21 + cp .gitlab-ci/gpg.conf .gitlab-ci/gpg-agent.conf ~/.gnupg 22 + echo RELOADAGENT | gpg-connect-agent 23 + gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase "${MONADO_GPG_PASSPHRASE}" --import "${MONADO_GPG_SECRET_KEY}" 24 + 25 + echo "Prepare reprepro config" 26 + mkdir -p repo/conf 27 + # Substitute in the GPG fingerprint into the repository config. 28 + # This file is itself generated with ci-fairy. 29 + cat .gitlab-ci/distributions | envsubst > repo/conf/distributions 30 + 31 + echo "reprepro config file:" 32 + echo "---------------------" 33 + cat repo/conf/distributions 34 + echo "---------------------" 35 + 36 + # For each distro, sign the changes file and add it to the repo. 37 + {% for distro in distributions -%} {%- for image in distro.images if "deb_version_suffix" in image %} 38 + 39 + # {{ image.codename }} 40 + if [ -f "incoming/{{image.codename}}.distro" ]; then 41 + VERSION=$(cat incoming/{{image.codename}}.distro) 42 + echo "Signing and processing {{image.codename}}: ${VERSION}" 43 + debsign -k "${MONADO_GPG_FINGERPRINT}" -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE}" "incoming/monado_${VERSION}_amd64.changes" 44 + reprepro -V --ignore=wrongdistribution -b repo include {{image.codename}} "incoming/monado_${VERSION}_amd64.changes" 45 + else 46 + echo "Skipping {{image.codename}} - no artifact found" 47 + fi 48 + {% endfor -%} {%- endfor %}
-7
.gitlab-ci/ubuntu_focal_container_prep.sh
··· 1 - #!/bin/bash 2 - # Copyright 2018-2020, Collabora, Ltd. and the Monado contributors 3 - # SPDX-License-Identifier: BSL-1.0 4 - ( 5 - cd $(dirname $0) 6 - bash ./build-openxr-openhmd.sh 7 - )
-5
.gitlab-ci/ubuntu_hirsute_container_prep.sh
··· 1 - #!/bin/bash 2 - # Copyright 2021, Collabora, Ltd. and the Monado contributors 3 - # SPDX-License-Identifier: BSL-1.0 4 - 5 - # Nothing really needed.
-5
.gitlab-ci/ubuntu_impish_container_prep.sh
··· 1 - #!/bin/bash 2 - # Copyright 2021, Collabora, Ltd. and the Monado contributors 3 - # SPDX-License-Identifier: BSL-1.0 4 - 5 - # Nothing really needed.