ci: Skip container-prep when CI scripts haven't changed

This commit is contained in:
Ryan Pavlik 2022-05-18 14:52:22 -05:00
parent 6de4e4afaa
commit f65a109508
2 changed files with 21 additions and 16 deletions

View file

@ -79,6 +79,9 @@ debian:bullseye:container_prep:
extends: extends:
- .monado.variables.debian:bullseye - .monado.variables.debian:bullseye
- .fdo.container-build@debian # from ci-templates - .fdo.container-build@debian # from ci-templates
only:
changes:
- .gitlab-ci/**/*
variables: variables:
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 ninja-build pandoc patch pkg-config python3 python3-click python3-pip unzip wget' 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 ninja-build pandoc patch pkg-config python3 python3-click python3-pip unzip wget'
FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/i386_and_proclamation_container_prep.sh' FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/i386_and_proclamation_container_prep.sh'
@ -89,6 +92,9 @@ debian:bullseye-ndk:container_prep:
extends: extends:
- .monado.variables.debian:bullseye-ndk - .monado.variables.debian:bullseye-ndk
- .fdo.container-build@debian # from ci-templates - .fdo.container-build@debian # from ci-templates
only:
changes:
- .gitlab-ci/**/*
variables: variables:
FDO_DISTRIBUTION_PACKAGES: 'ca-certificates cmake default-jdk-headless git glslang-tools libeigen3-dev meson ninja-build pkg-config python3 unzip wget' FDO_DISTRIBUTION_PACKAGES: 'ca-certificates cmake default-jdk-headless git glslang-tools libeigen3-dev meson ninja-build pkg-config python3 unzip wget'
FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/android_container_prep.sh' FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/android_container_prep.sh'
@ -99,6 +105,9 @@ ubuntu:focal:container_prep:
extends: extends:
- .monado.variables.ubuntu:focal - .monado.variables.ubuntu:focal
- .fdo.container-build@ubuntu # from ci-templates - .fdo.container-build@ubuntu # from ci-templates
only:
changes:
- .gitlab-ci/**/*
variables: variables:
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 ninja-build pandoc patch pkg-config python3 unzip wget' 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 ninja-build pandoc patch pkg-config python3 unzip wget'
@ -108,6 +117,9 @@ ubuntu:hirsute:container_prep:
extends: extends:
- .monado.variables.ubuntu:hirsute - .monado.variables.ubuntu:hirsute
- .fdo.container-build@ubuntu # from ci-templates - .fdo.container-build@ubuntu # from ci-templates
only:
changes:
- .gitlab-ci/**/*
variables: variables:
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 ninja-build pandoc patch pkg-config python3 unzip wget' 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 ninja-build pandoc patch pkg-config python3 unzip wget'
@ -117,6 +129,9 @@ ubuntu:impish:container_prep:
extends: extends:
- .monado.variables.ubuntu:impish - .monado.variables.ubuntu:impish
- .fdo.container-build@ubuntu # from ci-templates - .fdo.container-build@ubuntu # from ci-templates
only:
changes:
- .gitlab-ci/**/*
variables: variables:
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 ninja-build pandoc patch pkg-config python3 reprepro unzip wget' 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 ninja-build pandoc patch pkg-config python3 reprepro unzip wget'
@ -126,6 +141,9 @@ arch:rolling:container_prep:
extends: extends:
- .monado.variables.arch:rolling - .monado.variables.arch:rolling
- .fdo.container-build@arch # from ci-templates - .fdo.container-build@arch # from ci-templates
only:
changes:
- .gitlab-ci/**/*
variables: variables:
FDO_DISTRIBUTION_PACKAGES: 'check clang cmake diffutils doxygen eigen ffmpeg gcc git glfw-x11 glslang graphviz gtk3 hidapi libusb libxrandr mesa ninja opencv patch pkgconfig python3 qt5-base v4l-utils vulkan-headers vulkan-icd-loader' FDO_DISTRIBUTION_PACKAGES: 'check clang cmake diffutils doxygen eigen ffmpeg gcc git glfw-x11 glslang graphviz gtk3 hidapi libusb libxrandr mesa ninja opencv patch pkgconfig python3 qt5-base v4l-utils vulkan-headers vulkan-icd-loader'
@ -137,8 +155,6 @@ arch:rolling:container_prep:
extends: extends:
- .monado.variables.debian:bullseye - .monado.variables.debian:bullseye
- .fdo.distribution-image@debian # from ci-templates - .fdo.distribution-image@debian # from ci-templates
needs:
- debian:bullseye:container_prep
# Base for using Debian bullseye-ndk image # Base for using Debian bullseye-ndk image
@ -146,8 +162,6 @@ arch:rolling:container_prep:
extends: extends:
- .monado.variables.debian:bullseye-ndk - .monado.variables.debian:bullseye-ndk
- .fdo.suffixed-image@debian # from ci-templates - .fdo.suffixed-image@debian # from ci-templates
needs:
- debian:bullseye-ndk:container_prep
# Base for using Ubuntu focal image # Base for using Ubuntu focal image
@ -155,8 +169,6 @@ arch:rolling:container_prep:
extends: extends:
- .monado.variables.ubuntu:focal - .monado.variables.ubuntu:focal
- .fdo.distribution-image@ubuntu # from ci-templates - .fdo.distribution-image@ubuntu # from ci-templates
needs:
- ubuntu:focal:container_prep
# Base for using Ubuntu hirsute image # Base for using Ubuntu hirsute image
@ -164,8 +176,6 @@ arch:rolling:container_prep:
extends: extends:
- .monado.variables.ubuntu:hirsute - .monado.variables.ubuntu:hirsute
- .fdo.distribution-image@ubuntu # from ci-templates - .fdo.distribution-image@ubuntu # from ci-templates
needs:
- ubuntu:hirsute:container_prep
# Base for using Ubuntu impish image # Base for using Ubuntu impish image
@ -173,8 +183,6 @@ arch:rolling:container_prep:
extends: extends:
- .monado.variables.ubuntu:impish - .monado.variables.ubuntu:impish
- .fdo.distribution-image@ubuntu # from ci-templates - .fdo.distribution-image@ubuntu # from ci-templates
needs:
- ubuntu:impish:container_prep
# Base for using Arch rolling image # Base for using Arch rolling image
@ -182,8 +190,6 @@ arch:rolling:container_prep:
extends: extends:
- .monado.variables.arch:rolling - .monado.variables.arch:rolling
- .fdo.distribution-image@arch # from ci-templates - .fdo.distribution-image@arch # from ci-templates
needs:
- arch:rolling:container_prep
# Style check job # Style check job
@ -505,7 +511,6 @@ reprepro:package:
- .monado.packaging.conditions - .monado.packaging.conditions
needs: needs:
- ubuntu:impish:container_prep
- debian:bullseye:package - debian:bullseye:package
- ubuntu:focal:package - ubuntu:focal:package
- ubuntu:hirsute:package - ubuntu:hirsute:package

