The open source OpenXR runtime
0
fork

Configure Feed

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

ci: Publish apt repo to GitLab Pages instead of artifact hosting.

+135 -86
+119 -76
.gitlab-ci.yml
··· 6 6 7 7 .templates_sha: &templates_sha 322bf2b8f29b6491caeb13861201e96969ddc169 8 8 9 + .package_only_branch: &package_only_branch master 10 + 9 11 # Variables listing packages for Debian-based distros 10 - .monado.debian-based-packages: 12 + .monado.variables.debian-based-packages: 11 13 variables: 12 14 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" 13 15 FEATURE_PACKAGES: "libhidapi-dev libwayland-dev libuvc-dev libavcodec-dev libopencv-dev libv4l-dev libcjson-dev libsdl2-dev libegl1-mesa-dev" 14 - PACKAGING_PACKAGES: "devscripts debhelper osc osc-plugins-dput reprepro" 16 + PACKAGING_PACKAGES: "devscripts debhelper osc osc-plugins-dput dput-ng gettext-base" 15 17 TOOLS_REQUIRED_PACKAGES: "clang-format-7 codespell doxygen graphviz python3-pip python3-click" 16 18 17 19 # Variables for build and usage of Debian 10 (Buster) image 18 - .monado.debian:buster: 20 + .monado.variables.debian:buster: 19 21 variables: 20 22 FDO_DISTRIBUTION_VERSION: buster 21 - FDO_DISTRIBUTION_TAG: "2020-05-06.2" 23 + FDO_DISTRIBUTION_TAG: "2020-05-11.0" 22 24 23 25 # Variables for build and usage of Ubuntu 20.04 LTS (Focal) image 24 - .monado.ubuntu:focal: 26 + .monado.variables.ubuntu:focal: 25 27 variables: 26 28 FDO_DISTRIBUTION_VERSION: "20.04" 27 - FDO_DISTRIBUTION_TAG: "2020-05-06.2" 29 + FDO_DISTRIBUTION_TAG: "2020-05-11.1" 28 30 29 31 # Variables for build and usage of Debian 10 (Buster) + Android NDK image 30 - .monado.debian:buster-ndk: 32 + .monado.variables.debian:buster-ndk: 31 33 variables: 32 34 FDO_DISTRIBUTION_VERSION: buster 33 35 FDO_DISTRIBUTION_TAG: "2020-05-06.0" 34 36 FDO_REPO_SUFFIX: ndk 35 37 36 38 # Variables for build and usage of Arch Linux image 37 - .monado.arch:rolling: 39 + .monado.variables.arch:rolling: 38 40 variables: 39 41 FDO_DISTRIBUTION_TAG: "2019-04-28.0" 40 42 ··· 53 55 - container_prep 54 56 - build 55 57 - package 58 + - reprepro 56 59 - pages 57 60 - deploy 58 61 ··· 60 63 # Container prep jobs 61 64 62 65 # Base for all container prep 63 - .monado.container_base: 66 + .monado.variables.container-prep-base: 64 67 # "stage" set here doesn't work, for some reason 65 68 variables: 66 69 # no need to pull the whole tree for rebuilding the image - is this still needed? 67 70 GIT_STRATEGY: none 68 - # Each most-derived job has a script to set up stuff for it. 71 + # Each most-derived container prep job has a script to set up stuff for it. 69 72 FDO_DISTRIBUTION_EXEC: "bash .gitlab-ci/${CI_JOB_NAME}.sh" 70 73 71 74 # Debian Buster (x64 + i386) 72 75 debian:container_prep: 73 76 stage: container_prep 74 77 extends: 75 - - .monado.debian:buster # local - variables 76 - - .monado.container_base # local 77 - - .monado.debian-based-packages # local - variables 78 + - .monado.variables.debian:buster 79 + - .monado.variables.container-prep-base 80 + - .monado.variables.debian-based-packages 78 81 - .fdo.container-build@debian # from ci-templates 79 82 variables: 80 - # a list of packages to install - assembled from .monado.debian-based-packages 81 - FDO_DISTRIBUTION_PACKAGES: "${CORE_REQUIRED_PACKAGES} ${FEATURE_PACKAGES} ${PACKAGING_PACKAGES} ${TOOLS_REQUIRED_PACKAGES}" 83 + # a list of packages to install - assembled from .monado.variables.debian-based-packages, plus reprepro 84 + FDO_DISTRIBUTION_PACKAGES: "${CORE_REQUIRED_PACKAGES} ${FEATURE_PACKAGES} ${PACKAGING_PACKAGES} ${TOOLS_REQUIRED_PACKAGES} reprepro" 82 85 83 86 # Arch Linux (x64) 84 87 arch:container_prep: 85 88 stage: container_prep 86 89 extends: 87 - - .monado.arch:rolling # local 88 - - .monado.container_base # local 90 + - .monado.variables.arch:rolling 91 + - .monado.variables.container-prep-base 89 92 - .fdo.container-build@arch # from ci-templates 90 93 variables: 91 94 # a list of packages to install ··· 95 98 ubuntu:container_prep: 96 99 stage: container_prep 97 100 extends: 98 - - .monado.ubuntu:focal # local - variables 99 - - .monado.container_base # local 100 - - .monado.debian-based-packages # local - variables 101 + - .monado.variables.ubuntu:focal 102 + - .monado.variables.container-prep-base 103 + - .monado.variables.debian-based-packages 101 104 - .fdo.container-build@ubuntu # from ci-templates 102 105 variables: 103 - # a list of packages to install - assembled from .monado.debian-based-packages 106 + # a list of packages to install - assembled from .monado.variables.debian-based-packages 104 107 FDO_DISTRIBUTION_PACKAGES: "${CORE_REQUIRED_PACKAGES} ${FEATURE_PACKAGES} ${PACKAGING_PACKAGES} ${TOOLS_REQUIRED_PACKAGES}" 105 108 106 109 # Debian Buster + the Android NDK in /opt/android-ndk ··· 108 111 ndk:container_prep: 109 112 stage: container_prep 110 113 extends: 111 - - .monado.debian:buster-ndk # local 112 - - .monado.container_base # local 114 + - .monado.variables.debian:buster-ndk 115 + - .monado.variables.container-prep-base 113 116 - .fdo.container-build@debian # from ci-templates 114 117 variables: 115 - # Repo suffix is set in .monado.debian:buster-ndk 118 + # Repo suffix is set in .monado.variables.debian:buster-ndk 116 119 # a list of packages to install 117 120 FDO_DISTRIBUTION_PACKAGES: "git wget unzip cmake meson ninja-build libeigen3-dev python3 pkg-config ca-certificates glslang-tools" 118 121 122 + # Style check job 119 123 format-and-spellcheck: 120 124 extends: 121 - - .monado.debian:buster # local 125 + - .monado.variables.debian:buster 122 126 - .fdo.distribution-image@debian # from ci-templates 123 127 stage: build 124 128 script: ··· 130 134 when: on_failure 131 135 132 136 # "Base" job for a CMake build 133 - .monado.build-cmake: 137 + .monado.base-job.build-cmake: 134 138 stage: build 135 139 script: 136 140 - mkdir build ··· 139 143 - ninja 140 144 141 145 # "Base" job for a Meson build 142 - .monado.build-meson: 146 + .monado.base-job.build-meson: 143 147 stage: build 144 148 script: 145 149 - mkdir build ··· 149 153 150 154 debian:cmake: 151 155 extends: 152 - - .monado.debian:buster # local 156 + - .monado.variables.debian:buster 153 157 - .fdo.distribution-image@debian # from ci-templates 154 - - .monado.build-cmake # local 158 + - .monado.base-job.build-cmake 155 159 before_script: 156 160 # Generate "changes since last release" and add to changelog, 157 161 # since this is the build that makes our docs. ··· 165 169 166 170 debian:cmake-no-opencv: 167 171 extends: 168 - - .monado.debian:buster # local 172 + - .monado.variables.debian:buster 169 173 - .fdo.distribution-image@debian # from ci-templates 170 - - .monado.build-cmake # local 174 + - .monado.base-job.build-cmake 171 175 variables: 172 176 CMAKE_ARGS: -DBUILD_WITH_OPENCV=OFF 173 177 174 178 debian:cmake-no-opengl: 175 179 extends: 176 - - .monado.debian:buster # local 180 + - .monado.variables.debian:buster 177 181 - .fdo.distribution-image@debian # from ci-templates 178 - - .monado.build-cmake # local 182 + - .monado.base-job.build-cmake 179 183 variables: 180 184 CMAKE_ARGS: -DBUILD_WITH_OPENGL=OFF 181 185 182 186 debian:cmake-no-sdl2: 183 187 extends: 184 - - .monado.debian:buster # local 188 + - .monado.variables.debian:buster 185 189 - .fdo.distribution-image@debian # from ci-templates 186 - - .monado.build-cmake # local 190 + - .monado.base-job.build-cmake 187 191 variables: 188 192 CMAKE_ARGS: -DBUILD_WITH_SDL2=OFF 189 193 190 194 arch:cmake: 191 195 extends: 192 - - .monado.arch:rolling # local 196 + - .monado.variables.arch:rolling 193 197 - .fdo.distribution-image@arch # from ci-templates 194 - - .monado.build-cmake # local 198 + - .monado.base-job.build-cmake 195 199 196 200 ubuntu:cmake: 197 201 extends: 198 - - .monado.ubuntu:focal # local 202 + - .monado.variables.ubuntu:focal 199 203 - .fdo.distribution-image@ubuntu # from ci-templates 200 - - .monado.build-cmake # local 204 + - .monado.base-job.build-cmake 201 205 202 206 debian:meson: 203 207 extends: 204 - - .monado.debian:buster # local 208 + - .monado.variables.debian:buster 205 209 - .fdo.distribution-image@debian # from ci-templates 206 - - .monado.build-meson # local 210 + - .monado.base-job.build-meson 207 211 208 212 ubuntu:meson: 209 213 extends: 210 - - .monado.ubuntu:focal # local 214 + - .monado.variables.ubuntu:focal 211 215 - .fdo.distribution-image@ubuntu # from ci-templates 212 - - .monado.build-meson # local 216 + - .monado.base-job.build-meson 213 217 214 218 arch:meson: 215 219 extends: 216 - - .monado.arch:rolling # local 220 + - .monado.variables.arch:rolling 217 221 - .fdo.distribution-image@arch # from ci-templates 218 - - .monado.build-meson # local 222 + - .monado.base-job.build-meson 219 223 variables: 220 224 MESON_ARGS: -Ddocs=disabled 221 225 222 226 # Cross-compiling 223 227 debian:meson:32bit: 224 228 extends: 225 - - .monado.debian:buster # local 229 + - .monado.variables.debian:buster 226 230 - .fdo.distribution-image@debian # from ci-templates 227 - - .monado.build-meson # local 231 + - .monado.base-job.build-meson 228 232 variables: 229 233 MESON_ARGS: --prefix /usr --libdir /usr/lib/i386-linux-gnu --cross-file ../.gitlab-ci/i386-cross.txt 230 234 231 235 debian:cmake:32bit: 232 236 extends: 233 - - .monado.debian:buster # local 237 + - .monado.variables.debian:buster 234 238 - .fdo.distribution-image@debian # from ci-templates 235 - - .monado.build-cmake # local 239 + - .monado.base-job.build-cmake 236 240 variables: 237 241 # OpenCV and local OpenHMD doesn't play nicely with us in multi-arch. 238 242 CMAKE_ARGS: -DCMAKE_TOOLCHAIN_FILE=../.gitlab-ci/i386.cmake -DBUILD_WITH_OPENCV=off -DBUILD_WITH_OPENHMD=off 239 243 240 244 # Packaging 241 - .monado.debuild: 245 + .monado.base-job.debuild: 242 246 stage: package 243 247 only: 244 - - master 248 + - *package_only_branch 245 249 before_script: 246 - # Convince gnupg to work properly in CI 247 - - mkdir -p ~/.gnupg && chmod 700 ~/.gnupg 248 - - touch ~/.gnupg/gpg.conf 249 - - echo 'use-agent' > ~/.gnupg/gpg.conf 250 - - echo 'pinentry-mode loopback' >> ~/.gnupg/gpg.conf 251 - - touch ~/.gnupg/gpg-agent.conf 252 - - echo 'allow-loopback-pinentry' > ~/.gnupg/gpg-agent.conf 253 - - echo RELOADAGENT | gpg-connect-agent 254 - - gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE} --import ${MONADO_GPG_SECRET_KEY} 250 + # Configure git - needed despite not actually committing here. 251 + - git config --global user.email "ryan.pavlik@collabora.com" 252 + - git config --global user.name "Monado CI" 255 253 script: 256 254 # Prep the source tree 257 255 - git clean -dfx 258 - - git config --global user.email "ryan.pavlik@collabora.com" 259 - - git config --global user.name "Monado CI" 260 256 - git merge origin/${PACKAGE_BRANCH} --no-commit 261 257 - FULLNAME="Monado CI <ryan.pavlik@collabora.com>" debian/extra/prepare-commit-package.sh ${CI_COMMIT_SHA} 1~${BACKPORT_SUFFIX}~ci$(date --utc "+%Y%m%d") 262 258 # Build the package 263 259 - debuild -uc -us 264 - # Sign the package 265 - - debsign -k ${MONADO_GPG_FINGERPRINT} -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE}" 266 - # Use reprepro to create an apt repository in our artifacts 267 - - mkdir ${DISTRO} 268 - - mkdir ${DISTRO}/conf 269 - - cp .gitlab-ci/distributions ${DISTRO}/conf 270 - - reprepro -V --ignore=wrongdistribution -b ${DISTRO} include ${DISTRO} ../monado_$(dpkg-parsechangelog --show-field version)_amd64.changes 260 + # Use dput-ng to move the package-related files into some artifacts. 261 + - export INCOMING=$(pwd)/incoming 262 + - mkdir -p $INCOMING 263 + - mkdir -p ~/.dput.d/profiles 264 + - cat .gitlab-ci/localhost.json | envsubst > ~/.dput.d/profiles/localhost.json 265 + - dpkg-parsechangelog --show-field version > incoming/${DISTRO}.distro 266 + - dput --debug localhost ../monado_$(dpkg-parsechangelog --show-field version)_amd64.changes 271 267 artifacts: 272 268 paths: 273 - - "${DISTRO}/" 274 - expire_in: 30 days 269 + - "incoming/" 270 + expire_in: 2 days 275 271 276 272 debian:buster:package: 277 273 extends: 278 - - .monado.debian:buster # local 274 + - .monado.variables.debian:buster 279 275 - .fdo.distribution-image@debian # from ci-templates 280 - - .monado.debuild # local 276 + - .monado.base-job.debuild 281 277 variables: 282 278 BACKPORT_SUFFIX: bpo10 283 279 PACKAGE_BRANCH: debian/buster-backports ··· 285 281 286 282 ubuntu:focal:package: 287 283 extends: 288 - - .monado.ubuntu:focal # local 284 + - .monado.variables.ubuntu:focal 289 285 - .fdo.distribution-image@ubuntu # from ci-templates 290 - - .monado.debuild # local 286 + - .monado.base-job.debuild 291 287 variables: 292 288 BACKPORT_SUFFIX: ubuntu20.04 293 289 PACKAGE_BRANCH: ubuntu/focal 294 290 DISTRO: focal 295 291 292 + reprepro:package: 293 + stage: reprepro 294 + only: 295 + - *package_only_branch 296 + extends: 297 + - .monado.variables.debian:buster 298 + - .fdo.distribution-image@debian # from ci-templates 299 + dependencies: 300 + - debian:buster:package 301 + - ubuntu:focal:package 302 + before_script: 303 + # Convince gnupg to work properly in CI 304 + - mkdir -p ~/.gnupg && chmod 700 ~/.gnupg 305 + - touch ~/.gnupg/gpg.conf 306 + - echo 'use-agent' > ~/.gnupg/gpg.conf 307 + - echo 'pinentry-mode loopback' >> ~/.gnupg/gpg.conf 308 + - touch ~/.gnupg/gpg-agent.conf 309 + - echo 'allow-loopback-pinentry' > ~/.gnupg/gpg-agent.conf 310 + - echo RELOADAGENT | gpg-connect-agent 311 + - gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE} --import ${MONADO_GPG_SECRET_KEY} 312 + 313 + script: 314 + # Use reprepro to create an apt repository in our artifacts 315 + - mkdir -p repo/conf 316 + # For each distro, sign the changes file and add it to the repo. 317 + - | 318 + for fn in incoming/*.distro; do 319 + # parse the distro name out 320 + export DISTRO=$(echo $fn | sed -e 's:incoming/::' -e 's:[.]distro::') 321 + echo "Processing $DISTRO" 322 + # add distro to repository config - blank line is mandatory! 323 + cat .gitlab-ci/distributions | envsubst >> repo/conf/distributions 324 + echo >> repo/conf/distributions 325 + 326 + echo "Signing package for $DISTRO" 327 + debsign -k ${MONADO_GPG_FINGERPRINT} -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE}" incoming/monado_$(cat $fn)_amd64.changes 328 + 329 + echo "Adding package for $DISTRO to the repository" 330 + reprepro -V --ignore=wrongdistribution -b repo include ${DISTRO} incoming/monado_$(cat $fn)_amd64.changes 331 + done 332 + artifacts: 333 + paths: 334 + - "repo/" 335 + expire_in: 2 days 336 + 296 337 # Base of Android NDK builds. 297 338 # Takes the last :-delimited part of the name as the ABI to build for, 298 339 # so you don't need to do anything other than "extends" in the job 299 340 .monado.ndk:build-base: 300 341 stage: build 301 342 extends: 302 - - .monado.debian:buster-ndk # local 343 + - .monado.variables.debian:buster-ndk 303 344 - .fdo.suffixed-image@debian # from ci-templates 304 345 variables: 305 346 ANDROID_PLATFORM: 24 ··· 328 369 - master 329 370 dependencies: 330 371 - debian:cmake 372 + - reprepro:package 331 373 script: 332 374 - mkdir -p public 333 375 - mv build/doc/html/* public/ 376 + - mv repo public/apt 334 377 artifacts: 335 378 paths: 336 379 - public
+2 -10
.gitlab-ci/distributions
··· 1 1 Origin: monado.freedesktop.org 2 2 Description: Monado CI apt repository 3 - Codename: focal 4 - Architectures: amd64 i386 source 5 - Components: main 6 - Tracking: minimal 7 - SignWith: 43D1A31F598523E0CE948FCF065BE417396AA28E 8 - 9 - Origin: monado.freedesktop.org 10 - Description: Monado CI apt repository 11 - Codename: buster 3 + Codename: ${DISTRO} 12 4 Architectures: amd64 i386 source 13 5 Components: main 14 6 Tracking: minimal 15 - SignWith: 43D1A31F598523E0CE948FCF065BE417396AA28E 7 + SignWith: ${MONADO_GPG_FINGERPRINT}
+14
.gitlab-ci/localhost.json
··· 1 + { 2 + "+hooks": [ 3 + ], 4 + "-hooks": [ 5 + "gpg", 6 + "allowed-distribution", 7 + "suite-mismatch", 8 + "lintian" 9 + ], 10 + "incoming": "${INCOMING}", 11 + "meta": "debian", 12 + "method": "local", 13 + "run_lintian": false 14 + }