From f1b900340f04e1555ed9fd5ef7776bffbbff14a7 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Mon, 21 Jun 2021 11:55:59 -0600 Subject: [PATCH 1/4] ci: Disable fail-fast in GitHub Tests workflow Don't cancel all the jobs if one distro config fails. The jobs are mostly independent, so we do want to let the others continue in case the failure is isolated to that particular distro configuration. --- .github/workflows/tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 436dfbe9..70af9d3b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,6 +30,9 @@ jobs: # # configure-options: Options to pass to `configure`. strategy: + # Let other configurations continue if one fails. + fail-fast: false + matrix: include: - name: Debian Buster (10) with sign-ed25519 From 156ec07f01f04b878a278a8bc8259ac0b303979f Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Mon, 21 Jun 2021 13:42:20 -0600 Subject: [PATCH 2/4] ci: Drop special handling of test-suite.log The automake test harness[1] already dumps the contents of `test-suite.log` when `VERBOSE=1` is set, so we don't need to add special handling for it. 1. https://www.gnu.org/software/automake/manual/html_node/Parallel-Test-Harness.html --- ci/gh-build.sh | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/ci/gh-build.sh b/ci/gh-build.sh index 949ce5fa..11434327 100755 --- a/ci/gh-build.sh +++ b/ci/gh-build.sh @@ -32,6 +32,8 @@ srcdir="$(pwd)" mkdir ci-build cd ci-build +# V=1 shows the full build commands. VERBOSE=1 dumps test-suite.log on +# failures. make="make V=1 VERBOSE=1" ../configure \ @@ -40,20 +42,9 @@ make="make V=1 VERBOSE=1" ${make} -# Run the tests both using check and distcheck and dump the logs on -# failures. For distcheck the logs will be inside the dist directory, so -# tell make to use the current directory. -if ! ${make} check; then - cat test-suite.log || : - exit 1 -fi -if ! ${make} distcheck \ - TEST_SUITE_LOG=$(pwd)/test-suite.log \ - DISTCHECK_CONFIGURE_FLAGS="$*" -then - cat test-suite.log || : - exit 1 -fi +# Run the tests both using check and distcheck. +${make} check +${make} distcheck DISTCHECK_CONFIGURE_FLAGS="$*" # Show the installed files ${make} install DESTDIR=$(pwd)/DESTDIR From 410b46f09de34b61bb6e0e2b33db58c4568e2054 Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Mon, 21 Jun 2021 11:40:07 -0600 Subject: [PATCH 3/4] ci: Update Debian and Ubuntu build dependencies This refreshes the build dependencies installed for the GitHub Tests workflow based on the Build-Depends in the upstream packaging. The handling is now more explicit about any deviations and any release differences. --- ci/gh-install.sh | 127 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 91 insertions(+), 36 deletions(-) diff --git a/ci/gh-install.sh b/ci/gh-install.sh index dc0c7fde..25f451a0 100755 --- a/ci/gh-install.sh +++ b/ci/gh-install.sh @@ -26,8 +26,6 @@ set -euo pipefail set -x -NULL= - # Get the OS release info . /etc/os-release @@ -37,42 +35,99 @@ case "$ID" in # be answered. export DEBIAN_FRONTEND=noninteractive + # Debian upstream data: + # https://tracker.debian.org/pkg/ostree + # https://salsa.debian.org/debian/ostree + # https://salsa.debian.org/debian/ostree/-/blob/debian/master/debian/control + # + # Ubuntu package data: + # https://packages.ubuntu.com/source/impish/ostree + # # TODO: fetch this list from the Debian packaging git repository? + + # First construct a list of Build-Depends common to all + # versions. This includes build-essential, which is assumed to + # be installed on all Debian builders. We also add gjs to allow + # the JS tests to run even though gjs is explicitly disable in + # Debian. + PACKAGES=( + attr + autoconf + automake + bison + build-essential + ca-certificates + cpio + debhelper + dh-exec + docbook-xml + docbook-xsl + e2fslibs-dev + elfutils + fuse + gnupg + gobject-introspection + gtk-doc-tools + libarchive-dev + libattr1-dev + libavahi-client-dev + libavahi-glib-dev + libcap-dev + libfuse-dev + libgirepository1.0-dev + libglib2.0-dev + libglib2.0-doc + libgpgme-dev + liblzma-dev + libmount-dev + libselinux1-dev + libsoup2.4-dev + libsystemd-dev + libtool + procps + python3 + python3-yaml + xsltproc + zlib1g-dev + ) + + # Additional common packages: + # + # gjs - To allow running JS tests even though this has been + # disabled in Debian for a while. + # + # gnome-desktop-testing - To eventually allow running the + # installed tests. + # + # libcurl4-openssl-dev - To allow building the cURL fetch + # backend in addition to the soup fetch backend. + # + # systemd - To get the unit and generator paths from systemd.pc + # rather than passing them as configure options. + PACKAGES+=( + gjs + gnome-desktop-testing + libcurl4-openssl-dev + systemd + ) + + # Distro specific packages. Matching is on VERSION_CODENAME from + # /etc/os-release. Debian testing and unstable may not have this + # set, so assume an empty or unset value represents those. + + # hexdump was previously provided by bsdmainutils but is now in + # bsdextrautils. + case "${VERSION_CODENAME:-}" in + (buster|focal|bionic) + PACKAGES+=(bsdmainutils) + ;; + (*) + PACKAGES+=(bsdextrautils) + ;; + esac + apt-get -y update - apt-get -y install \ - attr \ - bison \ - cpio \ - debhelper \ - dh-autoreconf \ - dh-systemd \ - docbook-xml \ - docbook-xsl \ - e2fslibs-dev \ - elfutils \ - fuse \ - gjs \ - gnome-desktop-testing \ - gobject-introspection \ - gtk-doc-tools \ - libarchive-dev \ - libattr1-dev \ - libcap-dev \ - libcurl4-openssl-dev \ - libfuse-dev \ - libgirepository1.0-dev \ - libglib2.0-dev \ - libgpgme11-dev \ - liblzma-dev \ - libmount-dev \ - libselinux1-dev \ - libsoup2.4-dev \ - libsystemd-dev \ - procps \ - python3-yaml \ - systemd \ - zlib1g-dev \ - "$@" + apt-get -y install "${PACKAGES[@]}" "$@" ;; (*) From dfe3bdc13f7e8576806042a0aeb65c2aaeaba5ab Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Mon, 21 Jun 2021 10:56:53 -0600 Subject: [PATCH 4/4] ci: Use Debian and Ubuntu release stage tags Rather than use the release codename tags, use the release stage tags. This way the configuration (theoretically) doesn't need to be updated when new Debian and Ubuntu releases are made. For Debian stable is used instead of buster and a testing (bullseye) build is added. For Ubuntu, latest is used instead of focal for the current LTS and rolling is used instead of groovy for the latest release. This actually changes the Ubuntu build from groovy to hirsute. --- .github/workflows/tests.yml | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 70af9d3b..45626be2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,8 +35,13 @@ jobs: matrix: include: - - name: Debian Buster (10) with sign-ed25519 - image: debian:buster-slim + # Debian builds. Currently stable and testing are tested. + # Other options would be stable-backports, oldstable, + # oldstable-backports and unstable. + # + # https://hub.docker.com/_/debian + - name: Debian Stable with sign-ed25519 + image: debian:stable-slim pre-checkout-setup: | apt-get update apt-get install -y git @@ -45,8 +50,8 @@ jobs: configure-options: >- --with-ed25519-libsodium - - name: Debian Buster (10) with curl, sign-ed25519 and no gpgme - image: debian:buster-slim + - name: Debian Stable with curl, sign-ed25519 and no gpgme + image: debian:stable-slim pre-checkout-setup: | apt-get update apt-get install -y git @@ -59,8 +64,8 @@ jobs: # A 32 bit build to act as a proxy for frequently deployed 32 # bit armv7 - - name: Debian Buster (10) 32 bit - image: i386/debian:buster-slim + - name: Debian Stable 32 bit + image: i386/debian:stable-slim # This is pretty nasty. The checkout action uses an x86_64 # node binary in the container, so we need to provide an # x86_64 ld.so and libstdc++. @@ -69,14 +74,26 @@ jobs: apt-get update apt-get install -y git libc6:amd64 libstdc++6:amd64 - - name: Ubuntu Focal (20.04) - image: ubuntu:focal + - name: Debian Testing + image: debian:testing-slim pre-checkout-setup: | apt-get update apt-get install -y git - - name: Ubuntu Groovy (20.10) - image: ubuntu:groovy + # Ubuntu builds. Unfortunately, when the latest release is + # also the latest LTS, latest and rolling are the same. Other + # options would be to test the previous LTS by name or to test + # the devel tag, which is the unreleased version. + # + # https://hub.docker.com/_/ubuntu + - name: Ubuntu Latest LTS + image: ubuntu:latest + pre-checkout-setup: | + apt-get update + apt-get install -y git + + - name: Ubuntu Latest Release + image: ubuntu:rolling pre-checkout-setup: | apt-get update apt-get install -y git