···11# SPDX-License-Identifier: CC0-1.0
22-# SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors
33-44-######################################
55-# GENERATED - DO NOT EDIT #
66-# see .gitlab-ci/ci.template instead #
77-######################################
22+# SPDX-FileCopyrightText: 2018-2021 Collabora, Ltd. and the Monado contributors
8394variables:
105 FDO_UPSTREAM_REPO: monado/monado
1161212-.templates_sha: &templates_sha 34039cd573a2df832d465bc9e4c5f543571f5241
77+.templates_sha: &templates_sha 14731f78c23c7b523a85a26a068ade9ac1ecd2f3
1381414-include:
1515- # Debian
1616- - project: "freedesktop/ci-templates"
1717- ref: *templates_sha
1818- file: "/templates/debian.yml"
1919- # Ubuntu
2020- - project: "freedesktop/ci-templates"
2121- ref: *templates_sha
2222- file: "/templates/ubuntu.yml"
2323- # Arch
2424- - project: "freedesktop/ci-templates"
2525- ref: *templates_sha
2626- file: "/templates/arch.yml"
99+# Variables listing packages for Debian-based distros
1010+.monado.variables.debian-based-packages:
1111+ variables:
1212+ # Packages required for build and some other basic jobs
1313+ 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"
27141515+ # These are optional packages, that we're building against to ensure we build as much code as possible
1616+ 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"
28172929-# Variables for build and usage of Debian bullseye image
3030-.monado.variables.debian:bullseye:
1818+ # Only used for building packages
1919+ PACKAGING_PACKAGES: "devscripts debhelper dput-ng gettext-base pandoc"
2020+2121+ # Used for ancillary "not compilation" jobs/features, like docs, changelogs, formatting, etc.
2222+ TOOLS_REQUIRED_PACKAGES: "codespell doxygen graphviz python3-pip python3-click"
2323+2424+ # The NDK builder uses only these packages
2525+ NDK_PACKAGES: "git wget unzip cmake meson ninja-build libeigen3-dev python3 pkg-config ca-certificates glslang-tools"
2626+2727+# Variables for build and usage of Debian 10 (Buster) image
2828+.monado.variables.debian:buster:
3129 variables:
3232- FDO_DISTRIBUTION_VERSION: "bullseye"
3333- FDO_DISTRIBUTION_TAG: "2022-01-19.0"
3030+ FDO_DISTRIBUTION_VERSION: buster
3131+ FDO_DISTRIBUTION_TAG: "2021-10-28.0"
34323535-# Variables for build and usage of Debian bullseye-ndk image
3636-.monado.variables.debian:bullseye-ndk:
3333+# Variables for build and usage of Debian 11 (Bullseye) image
3434+.monado.variables.debian:bullseye:
3735 variables:
3838- FDO_DISTRIBUTION_VERSION: "bullseye"
3939- FDO_DISTRIBUTION_TAG: "2022-01-19.0"
4040- FDO_REPO_SUFFIX: ndk
3636+ FDO_DISTRIBUTION_VERSION: bullseye
3737+ FDO_DISTRIBUTION_TAG: "2021-11-04.0"
41384242-# Variables for build and usage of Ubuntu focal image
3939+# Variables for build and usage of Ubuntu 20.04 LTS (Focal) image
4340.monado.variables.ubuntu:focal:
4441 variables:
4542 FDO_DISTRIBUTION_VERSION: "20.04"
4643 FDO_DISTRIBUTION_TAG: "2021-10-27.1"
47444848-# Variables for build and usage of Ubuntu hirsute image
4545+# Variables for build and usage of Ubuntu 21.04 (Hirsute) image
4946.monado.variables.ubuntu:hirsute:
5047 variables:
5148 FDO_DISTRIBUTION_VERSION: "21.04"
5249 FDO_DISTRIBUTION_TAG: "2021-10-27.1"
53505454-# Variables for build and usage of Ubuntu impish image
5151+# Variables for build and usage of Ubuntu 21.10 (Impish) image
5552.monado.variables.ubuntu:impish:
5653 variables:
5754 FDO_DISTRIBUTION_VERSION: "21.10"
5855 FDO_DISTRIBUTION_TAG: "2021-10-28.0"
59566060-# Variables for build and usage of Arch rolling image
5757+# Variables for build and usage of Debian 10 (Buster) + Android NDK image
5858+.monado.variables.debian:buster-ndk:
5959+ variables:
6060+ FDO_DISTRIBUTION_VERSION: buster
6161+ FDO_DISTRIBUTION_TAG: "2020-05-06.0"
6262+ FDO_REPO_SUFFIX: ndk
6363+6464+# Variables for build and usage of Arch Linux image
6165.monado.variables.arch:rolling:
6266 variables:
6363- FDO_DISTRIBUTION_VERSION: "rolling"
6467 FDO_DISTRIBUTION_TAG: "2021-09-14.0"
65686969+include:
7070+ - project: "freedesktop/ci-templates"
7171+ ref: *templates_sha
7272+ file: "/templates/debian.yml"
7373+ - project: "freedesktop/ci-templates"
7474+ ref: *templates_sha
7575+ file: "/templates/ubuntu.yml"
7676+ - project: "freedesktop/ci-templates"
7777+ ref: *templates_sha
7878+ file: "/templates/arch.yml"
7979+6680stages:
6781 - container_prep
6882 - build
···73877488###
7589# Container prep jobs
7676-# Make Debian bullseye image
9090+9191+# Base for all container prep
9292+.monado.variables.container-prep-base:
9393+ # "stage" set here doesn't work, for some reason
9494+ variables:
9595+ # no need to pull the whole tree for rebuilding the image - is this still needed?
9696+ GIT_STRATEGY: none
9797+ # Each most-derived container prep job has a script to set up stuff for it.
9898+ FDO_DISTRIBUTION_EXEC: "bash .gitlab-ci/$(echo ${CI_JOB_NAME} | sed 's/:/_/g').sh"
9999+100100+# Debian Buster (x64 + i386)
101101+debian:buster:container_prep:
102102+ stage: container_prep
103103+ extends:
104104+ - .monado.variables.debian:buster
105105+ - .monado.variables.container-prep-base
106106+ - .monado.variables.debian-based-packages
107107+ - .fdo.container-build@debian # from ci-templates
108108+ variables:
109109+ # a list of packages to install - assembled from .monado.variables.debian-based-packages, plus clang-format-7 (which we don't actually need anymore)
110110+ FDO_DISTRIBUTION_PACKAGES: "${CORE_REQUIRED_PACKAGES} ${FEATURE_PACKAGES} ${PACKAGING_PACKAGES} ${TOOLS_REQUIRED_PACKAGES} clang-format-7"
111111+112112+# Debian Bullseye (x64 + i386)
77113debian:bullseye:container_prep:
78114 stage: container_prep
79115 extends:
80116 - .monado.variables.debian:bullseye
117117+ - .monado.variables.container-prep-base
118118+ - .monado.variables.debian-based-packages
81119 - .fdo.container-build@debian # from ci-templates
82120 variables:
8383- 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'
8484- FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/i386_and_proclamation_container_prep.sh'
121121+ # a list of packages to install - assembled from .monado.variables.debian-based-packages, plus clang-format.
122122+ FDO_DISTRIBUTION_PACKAGES: "${CORE_REQUIRED_PACKAGES} ${FEATURE_PACKAGES} ${PACKAGING_PACKAGES} ${TOOLS_REQUIRED_PACKAGES} clang-format"
851238686-# Make Debian bullseye-ndk image
8787-debian:bullseye-ndk:container_prep:
124124+# Arch Linux (x64)
125125+arch:container_prep:
88126 stage: container_prep
89127 extends:
9090- - .monado.variables.debian:bullseye-ndk
9191- - .fdo.container-build@debian # from ci-templates
128128+ - .monado.variables.arch:rolling
129129+ - .monado.variables.container-prep-base
130130+ - .fdo.container-build@arch # from ci-templates
92131 variables:
9393- FDO_DISTRIBUTION_PACKAGES: 'ca-certificates cmake git glslang-tools libeigen3-dev meson ninja-build pkg-config python3 unzip wget'
9494- FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/ndk_container_prep.sh'
132132+ # a list of packages to install
133133+ 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"
951349696-# Make Ubuntu focal image
135135+# Ubuntu Focal (x64)
97136ubuntu:focal:container_prep:
98137 stage: container_prep
99138 extends:
100139 - .monado.variables.ubuntu:focal
140140+ - .monado.variables.container-prep-base
141141+ - .monado.variables.debian-based-packages
101142 - .fdo.container-build@ubuntu # from ci-templates
102143 variables:
103103- 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'
144144+ # a list of packages to install - assembled from .monado.variables.debian-based-packages
145145+ FDO_DISTRIBUTION_PACKAGES: "${CORE_REQUIRED_PACKAGES} ${FEATURE_PACKAGES} ${PACKAGING_PACKAGES}"
104146105105-# Make Ubuntu hirsute image
147147+# Ubuntu Hirsute (x64)
106148ubuntu:hirsute:container_prep:
107149 stage: container_prep
108150 extends:
109151 - .monado.variables.ubuntu:hirsute
152152+ - .monado.variables.container-prep-base
153153+ - .monado.variables.debian-based-packages
110154 - .fdo.container-build@ubuntu # from ci-templates
111155 variables:
112112- 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'
156156+ # a list of packages to install - assembled from .monado.variables.debian-based-packages
157157+ FDO_DISTRIBUTION_PACKAGES: "${CORE_REQUIRED_PACKAGES} ${FEATURE_PACKAGES} ${PACKAGING_PACKAGES}"
113158114114-# Make Ubuntu impish image
159159+# Ubuntu Impish (x64)
115160ubuntu:impish:container_prep:
116161 stage: container_prep
117162 extends:
118163 - .monado.variables.ubuntu:impish
164164+ - .monado.variables.container-prep-base
165165+ - .monado.variables.debian-based-packages
119166 - .fdo.container-build@ubuntu # from ci-templates
120167 variables:
121121- 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'
168168+ # a list of packages to install - assembled from .monado.variables.debian-based-packages, plus reprepro
169169+ FDO_DISTRIBUTION_PACKAGES: "${CORE_REQUIRED_PACKAGES} ${FEATURE_PACKAGES} ${PACKAGING_PACKAGES} reprepro"
122170123123-# Make Arch rolling image
124124-arch:rolling:container_prep:
171171+# Debian Buster + the Android NDK in /opt/android-ndk
172172+# The NDK itself gets installed by .gitlab-ci/ndk:container_prep.sh
173173+ndk:container_prep:
125174 stage: container_prep
126175 extends:
127127- - .monado.variables.arch:rolling
128128- - .fdo.container-build@arch # from ci-templates
176176+ - .monado.variables.debian:buster-ndk
177177+ - .monado.variables.container-prep-base
178178+ - .fdo.container-build@debian # from ci-templates
129179 variables:
130130- 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'
131131-132132-###
133133-# Container usage base jobs
180180+ # Repo suffix is set in .monado.variables.debian:buster-ndk
181181+ # a list of packages to install
182182+ FDO_DISTRIBUTION_PACKAGES: "${NDK_PACKAGES}"
134183135135-# Base for using Debian bullseye image
136136-.monado.image.debian:bullseye:
184184+# Style check job
185185+format-and-spellcheck:
137186 extends:
138187 - .monado.variables.debian:bullseye
139188 - .fdo.distribution-image@debian # from ci-templates
140140-141141-142142-# Base for using Debian bullseye-ndk image
143143-.monado.image.debian:bullseye-ndk:
144144- extends:
145145- - .monado.variables.debian:bullseye-ndk
146146- - .fdo.suffixed-image@debian # from ci-templates
147147-148148-149149-# Base for using Ubuntu focal image
150150-.monado.image.ubuntu:focal:
151151- extends:
152152- - .monado.variables.ubuntu:focal
153153- - .fdo.distribution-image@ubuntu # from ci-templates
154154-155155-156156-# Base for using Ubuntu hirsute image
157157-.monado.image.ubuntu:hirsute:
158158- extends:
159159- - .monado.variables.ubuntu:hirsute
160160- - .fdo.distribution-image@ubuntu # from ci-templates
161161-162162-163163-# Base for using Ubuntu impish image
164164-.monado.image.ubuntu:impish:
165165- extends:
166166- - .monado.variables.ubuntu:impish
167167- - .fdo.distribution-image@ubuntu # from ci-templates
168168-169169-170170-# Base for using Arch rolling image
171171-.monado.image.arch:rolling:
172172- extends:
173173- - .monado.variables.arch:rolling
174174- - .fdo.distribution-image@arch # from ci-templates
175175-176176-177177-# Style check job
178178-format-and-spellcheck:
179179- extends:
180180- - .monado.image.debian:bullseye
181181-182189 stage: build
183190 script:
184191 - scripts/format-and-spellcheck.sh
···197204 script:
198205 - reuse lint
199206207207+# "Base" job for a CMake build
208208+.monado.base-job.build-cmake:
209209+ stage: build
210210+ script:
211211+ - rm -rf build
212212+ - mkdir build
213213+ - pushd build
214214+ - cmake -GNinja .. $CMAKE_ARGS
215215+ # List build options
216216+ - grep "^XRT_" CMakeCache.txt
217217+ - ninja
218218+ - ctest --output-on-failure
200219201201-debian:cmake:
220220+# "Base" job for a Meson build
221221+.monado.base-job.build-meson:
202222 stage: build
223223+ script:
224224+ - rm -rf build
225225+ - mkdir build
226226+ - pushd build
227227+ - meson .. $MESON_ARGS
228228+ - ninja
229229+230230+debian:bullseye:cmake:
203231 extends:
204204- - .monado.image.debian:bullseye
205205-232232+ - .monado.variables.debian:bullseye
233233+ - .fdo.distribution-image@debian # from ci-templates
234234+ - .monado.base-job.build-cmake
206235 before_script:
236236+ # Generate "changes since last release" and add to changelog,
237237+ # since this is the build that makes our docs.
207238 - pushd doc/changes
208239 - proclamation build --overwrite vNEXT
209240 - popd
210210- script:
211211- - rm -rf build
212212- - cmake -GNinja -B build -S .
213213- - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
214214- - ninja -C build
215215- - cd build && ctest --output-on-failure
216241 artifacts:
217242 paths:
218243 - build/doc/html/
219244220245debian:cmake-no-opencv:
221221- stage: build
222246 extends:
223223- - .monado.image.debian:bullseye
247247+ - .monado.variables.debian:buster
248248+ - .fdo.distribution-image@debian # from ci-templates
249249+ - .monado.base-job.build-cmake
250250+ variables:
251251+ CMAKE_ARGS: -DXRT_HAVE_OPENCV=OFF
224252225225- script:
226226- - rm -rf build
227227- - cmake -GNinja -B build -S . -DBUILD_DOC=OFF -DXRT_HAVE_OPENCV=OFF
228228- - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
229229- - ninja -C build
230230- - cd build && ctest --output-on-failure
253253+debian:cmake-no-opengl:
254254+ extends:
255255+ - .monado.variables.debian:buster
256256+ - .fdo.distribution-image@debian # from ci-templates
257257+ - .monado.base-job.build-cmake
258258+ variables:
259259+ CMAKE_ARGS: -DXRT_HAVE_OPENGL=OFF
231260232261debian:cmake-no-sdl2:
233233- stage: build
234262 extends:
235235- - .monado.image.debian:bullseye
236236-237237- script:
238238- - rm -rf build
239239- - cmake -GNinja -B build -S . -DBUILD_DOC=OFF -DXRT_HAVE_SDL2=OFF
240240- - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
241241- - ninja -C build
242242- - cd build && ctest --output-on-failure
263263+ - .monado.variables.debian:buster
264264+ - .fdo.distribution-image@debian # from ci-templates
265265+ - .monado.base-job.build-cmake
266266+ variables:
267267+ CMAKE_ARGS: -DXRT_HAVE_SDL2=OFF
243268244269debian:cmake-no-service:
245245- stage: build
246246- extends:
247247- - .monado.image.debian:bullseye
248248-249249- script:
250250- - rm -rf build
251251- - cmake -GNinja -B build -S . -DBUILD_DOC=OFF -DXRT_FEATURE_SERVICE=OFF
252252- - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
253253- - ninja -C build
254254- - cd build && ctest --output-on-failure
255255-256256-debian:cmake:32bit:
257257- stage: build
258258- extends:
259259- - .monado.image.debian:bullseye
260260-261261- script:
262262- - rm -rf build
263263- - cmake -GNinja -B build -S . -DCMAKE_TOOLCHAIN_FILE=.gitlab-ci/i386.cmake -DXRT_HAVE_OPENCV=OFF
264264- - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
265265- - ninja -C build
266266- - cd build && ctest --output-on-failure
267267-268268-debian:meson:
269269- stage: build
270270- extends:
271271- - .monado.image.debian:bullseye
272272-273273- script:
274274- - rm -rf build
275275- - meson setup build .
276276- - ninja -C build
277277-278278-debian:meson:32bit:
279279- stage: build
280270 extends:
281281- - .monado.image.debian:bullseye
282282-283283- script:
284284- - rm -rf build
285285- - meson setup build . --prefix=/usr --libdir=/usr/lib/i386-linux-gnu --cross-file=.gitlab-ci/i386-cross.txt
286286- - ninja -C build
271271+ - .monado.variables.debian:buster
272272+ - .fdo.distribution-image@debian # from ci-templates
273273+ - .monado.base-job.build-cmake
274274+ variables:
275275+ CMAKE_ARGS: -DXRT_FEATURE_SERVICE=OFF
287276288288-ndk:armeabi-v7a:
289289- stage: build
277277+arch:cmake:
290278 extends:
291291- - .monado.image.debian:bullseye-ndk
292292-293293- script:
294294- - rm -rf build
295295- - 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
296296- - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
297297- - ninja -C build
279279+ - .monado.variables.arch:rolling
280280+ - .fdo.distribution-image@arch # from ci-templates
281281+ - .monado.base-job.build-cmake
298282299299-ndk:arm64-v8a:
300300- stage: build
283283+arch:cmake:clang:
301284 extends:
302302- - .monado.image.debian:bullseye-ndk
303303-304304- script:
305305- - rm -rf build
306306- - 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
307307- - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
308308- - ninja -C build
285285+ - .monado.variables.arch:rolling
286286+ - .fdo.distribution-image@arch # from ci-templates
287287+ - .monado.base-job.build-cmake
288288+ variables:
289289+ CMAKE_ARGS: -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++
309290310291ubuntu:cmake:
311311- stage: build
312292 extends:
313313- - .monado.image.ubuntu:focal
293293+ - .monado.variables.ubuntu:focal
294294+ - .fdo.distribution-image@ubuntu # from ci-templates
295295+ - .monado.base-job.build-cmake
314296315315- script:
316316- - rm -rf build
317317- - cmake -GNinja -B build -S . -DBUILD_DOC=OFF
318318- - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
319319- - ninja -C build
320320- - cd build && ctest --output-on-failure
297297+debian:meson:
298298+ extends:
299299+ - .monado.variables.debian:buster
300300+ - .fdo.distribution-image@debian # from ci-templates
301301+ - .monado.base-job.build-meson
321302322303ubuntu:meson:
323323- stage: build
324304 extends:
325325- - .monado.image.ubuntu:focal
305305+ - .monado.variables.ubuntu:focal
306306+ - .fdo.distribution-image@ubuntu # from ci-templates
307307+ - .monado.base-job.build-meson
326308327327- script:
328328- - rm -rf build
329329- - meson setup build .
330330- - ninja -C build
309309+arch:meson:
310310+ extends:
311311+ - .monado.variables.arch:rolling
312312+ - .fdo.distribution-image@arch # from ci-templates
313313+ - .monado.base-job.build-meson
314314+ variables:
315315+ MESON_ARGS: -Ddocs=disabled
331316332332-ubuntu:latest:cmake:
333333- stage: build
317317+# Cross-compiling
318318+debian:meson:32bit:
334319 extends:
335335- - .monado.image.ubuntu:impish
336336-337337- script:
338338- - rm -rf build
339339- - cmake -GNinja -B build -S . -DBUILD_DOC=OFF
340340- - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
341341- - ninja -C build
342342- - cd build && ctest --output-on-failure
320320+ - .monado.variables.debian:buster
321321+ - .fdo.distribution-image@debian # from ci-templates
322322+ - .monado.base-job.build-meson
323323+ variables:
324324+ MESON_ARGS: --prefix /usr --libdir /usr/lib/i386-linux-gnu --cross-file ../.gitlab-ci/i386-cross.txt
343325344344-arch:cmake:
345345- stage: build
326326+debian:cmake:32bit:
346327 extends:
347347- - .monado.image.arch:rolling
328328+ - .monado.variables.debian:buster
329329+ - .fdo.distribution-image@debian # from ci-templates
330330+ - .monado.base-job.build-cmake
331331+ variables:
332332+ # OpenCV and local OpenHMD doesn't play nicely with us in multi-arch.
333333+ CMAKE_ARGS: -DCMAKE_TOOLCHAIN_FILE=../.gitlab-ci/i386.cmake -DXRT_HAVE_OPENCV=off -DXRT_BUILD_DRIVER_OHMD=off
348334349349- script:
350350- - rm -rf build
351351- - cmake -GNinja -B build -S .
352352- - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
353353- - ninja -C build
354354- - cd build && ctest --output-on-failure
355355-356356-arch:cmake:clang:
335335+# Base of Android NDK builds.
336336+# Takes the last :-delimited part of the name as the ABI to build for,
337337+# so you don't need to do anything other than "extends" in the job
338338+.monado.ndk:build-base:
357339 stage: build
358340 extends:
359359- - .monado.image.arch:rolling
360360-341341+ - .monado.variables.debian:buster-ndk
342342+ - .fdo.suffixed-image@debian # from ci-templates
343343+ variables:
344344+ ANDROID_PLATFORM: 26
361345 script:
362362- - rm -rf build
363363- - cmake -GNinja -B build -S . -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++
364364- - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
365365- - ninja -C build
366366- - cd build && ctest --output-on-failure
346346+ - mkdir build
347347+ - pushd build
348348+ # This extracts the ABI from the job name
349349+ - export ABI=$(echo $CI_JOB_NAME | cut --delimiter=":" -f 2)
350350+ # Note we are pointing CMake to the host install of Eigen3 because it's header-only
351351+ # and thus this is safe to do.
352352+ - 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/
353353+ - grep "^XRT_" CMakeCache.txt
354354+ - ninja
367355368368-arch:meson:
369369- stage: build
370370- extends:
371371- - .monado.image.arch:rolling
356356+ndk:armeabi-v7a:
357357+ extends: .monado.ndk:build-base
372358373373- script:
374374- - rm -rf build
375375- - meson setup build .
376376- - ninja -C build
359359+ndk:arm64-v8a:
360360+ extends: .monado.ndk:build-base
377361378362# Packaging
379363.monado.packaging.conditions:
···384368 # Otherwise, don't build packages.
385369 - when: never
386370387387-388388-389389-debian:bullseye:package:
371371+.monado.base-job.debuild:
390372 extends:
391391- - .monado.image.debian:bullseye
392373 - .monado.packaging.conditions
393393- variables:
394394- DEBFULLNAME: "Monado CI"
395395- DEBEMAIL: "ryan.pavlik@collabora.com"
396396- DISTRO: debian
397397- CODENAME: bullseye
398398- DEB_VERSION_SUFFIX: bpo11
399374 stage: package
400375 before_script:
401401- - git config --global user.name Monado CI
402402- - git config --global user.email ryan.pavlik@collabora.com
376376+ # Configure git - needed despite not actually committing here.
377377+ - git config --global user.email "ryan.pavlik@collabora.com"
378378+ - git config --global user.name "Monado CI"
403379 script:
404380 # Prep the source tree
405381 - git clean -dfx
406406- # Call this script to build binary and source packages.
407407- # Can try locally by exporting the right variables and passing -B to get only a binary package to avoid complaints.
408408- - .gitlab-ci/build-and-submit-package.sh
382382+ - git merge origin/${PACKAGE_BRANCH} --no-commit
383383+ - 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")
384384+ # Build the package
385385+ - debuild -uc -us
386386+ # Use dput-ng to move the package-related files into some artifacts.
387387+ - export INCOMING=$(pwd)/incoming
388388+ - mkdir -p $INCOMING
389389+ - mkdir -p ~/.dput.d/profiles
390390+ - cat .gitlab-ci/localhost.json | envsubst > ~/.dput.d/profiles/localhost.json
391391+ - dpkg-parsechangelog --show-field version > incoming/${DISTRO}.distro
392392+ - dput --debug localhost ../monado_$(dpkg-parsechangelog --show-field version)_amd64.changes
409393 artifacts:
410394 paths:
411395 - "incoming/"
412396 expire_in: 2 days
413397398398+debian:buster:package:
399399+ extends:
400400+ - .monado.variables.debian:buster
401401+ - .fdo.distribution-image@debian # from ci-templates
402402+ - .monado.base-job.debuild
403403+ variables:
404404+ BACKPORT_SUFFIX: bpo10
405405+ PACKAGE_BRANCH: debian/buster-backports
406406+ DISTRO: buster
407407+408408+debian:bullseye:package:
409409+ extends:
410410+ - .monado.variables.debian:bullseye
411411+ - .fdo.distribution-image@debian # from ci-templates
412412+ - .monado.base-job.debuild
413413+ variables:
414414+ BACKPORT_SUFFIX: bpo11
415415+ PACKAGE_BRANCH: debian/bullseye
416416+ DISTRO: bullseye
417417+414418ubuntu:focal:package:
415419 extends:
416416- - .monado.image.ubuntu:focal
417417- - .monado.packaging.conditions
420420+ - .monado.variables.ubuntu:focal
421421+ - .fdo.distribution-image@ubuntu # from ci-templates
422422+ - .monado.base-job.debuild
418423 variables:
419419- DEBFULLNAME: "Monado CI"
420420- DEBEMAIL: "ryan.pavlik@collabora.com"
421421- DISTRO: ubuntu
422422- CODENAME: focal
423423- DEB_VERSION_SUFFIX: ubuntu2004
424424- stage: package
425425- before_script:
426426- - git config --global user.name Monado CI
427427- - git config --global user.email ryan.pavlik@collabora.com
428428- script:
429429- # Prep the source tree
430430- - git clean -dfx
431431- # Call this script to build binary and source packages.
432432- # Can try locally by exporting the right variables and passing -B to get only a binary package to avoid complaints.
433433- - .gitlab-ci/build-and-submit-package.sh
434434- artifacts:
435435- paths:
436436- - "incoming/"
437437- expire_in: 2 days
424424+ BACKPORT_SUFFIX: ubuntu2004
425425+ PACKAGE_BRANCH: ubuntu/focal
426426+ DISTRO: focal
438427439428ubuntu:hirsute:package:
440429 extends:
441441- - .monado.image.ubuntu:hirsute
442442- - .monado.packaging.conditions
430430+ - .monado.variables.ubuntu:hirsute
431431+ - .fdo.distribution-image@ubuntu # from ci-templates
432432+ - .monado.base-job.debuild
433433+443434 variables:
444444- DEBFULLNAME: "Monado CI"
445445- DEBEMAIL: "ryan.pavlik@collabora.com"
446446- DISTRO: ubuntu
447447- CODENAME: hirsute
448448- DEB_VERSION_SUFFIX: ubuntu2104
449449- stage: package
450450- before_script:
451451- - git config --global user.name Monado CI
452452- - git config --global user.email ryan.pavlik@collabora.com
453453- script:
454454- # Prep the source tree
455455- - git clean -dfx
456456- # Call this script to build binary and source packages.
457457- # Can try locally by exporting the right variables and passing -B to get only a binary package to avoid complaints.
458458- - .gitlab-ci/build-and-submit-package.sh
459459- artifacts:
460460- paths:
461461- - "incoming/"
462462- expire_in: 2 days
435435+ BACKPORT_SUFFIX: ubuntu2104
436436+ PACKAGE_BRANCH: ubuntu/hirsute
437437+ DISTRO: hirsute
463438464439ubuntu:impish:package:
465440 extends:
466466- - .monado.image.ubuntu:impish
467467- - .monado.packaging.conditions
441441+ - .monado.variables.ubuntu:impish
442442+ - .fdo.distribution-image@ubuntu # from ci-templates
443443+ - .monado.base-job.debuild
444444+468445 variables:
469469- DEBFULLNAME: "Monado CI"
470470- DEBEMAIL: "ryan.pavlik@collabora.com"
471471- DISTRO: ubuntu
472472- CODENAME: impish
473473- DEB_VERSION_SUFFIX: ubuntu2110
474474- stage: package
475475- before_script:
476476- - git config --global user.name Monado CI
477477- - git config --global user.email ryan.pavlik@collabora.com
478478- script:
479479- # Prep the source tree
480480- - git clean -dfx
481481- # Call this script to build binary and source packages.
482482- # Can try locally by exporting the right variables and passing -B to get only a binary package to avoid complaints.
483483- - .gitlab-ci/build-and-submit-package.sh
484484- artifacts:
485485- paths:
486486- - "incoming/"
487487- expire_in: 2 days
446446+ BACKPORT_SUFFIX: ubuntu2110
447447+ PACKAGE_BRANCH: ubuntu/impish
448448+ DISTRO: impish
488449489450reprepro:package:
490451 stage: reprepro
491452 extends:
492492- - .monado.image.ubuntu:impish
493493-453453+ - .monado.variables.ubuntu:impish
494454 - .monado.packaging.conditions
455455+ - .fdo.distribution-image@ubuntu # from ci-templates
495456 dependencies:
457457+ - debian:buster:package
496458 - debian:bullseye:package
497459 - ubuntu:focal:package
498460 - ubuntu:hirsute:package
499461 - ubuntu:impish:package
462462+ before_script:
463463+ # Convince gnupg to work properly in CI
464464+ - mkdir -p ~/.gnupg && chmod 700 ~/.gnupg
465465+ - touch ~/.gnupg/gpg.conf
466466+ - echo 'use-agent' > ~/.gnupg/gpg.conf
467467+ - echo 'pinentry-mode loopback' >> ~/.gnupg/gpg.conf
468468+ - touch ~/.gnupg/gpg-agent.conf
469469+ - echo 'allow-loopback-pinentry' > ~/.gnupg/gpg-agent.conf
470470+ - echo RELOADAGENT | gpg-connect-agent
471471+ - gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE} --import ${MONADO_GPG_SECRET_KEY}
472472+500473 script:
501501- - bash .gitlab-ci/reprepro.sh
474474+ # Use reprepro to create an apt repository in our artifacts
475475+ - mkdir -p repo/conf
476476+ # For each distro, sign the changes file and add it to the repo.
477477+ - |
478478+ for fn in incoming/*.distro; do
479479+ # parse the distro name out
480480+ export DISTRO=$(echo $fn | sed -e 's:incoming/::' -e 's:[.]distro::')
481481+ echo "Processing $DISTRO"
482482+ # add distro to repository config - blank line is mandatory!
483483+ cat .gitlab-ci/distributions | envsubst >> repo/conf/distributions
484484+ echo >> repo/conf/distributions
485485+486486+ echo "Signing package for $DISTRO"
487487+ debsign -k ${MONADO_GPG_FINGERPRINT} -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE}" incoming/monado_$(cat $fn)_amd64.changes
488488+489489+ echo "Adding package for $DISTRO to the repository"
490490+ reprepro -V --ignore=wrongdistribution -b repo include ${DISTRO} incoming/monado_$(cat $fn)_amd64.changes
491491+ done
502492 artifacts:
503493 paths:
504494 - "repo/"
···512502 only:
513503 - main
514504 dependencies:
515515- - debian:cmake
505505+ - debian:bullseye:cmake
516506 - reprepro:package
517507 script:
518508 - mkdir -p public
···520510 - mv repo public/apt
521511 artifacts:
522512 paths:
523523- - public513513+ - public
+8
.gitlab-ci/arch_container_prep.sh
···11+#!/bin/sh
22+# Copyright 2018-2020, Collabora, Ltd. and the Monado contributors
33+# SPDX-License-Identifier: BSL-1.0
44+55+(
66+ cd $(dirname $0)
77+ bash ./build-openxr-openhmd.sh
88+)
-21
.gitlab-ci/build-and-submit-package.sh
···11-#!/usr/bin/env bash
22-# SPDX-License-Identifier: CC0-1.0
33-# SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors
44-55-set -euo pipefail
66-77-# Prep the source tree
88-git merge "origin/${DISTRO}/${CODENAME}" --no-commit
99-datestamp=$(date --utc "+%Y%m%d")
1010-debian/extra/prepare-commit-package.sh "${CI_COMMIT_SHA}" "1~${DEB_VERSION_SUFFIX}~ci${datestamp}"
1111-# Build the package
1212-debuild -uc -us "$@"
1313-# Stash the package version in a convenient file for a later job.
1414-INCOMING="$(pwd)/incoming"
1515-export INCOMING
1616-mkdir -p "$INCOMING"
1717-dpkg-parsechangelog --show-field version > "incoming/${CODENAME}.distro"
1818-# Use dput-ng to move the package-related files into some artifacts.
1919-mkdir -p ~/.dput.d/profiles
2020-envsubst < .gitlab-ci/localhost.json > ~/.dput.d/profiles/localhost.json
2121-dput --debug localhost "../monado_$(dpkg-parsechangelog --show-field version)_amd64.changes"
+22
.gitlab-ci/build-openxr-openhmd.sh
···11+#!/bin/sh
22+# Copyright 2018-2020, Collabora, Ltd. and the Monado contributors
33+# SPDX-License-Identifier: BSL-1.0
44+55+# Install the OpenXR SDK, whatever version, installed system-wide.
66+git clone https://github.com/KhronosGroup/OpenXR-SDK
77+pushd OpenXR-SDK
88+mkdir build
99+pushd build
1010+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 ..
1111+ninja install
1212+popd
1313+popd
1414+1515+# Install OpenHMD from git master, as released versions are not sufficient
1616+# for us to build.
1717+git clone https://github.com/OpenHMD/OpenHMD
1818+pushd OpenHMD
1919+mkdir build
2020+meson --prefix=/usr/local --libdir=lib build
2121+ninja -C build install
2222+popd
-26
.gitlab-ci/ci-scripts.mk
···11-# SPDX-License-Identifier: CC0-1.0
22-# SPDX-FileCopyrightText: 2022 Collabora, Ltd. and the Monado contributors
33-#
44-# To generate all the templated files, run this from the root of the repo:
55-# make -f .gitlab-ci/ci-scripts.mk
66-77-# These also all have their template named the same with a .template suffix.
88-FILES_IN_SUBDIR := \
99- .gitlab-ci/distributions \
1010- .gitlab-ci/reprepro.sh \
1111-1212-CONFIG_FILE := .gitlab-ci/config.yml
1313-all: .gitlab-ci.yml $(FILES_IN_SUBDIR)
1414-.PHONY: all
1515-1616-clean:
1717- rm -f .gitlab-ci.yml $(FILES_IN_SUBDIR)
1818-.PHONY: clean
1919-2020-# As the default thing for ci-fairy to template, this is special cased
2121-.gitlab-ci.yml: .gitlab-ci/ci.template $(CONFIG_FILE)
2222- ci-fairy generate-template
2323-2424-# Everything else is structured alike
2525-$(FILES_IN_SUBDIR): %: %.jinja $(CONFIG_FILE)
2626- ci-fairy generate-template --config=$(CONFIG_FILE) $< > $@
-254
.gitlab-ci/ci.template
···11-# SPDX-License-Identifier: CC0-1.0
22-# SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors
33-44-{# ignore the warning, this is actually the template to edit. #}
55-######################################
66-# GENERATED - DO NOT EDIT #
77-# see .gitlab-ci/ci.template instead #
88-######################################
99-{#
1010-useful links:
1111-https://freedesktop.pages.freedesktop.org/ci-templates/
1212-https://freedesktop.pages.freedesktop.org/ci-templates/ci-fairy.html#templating-gitlab-ci-yml
1313-https://gitlab.freedesktop.org/freedesktop/ci-templates
1414-1515-Config file used for all templates: .gitlab-ci/config.yml
1616-.gitlab-ci.yml template: .gitlab-ci/ci.template
1717-.gitlab-ci/distributions template (for reprepro): .gitlab-ci/distributions.jinja
1818-.gitlab-ci/reprepro.sh template: .gitlab-ci/reprepro.sh.jinja
1919-2020-The following will update all files from templates:
2121-make -f .gitlab-ci/ci-scripts.mk
2222-#}
2323-2424-variables:
2525- FDO_UPSTREAM_REPO: monado/monado
2626-2727-.templates_sha: &templates_sha {{fdo_ci_templates_sha}}
2828-2929-include:
3030-{% for distro in distributions %}
3131- # {{ distro.name | capitalize }}
3232- - project: "freedesktop/ci-templates"
3333- ref: *templates_sha
3434- file: "/templates/{{distro.name}}.yml"
3535-{% endfor %}
3636-3737-{% for distro in distributions -%} {%- for image in distro.images %}
3838-3939-# Variables for build and usage of {{ distro.name|capitalize }} {{image.codename}} image
4040-.monado.variables.{{distro.name}}:{{image.codename}}:
4141- variables:
4242- FDO_DISTRIBUTION_VERSION: "{{ image["distro_version"] | default(image.codename) }}"
4343- FDO_DISTRIBUTION_TAG: "{{image["tag"]}}"
4444-{% if "repo_suffix" in image %}
4545- FDO_REPO_SUFFIX: {{image["repo_suffix"]}}
4646-{% endif %}
4747-{% endfor -%} {%- endfor %}
4848-4949-stages:
5050- - container_prep
5151- - build
5252- - package
5353- - reprepro
5454- - pages
5555- - deploy
5656-5757-###
5858-# Container prep jobs
5959-6060-{%- for distro in distributions -%} {%- for image in distro.images %}
6161-6262-# Make {{ distro.name|capitalize }} {{image.codename}} image
6363-{{distro.name}}:{{image.codename}}:container_prep:
6464- stage: container_prep
6565- extends:
6666- - .monado.variables.{{distro.name}}:{{image.codename}}
6767- - .fdo.container-build@{{distro.name}} # from ci-templates
6868- variables:
6969- {# The packages list is actually a mapping, not an array, but the same syntax works. #}
7070- {# Needed to be a mapping so it could be "merged" #}
7171- FDO_DISTRIBUTION_PACKAGES: '{{image.packages | sort | join(" ")}}'
7272-{% if "script" in image %}
7373- FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/{{image["script"]}}'
7474-{% endif %}
7575-{% endfor -%} {%- endfor %}
7676-7777-{# Macro to compute job name to extend to use image given distro and image objects#}
7878-{% macro base_job_to_use_image(distro, image) %}.monado.image.{{distro.name}}:{{image.codename}}{% endmacro -%}
7979-8080-###
8181-# Container usage base jobs
8282-{% for distro in distributions -%} {%- for image in distro.images %}
8383-8484-# Base for using {{ distro.name|capitalize }} {{image.codename}} image
8585-{{base_job_to_use_image(distro, image)}}:
8686- extends:
8787- - .monado.variables.{{distro.name}}:{{image.codename}}
8888- - .fdo.{{ "suffixed" if "repo_suffix" in image else "distribution" }}-image@{{distro.name}} # from ci-templates
8989-9090-{% endfor -%} {%- endfor %}
9191-9292-{# Macro to compute job name to extend to use image given a package we want#}
9393-{% macro base_job_to_use_image_containing(package) %}
9494-{% for distro in distributions -%} {%- for image in distro.images if package in image.packages %}
9595-{{ base_job_to_use_image(distro, image) if loop.first }}
9696-{% endfor -%} {%- endfor %}
9797-{% endmacro -%}
9898-9999-# Style check job
100100-format-and-spellcheck:
101101- extends:
102102- - {{base_job_to_use_image_containing("codespell")}}
103103- stage: build
104104- script:
105105- - scripts/format-and-spellcheck.sh
106106- artifacts:
107107- paths:
108108- - patches/
109109- expire_in: 1 week
110110- when: on_failure
111111-112112-# Verify REUSE compliance
113113-reuse:
114114- stage: build
115115- image:
116116- name: fsfe/reuse:latest
117117- entrypoint: [""]
118118- script:
119119- - reuse lint
120120-121121-{% macro make_cmake_args(cmake_defines) %}
122122-{% if cmake_defines is defined %}
123123-{%- for k, v in cmake_defines |dictsort %} -D{{ k }}={{ v }}{% endfor %}
124124-{%- endif %}
125125-{%- endmacro -%}
126126-127127-{#### Main build jobs ####}
128128-{% for distro in distributions -%} {%- for image in distro.images -%} {%- for job in image.build_jobs %}
129129-130130-{{job.name}}:
131131- stage: build
132132- extends:
133133- - {{base_job_to_use_image(distro, image)}}
134134-135135-{% if job.before_script %}
136136- before_script:
137137- {% for line in job.before_script %}
138138- - {{line}}
139139- {% endfor %}
140140-{% endif %}
141141- script:
142142- - rm -rf build
143143-144144-{#- meson builds -#}
145145-{%- if "meson" in job.name %}
146146-147147- - meson setup build .
148148- {%- if job.args %} {{ job.args | join(' ') }}{% endif %}
149149-150150- - ninja -C build
151151-152152-{#- regular or NDK cmake builds -#}
153153-{%- elif "cmake" in job.name or "ndk" in job.name %}
154154-155155- - cmake -GNinja -B build -S . {{- make_cmake_args(job.cmake_defines) }}
156156- - echo "Build Options:"; grep "^XRT_" build/CMakeCache.txt
157157- - ninja -C build
158158-159159-{%- else %}
160160-161161-{# error message #}
162162- CANNOT GUESS JOB TYPE
163163-164164-{%- endif %}
165165-166166-{%- if "cmake" in job.name %}
167167-168168- - cd build && ctest --output-on-failure
169169-{%- endif %}
170170-171171-{%- if job.artifact_path %}
172172-173173- artifacts:
174174- paths:
175175- - {{ job.artifact_path }}
176176-{%- endif %}
177177-178178-{% endfor -%} {%- endfor -%} {%- endfor %}
179179-180180-# Packaging
181181-.monado.packaging.conditions:
182182- rules:
183183- # Only the default branch of the "upstream" repo.
184184- - if: "$CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH"
185185- when: on_success
186186- # Otherwise, don't build packages.
187187- - when: never
188188-189189-{% macro packaging_job_name(distro, image) -%}
190190-{{distro.name}}:{{image.codename}}:package
191191-{%- endmacro %}
192192-193193-{% for distro in distributions -%} {%- for image in distro.images if "deb_version_suffix" in image %}
194194-195195-{{packaging_job_name(distro, image)}}:
196196- extends:
197197- - {{base_job_to_use_image(distro, image)}}
198198- - .monado.packaging.conditions
199199- variables:
200200- DEBFULLNAME: "{{packaging.name}}"
201201- DEBEMAIL: "{{packaging.email}}"
202202- DISTRO: {{distro.name}}
203203- CODENAME: {{image.codename}}
204204- DEB_VERSION_SUFFIX: {{image.deb_version_suffix}}
205205- stage: package
206206- before_script:
207207- {# Configure git - needed despite not actually committing here. #}
208208- - git config --global user.name {{packaging.name}}
209209- - git config --global user.email {{packaging.email}}
210210- script:
211211- # Prep the source tree
212212- - git clean -dfx
213213- # Call this script to build binary and source packages.
214214- # Can try locally by exporting the right variables and passing -B to get only a binary package to avoid complaints.
215215- - .gitlab-ci/build-and-submit-package.sh
216216- artifacts:
217217- paths:
218218- - "incoming/"
219219- expire_in: 2 days
220220-{% endfor -%} {%- endfor %}
221221-222222-reprepro:package:
223223- stage: reprepro
224224- extends:
225225- - {{ base_job_to_use_image_containing("reprepro") }}
226226- - .monado.packaging.conditions
227227- dependencies:
228228-{% for distro in distributions -%} {%- for image in distro.images if "deb_version_suffix" in image %}
229229- - {{packaging_job_name(distro, image)}}
230230-{% endfor -%} {%- endfor %}
231231- script:
232232- - bash .gitlab-ci/reprepro.sh
233233- artifacts:
234234- paths:
235235- - "repo/"
236236- expire_in: 2 days
237237-238238-###
239239-# Pages
240240-###
241241-pages:
242242- stage: pages
243243- only:
244244- - main
245245- dependencies:
246246- - debian:cmake
247247- - reprepro:package
248248- script:
249249- - mkdir -p public
250250- - mv build/doc/html/* public/
251251- - mv repo public/apt
252252- artifacts:
253253- paths:
254254- - public
-235
.gitlab-ci/config.yml
···11-# SPDX-License-Identifier: CC0-1.0
22-# SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors
33-44-# Please run the following from the repo root after modifying this file:
55-# make -f .gitlab-ci/ci-scripts.mk
66-77-fdo_ci_templates_sha: 34039cd573a2df832d465bc9e4c5f543571f5241
88-99-# These are a mapping, instead of a list/array, so we can merge.
1010-.default_debian_packages:
1111- &default_debian_packages # Packages required for build and some other basic jobs
1212- build-essential:
1313- git:
1414- wget:
1515- unzip:
1616- cmake:
1717- meson:
1818- ninja-build:
1919- libeigen3-dev:
2020- curl:
2121- patch:
2222- python3:
2323- pkg-config:
2424- libx11-dev:
2525- libx11-xcb-dev:
2626- libxxf86vm-dev:
2727- libxrandr-dev:
2828- libxcb-randr0-dev:
2929- libvulkan-dev:
3030- glslang-tools:
3131- libglvnd-dev:
3232- libgl1-mesa-dev:
3333- ca-certificates:
3434- libusb-1.0-0-dev:
3535- libudev-dev:
3636- # These are optional packages, that we're building against to ensure we build as much code as possible
3737- libhidapi-dev:
3838- libwayland-dev:
3939- libuvc-dev:
4040- libavcodec-dev:
4141- libopencv-dev:
4242- libv4l-dev:
4343- libcjson-dev:
4444- libsdl2-dev:
4545- libegl1-mesa-dev:
4646- libdbus-1-dev:
4747- libgstreamer1.0-dev:
4848- libgstreamer-plugins-base1.0-dev:
4949- libsystemd-dev:
5050- libbsd-dev:
5151- # Only used for building packages
5252- devscripts:
5353- debhelper:
5454- dput-ng:
5555- gettext-base:
5656- pandoc:
5757-5858-# These config defines are used for all NDK builds
5959-.android_cmake_defines: &android_cmake_defines
6060- ANDROID_PLATFORM: 26
6161- CMAKE_TOOLCHAIN_FILE: /opt/android-ndk/build/cmake/android.toolchain.cmake
6262- Eigen3_DIR: /usr/lib/cmake/eigen3/
6363- EIGEN3_INCLUDE_DIR: /usr/include/eigen3
6464-6565-# The distributions we'll make an image for
6666-distributions:
6767- - name: debian
6868- images:
6969- # This image does some extra work.
7070- - codename: bullseye
7171- script: i386_and_proclamation_container_prep.sh
7272- tag: "2022-01-19.0"
7373- deb_version_suffix: bpo11
7474- packages:
7575- <<: *default_debian_packages
7676- codespell:
7777- doxygen:
7878- graphviz:
7979- python3-pip:
8080- python3-click:
8181- clang-format:
8282- build_jobs:
8383- - name: "debian:cmake"
8484- # Generate "changes since last release" and add to changelog,
8585- # since this is the build that makes our docs.
8686- before_script:
8787- - pushd doc/changes
8888- - proclamation build --overwrite vNEXT
8989- - popd
9090- artifact_path: build/doc/html/
9191-9292- - name: "debian:cmake-no-opencv"
9393- cmake_defines:
9494- BUILD_DOC: "OFF"
9595- XRT_HAVE_OPENCV: "OFF"
9696-9797- - name: "debian:cmake-no-sdl2"
9898- cmake_defines:
9999- BUILD_DOC: "OFF"
100100- XRT_HAVE_SDL2: "OFF"
101101-102102- - name: "debian:cmake-no-service"
103103- cmake_defines:
104104- BUILD_DOC: "OFF"
105105- XRT_FEATURE_SERVICE: "OFF"
106106-107107- - name: "debian:cmake:32bit"
108108- cmake_defines:
109109- CMAKE_TOOLCHAIN_FILE: .gitlab-ci/i386.cmake
110110- # OpenCV doesn't play nicely with us in multi-arch.
111111- XRT_HAVE_OPENCV: "OFF"
112112-113113- - name: "debian:meson"
114114-115115- - name: "debian:meson:32bit"
116116- args:
117117- - --prefix=/usr
118118- - --libdir=/usr/lib/i386-linux-gnu
119119- - --cross-file=.gitlab-ci/i386-cross.txt
120120-121121- # This one is pretty minimal, compared to the others.
122122- - codename: bullseye-ndk
123123- distro_version: bullseye
124124- repo_suffix: ndk
125125- script: ndk_container_prep.sh
126126- tag: "2022-01-19.0"
127127- packages:
128128- git:
129129- wget:
130130- unzip:
131131- cmake:
132132- meson:
133133- ninja-build:
134134- libeigen3-dev:
135135- python3:
136136- pkg-config:
137137- ca-certificates:
138138- glslang-tools:
139139- build_jobs:
140140- - name: "ndk:armeabi-v7a"
141141- cmake_defines:
142142- <<: *android_cmake_defines
143143- BUILD_DOC: "OFF"
144144- ANDROID_ABI: armeabi-v7a
145145-146146- - name: "ndk:arm64-v8a"
147147- cmake_defines:
148148- <<: *android_cmake_defines
149149- BUILD_DOC: "OFF"
150150- ANDROID_ABI: arm64-v8a
151151-152152- - name: ubuntu
153153- images:
154154- # LTS
155155- - codename: focal
156156- distro_version: "20.04"
157157- tag: "2021-10-27.1"
158158- deb_version_suffix: ubuntu2004
159159- packages:
160160- <<: *default_debian_packages
161161- build_jobs:
162162- - name: "ubuntu:cmake"
163163- cmake_defines:
164164- BUILD_DOC: "OFF"
165165-166166- - name: "ubuntu:meson"
167167-168168- - codename: hirsute
169169- distro_version: "21.04"
170170- tag: "2021-10-27.1"
171171- deb_version_suffix: ubuntu2104
172172- packages:
173173- <<: *default_debian_packages
174174-175175- - codename: impish
176176- distro_version: "21.10"
177177- tag: "2021-10-28.0"
178178- deb_version_suffix: ubuntu2110
179179- packages:
180180- <<: *default_debian_packages
181181- reprepro:
182182- build_jobs:
183183- - name: "ubuntu:latest:cmake"
184184- cmake_defines:
185185- BUILD_DOC: "OFF"
186186-187187- - name: arch
188188- images:
189189- - codename: rolling
190190- tag: "2021-09-14.0"
191191- packages:
192192- git:
193193- gcc:
194194- clang:
195195- cmake:
196196- meson:
197197- ninja:
198198- pkgconfig:
199199- python3:
200200- diffutils:
201201- patch:
202202- doxygen:
203203- graphviz:
204204- eigen:
205205- hidapi:
206206- libxrandr:
207207- mesa:
208208- glslang:
209209- vulkan-headers:
210210- vulkan-icd-loader:
211211- check:
212212- glfw-x11:
213213- libusb:
214214- opencv:
215215- gtk3:
216216- ffmpeg:
217217- v4l-utils:
218218- qt5-base:
219219- build_jobs:
220220- - name: "arch:cmake"
221221-222222- - name: "arch:cmake:clang"
223223- cmake_defines:
224224- CMAKE_C_COMPILER: /usr/bin/clang
225225- CMAKE_CXX_COMPILER: /usr/bin/clang++
226226-227227- - name: "arch:meson"
228228-229229-android:
230230- platform: 26
231231-232232-packaging:
233233- # Name and email associated with the package
234234- name: "Monado CI"
235235- email: "ryan.pavlik@collabora.com"
+12
.gitlab-ci/debian_buster_container_prep.sh
···11+#!/bin/bash
22+# Copyright 2018-2020, Collabora, Ltd. and the Monado contributors
33+# SPDX-License-Identifier: BSL-1.0
44+55+(
66+ cd $(dirname $0)
77+ bash ./install-cross.sh
88+)
99+(
1010+ cd $(dirname $0)
1111+ bash ./build-openxr-openhmd.sh
1212+)
+7
.gitlab-ci/distributions
···11+Origin: monado.freedesktop.org
22+Description: Monado CI apt repository
33+Codename: ${DISTRO}
44+Architectures: amd64 i386 source
55+Components: main
66+Tracking: minimal
77+SignWith: ${MONADO_GPG_FINGERPRINT}
-34
.gitlab-ci/distributions.jinja
···11-{#
22-Copyright 2020-2022, Collabora, Ltd.
33-44-SPDX-License-Identifier: BSL-1.0
55-#}
66-{#
77-Template for reprepro distributions config file.
88-99-After this template gets expanded, with a paragraph for each
1010-distribution codename supported,
1111-the GPG fingerprint gets substituted into that at CI time using envsubst,
1212-(not ahead of time using ci-fairy)
1313-because the fingerprint is included in the "secrets" in CI.
1414-1515-Note: There is no way to indicate comments in the reprepro distributions config
1616-file format, and whitespace is meaningful (need blank lines between paragraphs).
1717-1818-Please run the following after modifying this file:
1919-2020- ci-fairy generate-template --config .gitlab-ci/config.yml .gitlab-ci/distributions.template > .gitlab-ci/distributions
2121-2222-#}
2323-{% for distro in packaging.distribution_suffixes %}
2424-{% for codename in packaging.distribution_suffixes[distro] %}
2525-Origin: monado.freedesktop.org
2626-Description: Monado CI apt repository
2727-Codename: {{ codename }}
2828-Architectures: amd64 i386 source
2929-Components: main
3030-Tracking: minimal
3131-SignWith: ${MONADO_GPG_FINGERPRINT}
3232-3333-{% endfor %}
3434-{% endfor %}
+2-4
.gitlab-ci/distributions.license
···11-Copyright 2020-2022, Collabora, Ltd.
22-33-SPDX-License-Identifier: BSL-1.0
11+Copyright 2020, Collabora, Ltd.
4255-Generated from distributions.template with ci-fairy
33+SPDX-License-Identifier: BSL-1.0
-5
.gitlab-ci/gpg-agent.conf
···11-# SPDX-License-Identifier: CC0-1.0
22-# SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors
33-44-# Used for CI package building.
55-allow-loopback-pinentry
-6
.gitlab-ci/gpg.conf
···11-# SPDX-License-Identifier: CC0-1.0
22-# SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors
33-44-# Used for CI package building.
55-use-agent
66-pinentry-mode loopback
···11-#!/usr/bin/env bash
22-# SPDX-License-Identifier: CC0-1.0
33-# SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors
44-55-###############################################
66-# GENERATED - DO NOT EDIT #
77-# see .gitlab-ci/reprepro.sh.template instead #
88-###############################################
99-1010-1111-set -euo pipefail
1212-1313-# Convince gnupg to work properly in CI
1414-mkdir -p ~/.gnupg && chmod 700 ~/.gnupg
1515-cp .gitlab-ci/gpg.conf .gitlab-ci/gpg-agent.conf ~/.gnupg
1616-echo RELOADAGENT | gpg-connect-agent
1717-gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase "${MONADO_GPG_PASSPHRASE}" --import "${MONADO_GPG_SECRET_KEY}"
1818-mkdir -p repo/conf
1919-# Substitute in the GPG fingerprint into the repository config.
2020-# This file is itself generated with ci-fairy.
2121-envsubst < .gitlab-ci/distributions >> repo/conf/distributions
2222-2323-# For each distro, sign the changes file and add it to the repo.
2424-2525-# bullseye
2626-if [ -f "incoming/bullseye.distro" ]; then
2727- VERSION=$(cat incoming/bullseye.distro)
2828- echo "Signing and processing bullseye: ${VERSION}"
2929- debsign -k "${MONADO_GPG_FINGERPRINT}" -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE}" "incoming/monado_${VERSION}_amd64.changes"
3030- reprepro -V --ignore=wrongdistribution -b repo include bullseye "incoming/monado_${VERSION}_amd64.changes"
3131-else
3232- echo "Skipping bullseye - no artifact found"
3333-fi
3434-3535-# focal
3636-if [ -f "incoming/focal.distro" ]; then
3737- VERSION=$(cat incoming/focal.distro)
3838- echo "Signing and processing focal: ${VERSION}"
3939- debsign -k "${MONADO_GPG_FINGERPRINT}" -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE}" "incoming/monado_${VERSION}_amd64.changes"
4040- reprepro -V --ignore=wrongdistribution -b repo include focal "incoming/monado_${VERSION}_amd64.changes"
4141-else
4242- echo "Skipping focal - no artifact found"
4343-fi
4444-4545-# hirsute
4646-if [ -f "incoming/hirsute.distro" ]; then
4747- VERSION=$(cat incoming/hirsute.distro)
4848- echo "Signing and processing hirsute: ${VERSION}"
4949- debsign -k "${MONADO_GPG_FINGERPRINT}" -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE}" "incoming/monado_${VERSION}_amd64.changes"
5050- reprepro -V --ignore=wrongdistribution -b repo include hirsute "incoming/monado_${VERSION}_amd64.changes"
5151-else
5252- echo "Skipping hirsute - no artifact found"
5353-fi
5454-5555-# impish
5656-if [ -f "incoming/impish.distro" ]; then
5757- VERSION=$(cat incoming/impish.distro)
5858- echo "Signing and processing impish: ${VERSION}"
5959- debsign -k "${MONADO_GPG_FINGERPRINT}" -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE}" "incoming/monado_${VERSION}_amd64.changes"
6060- reprepro -V --ignore=wrongdistribution -b repo include impish "incoming/monado_${VERSION}_amd64.changes"
6161-else
6262- echo "Skipping impish - no artifact found"
6363-fi
-42
.gitlab-ci/reprepro.sh.jinja
···11-#!/usr/bin/env bash
22-# SPDX-License-Identifier: CC0-1.0
33-# SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors
44-55-{# ignore the warning, this is actually the template to edit. #}
66-###############################################
77-# GENERATED - DO NOT EDIT #
88-# see .gitlab-ci/reprepro.sh.template instead #
99-###############################################
1010-{#
1111-Please run the following after editing:
1212- ci-fairy generate-template --config .gitlab-ci/config.yml .gitlab-ci/reprepro.sh.template > .gitlab-ci/reprepro.sh
1313-#}
1414-1515-1616-set -euo pipefail
1717-1818-# Convince gnupg to work properly in CI
1919-mkdir -p ~/.gnupg && chmod 700 ~/.gnupg
2020-cp .gitlab-ci/gpg.conf .gitlab-ci/gpg-agent.conf ~/.gnupg
2121-echo RELOADAGENT | gpg-connect-agent
2222-gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase "${MONADO_GPG_PASSPHRASE}" --import "${MONADO_GPG_SECRET_KEY}"
2323-mkdir -p repo/conf
2424-# Substitute in the GPG fingerprint into the repository config.
2525-# This file is itself generated with ci-fairy.
2626-envsubst < .gitlab-ci/distributions >> repo/conf/distributions
2727-2828-# For each distro, sign the changes file and add it to the repo.
2929-{% for distro in distributions | sort(attribute="name") %}
3030-{% for image in distro.images if "deb_version_suffix" in image %}
3131-3232-# {{ image.codename }}
3333-if [ -f "incoming/{{image.codename}}.distro" ]; then
3434- VERSION=$(cat incoming/{{image.codename}}.distro)
3535- echo "Signing and processing {{image.codename}}: ${VERSION}"
3636- debsign -k "${MONADO_GPG_FINGERPRINT}" -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase ${MONADO_GPG_PASSPHRASE}" "incoming/monado_${VERSION}_amd64.changes"
3737- reprepro -V --ignore=wrongdistribution -b repo include {{image.codename}} "incoming/monado_${VERSION}_amd64.changes"
3838-else
3939- echo "Skipping {{image.codename}} - no artifact found"
4040-fi
4141-{% endfor %}
4242-{% endfor %}
+7
.gitlab-ci/ubuntu_focal_container_prep.sh
···11+#!/bin/bash
22+# Copyright 2018-2020, Collabora, Ltd. and the Monado contributors
33+# SPDX-License-Identifier: BSL-1.0
44+(
55+ cd $(dirname $0)
66+ bash ./build-openxr-openhmd.sh
77+)
+5
.gitlab-ci/ubuntu_hirsute_container_prep.sh
···11+#!/bin/bash
22+# Copyright 2021, Collabora, Ltd. and the Monado contributors
33+# SPDX-License-Identifier: BSL-1.0
44+55+# Nothing really needed.
+5
.gitlab-ci/ubuntu_impish_container_prep.sh
···11+#!/bin/bash
22+# Copyright 2021, Collabora, Ltd. and the Monado contributors
33+# SPDX-License-Identifier: BSL-1.0
44+55+# Nothing really needed.