···66# see .gitlab-ci/ci.template, etc instead
77###############################################
8899-# Detached MR pipelines, needed due to https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/438
1010-119# workflow:
1210# rules:
1311# - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
···2422 - "/templates/ubuntu.yml"
2523 - "/templates/arch.yml"
2624 # - local: .gitlab-ci/containers/ci-container-prep.yml
2525+2626+ # This include is for compatibility with the fdo CI restrictions/checks
2727+ # needed due to https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/438
2728 - local: .gitlab-ci/ci-rules.yml
28292930stages:
···149150 FDO_DISTRIBUTION_VERSION: "22.04"
150151 FDO_DISTRIBUTION_TAG: "2022-09-20.0"
151152152152-# Variables for build and usage of Arch rolling image
153153-.monado.variables.arch:rolling:
153153+# Variables for build and usage of Arch image
154154+.monado.variables.arch:
154155 variables:
155155- FDO_DISTRIBUTION_VERSION: "rolling"
156156- FDO_DISTRIBUTION_TAG: "2023-05-22.0"
156156+ FDO_DISTRIBUTION_TAG: "2023-11-14.0"
157157158158159159###
···204204 variables:
205205 FDO_DISTRIBUTION_PACKAGES: 'build-essential ca-certificates cmake curl debhelper devscripts dput-ng gettext-base git glslang-tools libavcodec-dev libbluetooth-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 ninja-build pandoc patch pkg-config python3 reprepro unzip wget'
206206207207-# Make Arch rolling image
208208-arch:rolling:container_prep:
207207+# Make Arch image
208208+arch:container_prep:
209209 stage: container_prep
210210 extends:
211211 - .container-rules
212212- - .monado.variables.arch:rolling
212212+ - .monado.variables.arch
213213 - .fdo.container-build@arch # from ci-templates
214214215215 variables:
···252252 - .build-rules
253253254254255255-# Base for using Arch rolling image
256256-.monado.image.arch:rolling:
255255+# Base for using Arch image
256256+.monado.image.arch:
257257 extends:
258258- - .monado.variables.arch:rolling
258258+ - .monado.variables.arch
259259 - .fdo.distribution-image@arch # from ci-templates
260260 - .build-rules
261261···499499arch:cmake:
500500 stage: build
501501 extends:
502502- - .monado.image.arch:rolling
502502+ - .monado.image.arch
503503 script:
504504505505 - .gitlab-ci/prebuild.sh
···509509arch:cmake:clang:
510510 stage: build
511511 extends:
512512- - .monado.image.arch:rolling
512512+ - .monado.image.arch
513513 script:
514514515515 - .gitlab-ci/prebuild.sh
+6-2
.gitlab-ci/ci-containers-variables.yml.jinja
···33# SPDX-FileCopyrightText: 2018-2023 Collabora, Ltd. and the Monado contributors
44#}
5566+{% from 'functions.jinja' import image_name, image_name_for_comment with context %}
77+68{% for distro in distributions -%} {%- for image in distro.images %}
7988-# Variables for build and usage of {{ distro.name|capitalize }} {{image.codename}} image
99-.monado.variables.{{distro.name}}:{{image.codename}}:
1010+# Variables for build and usage of {{ image_name_for_comment(distro, image) }} image
1111+.monado.variables.{{ image_name(distro, image) }}:
1012 variables:
1313+{% if "codename" in image or "distro_version" in image %}
1114 FDO_DISTRIBUTION_VERSION: "{{ image["distro_version"] | default(image.codename) }}"
1515+{% endif %}
1216 FDO_DISTRIBUTION_TAG: "{{image["tag"]}}"
1317{% if "repo_suffix" in image %}
1418 FDO_REPO_SUFFIX: {{image["repo_suffix"]}}
+8-6
.gitlab-ci/ci-containers.yml.jinja
···33# SPDX-FileCopyrightText: 2018-2023 Collabora, Ltd. and the Monado contributors
44#}
5566+{% from 'functions.jinja' import image_name, image_name_for_comment with context %}
77+68###
79# Container prep jobs
810911{%- for distro in distributions -%} {%- for image in distro.images %}
10121111-# Make {{ distro.name|capitalize }} {{image.codename}} image
1212-{{distro.name}}:{{image.codename}}:container_prep:
1313+# Make {{ image_name_for_comment(distro, image) }} image
1414+{{ image_name(distro, image) }}:container_prep:
1315 stage: container_prep
1416 extends:
1517 - .container-rules
1616- - .monado.variables.{{distro.name}}:{{image.codename}}
1818+ - .monado.variables.{{ image_name(distro, image) }}
1719 - .fdo.container-build@{{distro.name}} # from ci-templates
18201921 variables:
···3133# Container usage base jobs
3234{% for distro in distributions -%} {%- for image in distro.images %}
33353434-# Base for using {{ distro.name|capitalize }} {{image.codename}} image
3535-{{base_job_to_use_image(distro, image)}}:
3636+# Base for using {{ image_name_for_comment(distro, image) }} image
3737+{{ base_job_to_use_image(distro, image) }}:
3638 extends:
3737- - .monado.variables.{{distro.name}}:{{image.codename}}
3939+ - .monado.variables.{{ image_name(distro, image) }}
3840 - .fdo.{{ "suffixed" if "repo_suffix" in image else "distribution" }}-image@{{distro.name}} # from ci-templates
3941 - .build-rules
4042
+5-4
.gitlab-ci/ci.template
···2222make -f .gitlab-ci/ci-scripts.mk
2323#}
24242525-# Detached MR pipelines, needed due to https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/438
2626-2725# workflow:
2826# rules:
2927# - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
···4038 - "/templates/{{distro.name}}.yml"
4139{% endfor %}
4240 # - local: .gitlab-ci/containers/ci-container-prep.yml
4141+4242+ # This include is for compatibility with the fdo CI restrictions/checks
4343+ # needed due to https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/438
4344 - local: .gitlab-ci/ci-rules.yml
44454546stages:
···6566{% include 'ci-containers-variables.yml.jinja' %}
6667{% include 'ci-containers.yml.jinja' %}
67686868-{% from 'functions.jinja' import base_job_to_use_image_containing, base_job_to_use_image with context %}
6969+{% from 'functions.jinja' import image_name, base_job_to_use_image_containing, base_job_to_use_image with context %}
69707071# Style check job
7172format-and-spellcheck:
···176177 - build/Testing/Temporary
177178178179{% macro packaging_job_name(distro, image) -%}
179179-{{distro.name}}:{{image.codename}}:package
180180+{{ image_name(distro, image) }}:package
180181{%- endmacro %}
181182182183{% for distro in distributions -%} {%- for image in distro.images if "deb_version_suffix" in image %}
···1010{% endfor -%} {%- endfor %}
1111{% endmacro -%}
12121313+{# Macro to compute a part of a job name, etc. for a distro and image #}
1414+{% macro image_name(distro, image) -%}
1515+{{ distro.name }}
1616+{%- if "codename" in image %}:{{ image.codename }}{%- endif -%}
1717+{%- endmacro -%}
1818+1319{# Macro to compute job name to extend to use image given distro and image objects#}
1414-{% macro base_job_to_use_image(distro, image) %}.monado.image.{{distro.name}}:{{image.codename}}{% endmacro -%}
2020+{% macro base_job_to_use_image(distro, image) %}.monado.image.{{ image_name(distro, image) }}{% endmacro -%}
2121+2222+2323+{# Macro to compute a part of a comment describing a distro and image #}
2424+{% macro image_name_for_comment(distro, image) %}
2525+{{ distro.name | capitalize }}
2626+{%- if "codename" in image %} {{ image.codename }}{%- endif -%}
2727+{%- endmacro -%}