ci: Be able to drop distro versions for Arch and Alpine, rebuild arch

This commit is contained in:
Ryan Pavlik authored and Simon Zeni committed 2023-11-14 20:27:59 +00:00
1 parent 2b418abf3f
commit b0efc5e8d4
6 files changed
+48 -29

No files matched your search

+14 -14
View File
@@ -6,8 +6,6 @@
# see .gitlab-ci/ci.template, etc instead
###############################################
# Detached MR pipelines, needed due to https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/438
# workflow:
# rules:
# - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
@@ -24,6 +22,9 @@ include:
- "/templates/ubuntu.yml"
- "/templates/arch.yml"
# - local: .gitlab-ci/containers/ci-container-prep.yml
# This include is for compatibility with the fdo CI restrictions/checks
# needed due to https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/438
- local: .gitlab-ci/ci-rules.yml
stages:
@@ -149,11 +150,10 @@ win:container_prep:
FDO_DISTRIBUTION_VERSION: "22.04"
FDO_DISTRIBUTION_TAG: "2022-09-20.0"
# Variables for build and usage of Arch rolling image
.monado.variables.arch:rolling:
# Variables for build and usage of Arch image
.monado.variables.arch:
variables:
FDO_DISTRIBUTION_VERSION: "rolling"
FDO_DISTRIBUTION_TAG: "2023-05-22.0"
FDO_DISTRIBUTION_TAG: "2023-11-14.0"
###
@@ -204,12 +204,12 @@ ubuntu:jammy:container_prep:
variables:
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'
# Make Arch rolling image
arch:rolling:container_prep:
# Make Arch image
arch:container_prep:
stage: container_prep
extends:
- .container-rules
- .monado.variables.arch:rolling
- .monado.variables.arch
- .fdo.container-build@arch # from ci-templates
variables:
@@ -252,10 +252,10 @@ arch:rolling:container_prep:
- .build-rules
# Base for using Arch rolling image
.monado.image.arch:rolling:
# Base for using Arch image
.monado.image.arch:
extends:
- .monado.variables.arch:rolling
- .monado.variables.arch
- .fdo.distribution-image@arch # from ci-templates
- .build-rules
@@ -499,7 +499,7 @@ ubuntu:jammy:cmake:
arch:cmake:
stage: build
extends:
- .monado.image.arch:rolling
- .monado.image.arch
script:
- .gitlab-ci/prebuild.sh
@@ -509,7 +509,7 @@ arch:cmake:
arch:cmake:clang:
stage: build
extends:
- .monado.image.arch:rolling
- .monado.image.arch
script:
- .gitlab-ci/prebuild.sh
+6 -2
View File
@@ -3,12 +3,16 @@
# SPDX-FileCopyrightText: 2018-2023 Collabora, Ltd. and the Monado contributors
#}
{% from 'functions.jinja' import image_name, image_name_for_comment with context %}
{% for distro in distributions -%} {%- for image in distro.images %}
# Variables for build and usage of {{ distro.name|capitalize }} {{image.codename}} image
.monado.variables.{{distro.name}}:{{image.codename}}:
# Variables for build and usage of {{ image_name_for_comment(distro, image) }} image
.monado.variables.{{ image_name(distro, image) }}:
variables:
{% if "codename" in image or "distro_version" in image %}
FDO_DISTRIBUTION_VERSION: "{{ image["distro_version"] | default(image.codename) }}"
{% endif %}
FDO_DISTRIBUTION_TAG: "{{image["tag"]}}"
{% if "repo_suffix" in image %}
FDO_REPO_SUFFIX: {{image["repo_suffix"]}}
+8 -6
View File
@@ -3,17 +3,19 @@
# SPDX-FileCopyrightText: 2018-2023 Collabora, Ltd. and the Monado contributors
#}
{% from 'functions.jinja' import image_name, image_name_for_comment with context %}
###
# Container prep jobs
{%- for distro in distributions -%} {%- for image in distro.images %}
# Make {{ distro.name|capitalize }} {{image.codename}} image
{{distro.name}}:{{image.codename}}:container_prep:
# Make {{ image_name_for_comment(distro, image) }} image
{{ image_name(distro, image) }}:container_prep:
stage: container_prep
extends:
- .container-rules
- .monado.variables.{{distro.name}}:{{image.codename}}
- .monado.variables.{{ image_name(distro, image) }}
- .fdo.container-build@{{distro.name}} # from ci-templates
variables:
@@ -31,10 +33,10 @@
# Container usage base jobs
{% for distro in distributions -%} {%- for image in distro.images %}
# Base for using {{ distro.name|capitalize }} {{image.codename}} image
{{base_job_to_use_image(distro, image)}}:
# Base for using {{ image_name_for_comment(distro, image) }} image
{{ base_job_to_use_image(distro, image) }}:
extends:
- .monado.variables.{{distro.name}}:{{image.codename}}
- .monado.variables.{{ image_name(distro, image) }}
- .fdo.{{ "suffixed" if "repo_suffix" in image else "distribution" }}-image@{{distro.name}} # from ci-templates
- .build-rules
+5 -4
View File
@@ -22,8 +22,6 @@ The following will update all files from templates:
make -f .gitlab-ci/ci-scripts.mk
#}
# Detached MR pipelines, needed due to https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/438
# workflow:
# rules:
# - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
@@ -40,6 +38,9 @@ include:
- "/templates/{{distro.name}}.yml"
{% endfor %}
# - local: .gitlab-ci/containers/ci-container-prep.yml
# This include is for compatibility with the fdo CI restrictions/checks
# needed due to https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/438
- local: .gitlab-ci/ci-rules.yml
stages:
@@ -65,7 +66,7 @@ stages:
{% include 'ci-containers-variables.yml.jinja' %}
{% include 'ci-containers.yml.jinja' %}
{% from 'functions.jinja' import base_job_to_use_image_containing, base_job_to_use_image with context %}
{% from 'functions.jinja' import image_name, base_job_to_use_image_containing, base_job_to_use_image with context %}
# Style check job
format-and-spellcheck:
@@ -176,7 +177,7 @@ windows:
- build/Testing/Temporary
{% macro packaging_job_name(distro, image) -%}
{{distro.name}}:{{image.codename}}:package
{{ image_name(distro, image) }}:package
{%- endmacro %}
{% for distro in distributions -%} {%- for image in distro.images if "deb_version_suffix" in image %}
+1 -2
View File
@@ -195,8 +195,7 @@ distributions:
- name: arch
images:
- codename: rolling
tag: "2023-05-22.0"
- tag: "2023-11-14.0"
script: install-arch-additional-deps.sh
# pipewire-jack wireplumber: Explicitly choose dependencies to avoid pacman asking interactively
# python-setuptools glu: librealsense
+14 -1
View File
@@ -10,5 +10,18 @@
{% endfor -%} {%- endfor %}
{% endmacro -%}
{# Macro to compute a part of a job name, etc. for a distro and image #}
{% macro image_name(distro, image) -%}
{{ distro.name }}
{%- if "codename" in image %}:{{ image.codename }}{%- endif -%}
{%- endmacro -%}
{# Macro to compute job name to extend to use image given distro and image objects#}
{% macro base_job_to_use_image(distro, image) %}.monado.image.{{distro.name}}:{{image.codename}}{% endmacro -%}
{% macro base_job_to_use_image(distro, image) %}.monado.image.{{ image_name(distro, image) }}{% endmacro -%}
{# Macro to compute a part of a comment describing a distro and image #}
{% macro image_name_for_comment(distro, image) %}
{{ distro.name | capitalize }}
{%- if "codename" in image %} {{ image.codename }}{%- endif -%}
{%- endmacro -%}