gitlab CI: pre-install all packages we need
authorPeter Hutterer <peter.hutterer@who-t.net>
Fri, 1 Jul 2022 04:40:20 +0000 (14:40 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 15 Nov 2022 23:00:25 +0000 (09:00 +1000)
Running "dnf install" during a job can lead to issues when the image is
old - package renames/replacements/etc. may require a dnf upgrade to get
those packages sorted first before our dnf install works.

This hasn't been a problem for us because we had weekly rebuilds of the
images scheduled and were usually on the latest package set but let's do
this properly anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
.gitlab-ci.yml
.gitlab-ci/ci.template
.gitlab-ci/config.yml

index 0160481..c4edd3f 100644 (file)
@@ -76,7 +76,7 @@ variables:
   # See the documentation here:                                                 #
   # https://wayland.freedesktop.org/libinput/doc/latest/building_libinput.html  #
   ###############################################################################
-  FEDORA_PACKAGES:  'git-core gcc gcc-c++ pkgconf-pkg-config meson check-devel libudev-devel libevdev-devel doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx_rtd_theme python3-pytest-xdist libwacom-devel cairo-devel gtk4-devel glib2-devel mtdev-devel diffutils wayland-protocols-devel valgrind systemd-udev qemu-img qemu-system-x86-core qemu-system-aarch64-core jq python3-click python3-rich'
+  FEDORA_PACKAGES:  'git-core gcc gcc-c++ pkgconf-pkg-config meson check-devel libudev-devel libevdev-devel doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx_rtd_theme python3-pytest-xdist libwacom-devel cairo-devel gtk4-devel glib2-devel mtdev-devel diffutils wayland-protocols-devel black clang-analyzer jq rpmdevtools valgrind systemd-udev qemu-img qemu-system-x86-core qemu-system-aarch64-core jq python3-click python3-rich'
   DEBIAN_PACKAGES:  'git gcc g++ pkg-config meson check libudev-dev libevdev-dev doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx-rtd-theme python3-pytest-xdist libwacom-dev libcairo2-dev libgtk-3-dev libglib2.0-dev libmtdev-dev curl'
   UBUNTU_PACKAGES:  'git gcc g++ pkg-config meson check libudev-dev libevdev-dev doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx-rtd-theme python3-pytest-xdist libwacom-dev libcairo2-dev libgtk-3-dev libglib2.0-dev libmtdev-dev'
   ARCH_PACKAGES:    'git gcc pkgconfig meson check libsystemd libevdev doxygen graphviz python-sphinx python-recommonmark python-sphinx_rtd_theme python-pytest-xdist libwacom gtk4 mtdev diffutils wayland-protocols'
@@ -88,12 +88,12 @@ variables:
   # changing these will force rebuilding the associated image
   # Note: these tags have no meaning and are not tied to a particular
   # libinput version
-  FEDORA_TAG:  '2022-11-16.1'
-  DEBIAN_TAG:  '2022-11-16.1'
-  UBUNTU_TAG:  '2022-11-16.1'
-  ARCH_TAG:    '2022-11-16.1'
-  ALPINE_TAG:  '2022-11-16.1'
-  FREEBSD_TAG: '2022-11-16.1'
+  FEDORA_TAG:  '2022-11-16.2'
+  DEBIAN_TAG:  '2022-11-16.2'
+  UBUNTU_TAG:  '2022-11-16.2'
+  ARCH_TAG:    '2022-11-16.2'
+  ALPINE_TAG:  '2022-11-16.2'
+  FREEBSD_TAG: '2022-11-16.2'
 
   FDO_UPSTREAM_REPO: libinput/libinput
 
@@ -719,8 +719,6 @@ scan-build@fedora:36:
   variables:
     NINJA_ARGS: ''
     MESON_TEST_ARGS: ''
-  before_script:
-    - dnf install -y clang-analyzer
   script:
     - .gitlab-ci/meson-build.sh
     - export SCANBUILD="$PWD/.gitlab-ci/scanbuild-wrapper.sh"
@@ -809,8 +807,6 @@ usr-bin-env-python@fedora:36:
 python-format@fedora:36:
   extends:
     - .fedora-build@template
-  before_script:
-    - dnf install -y black
   script:
     - black $(git grep -l '^#!/usr/bin/env python3')
     - git diff --exit-code || (echo "Please run Black against all Python files" && false)
@@ -819,8 +815,6 @@ python-format@fedora:36:
 check-test-suites:
   extends:
     - .fedora-build@template
-  before_script:
-    - dnf install -y jq
   script:
     - meson builddir
     - meson introspect builddir --test | jq -r '.[].name' | grep 'libinput-test-suite' | sort > meson-testsuites
@@ -1030,7 +1024,6 @@ build rpm:
   needs:
     - "fedora:36@container-prep"
   script:
-    - dnf install -y rpmdevtools jq
     - meson "$MESON_BUILDDIR"
     - VERSION=$(meson introspect "$MESON_BUILDDIR" --projectinfo | jq -r .version)
     - sed -e "s/@PIPELINEID@/${CI_PIPELINE_ID}/"
index 4f16f5c..70a6fcd 100644 (file)
@@ -437,8 +437,6 @@ scan-build@{{distro.name}}:{{version}}:
   variables:
     NINJA_ARGS: ''
     MESON_TEST_ARGS: ''
-  before_script:
-    - dnf install -y clang-analyzer
   script:
     - .gitlab-ci/meson-build.sh
     - export SCANBUILD="$PWD/.gitlab-ci/scanbuild-wrapper.sh"
@@ -527,8 +525,6 @@ usr-bin-env-python@{{distro.name}}:{{version}}:
 python-format@{{distro.name}}:{{version}}:
   extends:
     - .{{distro.name}}-build@template
-  before_script:
-    - dnf install -y black
   script:
     - black $(git grep -l '^#!/usr/bin/env python3')
     - git diff --exit-code || (echo "Please run Black against all Python files" && false)
@@ -537,8 +533,6 @@ python-format@{{distro.name}}:{{version}}:
 check-test-suites:
   extends:
     - .{{distro.name}}-build@template
-  before_script:
-    - dnf install -y jq
   script:
     - meson builddir
     - meson introspect builddir --test | jq -r '.[].name' | grep 'libinput-test-suite' | sort > meson-testsuites
@@ -693,7 +687,6 @@ build rpm:
   needs:
     - "fedora:36@container-prep"
   script:
-    - dnf install -y rpmdevtools jq
     - meson "$MESON_BUILDDIR"
     - VERSION=$(meson introspect "$MESON_BUILDDIR" --projectinfo | jq -r .version)
     - sed -e "s/@PIPELINEID@/${CI_PIPELINE_ID}/"
index bc5ad95..9e63be3 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 # We're happy to rebuild all containers when one changes.
-.default_tag: &default_tag '2022-11-16.1'
+.default_tag: &default_tag '2022-11-16.2'
 
 distributions:
   - name: fedora
@@ -35,6 +35,10 @@ distributions:
       - mtdev-devel
       - diffutils
       - wayland-protocols-devel
+      - black           # for the Python black job, optional
+      - clang-analyzer  # for the scan-build job, optional
+      - jq              # for the test suite check job, optional
+      - rpmdevtools     # for the rpm build job, optional
       - valgrind        # for the valgrind run, optional
       # below packages are for the qemu runs, so optional
       - systemd-udev    # for the qemu run