View file

@ -65,6 +65,9 @@ stages:
extends: extends:
- .monado.variables.{{distro.name}}:{{image.codename}} - .monado.variables.{{distro.name}}:{{image.codename}}
- .fdo.container-build@{{distro.name}} # from ci-templates - .fdo.container-build@{{distro.name}} # from ci-templates
only:
changes:
- .gitlab-ci/**/*
variables: variables:
{# The packages list is actually a mapping, not an array, but the same syntax works. #} {# The packages list is actually a mapping, not an array, but the same syntax works. #}
{# Needed to be a mapping so it could be "merged" #} {# Needed to be a mapping so it could be "merged" #}
@ -86,8 +89,6 @@ stages:
extends: extends:
- .monado.variables.{{distro.name}}:{{image.codename}} - .monado.variables.{{distro.name}}:{{image.codename}}
- .fdo.{{ "suffixed" if "repo_suffix" in image else "distribution" }}-image@{{distro.name}} # from ci-templates - .fdo.{{ "suffixed" if "repo_suffix" in image else "distribution" }}-image@{{distro.name}} # from ci-templates
needs:
- {{distro.name}}:{{image.codename}}:container_prep
{% endfor -%} {%- endfor %} {% endfor -%} {%- endfor %}
@ -240,7 +241,6 @@ reprepro:package:
- {{ base_job_to_use_image_containing("reprepro") }} - {{ base_job_to_use_image_containing("reprepro") }}
- .monado.packaging.conditions - .monado.packaging.conditions
needs: needs:
- {{ base_job_to_use_image_containing("reprepro") | replace(".monado.image.", "") | trim + ":container_prep" }}
{% for distro in distributions -%} {%- for image in distro.images if "deb_version_suffix" in image %} {% for distro in distributions -%} {%- for image in distro.images if "deb_version_suffix" in image %}
- {{packaging_job_name(distro, image)}} - {{packaging_job_name(distro, image)}}
{% endfor -%} {%- endfor %} {% endfor -%} {%- endfor %}