From 0cab09f488fa70ce1b47831446f949b93ca87414 Mon Sep 17 00:00:00 2001 From: "Austin S. Hemmelgarn" Date: Mon, 15 Nov 2021 10:02:57 -0500 Subject: Overhaul build CI. (#11699) * Overhaul build CI. This makes a number of changes that make our build CI easier to maintain and much safer with respect to the possibility of accidentally pushing broken nightlies. * The release-build.yml workflow has been renamed to just build.yml * The updater.yml and build-and-install.yml workflows have been consolidated into the build.yml workflow. * The updater checks now use the dist tarball produced by the dist tarball build instead of building one for each matrix job. * The updater and build checks now use a set of jobs for generating their test environments. * The updater and build checks and their shared test environment builds now use a unified build matrix, handled in an external data file (.github/data/build-matrix.json). * Nightly artifact uploads and release creation are now dependent on the updater checks passing. * Properly handle generated build matrix. * Minor fixes. * Fix shellcheck complaints. * Fixed stub script handling. * Mangle the build matrix JSON properly. * Properly handle stub scripts. * Fix distro name handling. * Fix typos. * Fix test environment image handling. * Fix updater checks. * Skip CentOS 7 JSON-C bundling check. * Fix handling of artifacts for updater check. * Fix yamllint errors. * Fix dist tarball handling. * Fix updater check script permissions. * Restructure build test Dockerfile for better caching. * Remove parallelization limits for test environment builds. These complete fast enough that it is perfectly reasonable to run them all in parallel simultaneously. In the best case scenario, this will save roughly 5-10 minutes of time during CI runs. * Add more in-line documentation and tidy up a few unneeded parameters. * Add checks to verify consolidated artifacts are good. * Fix distfile name handling. * Fix artifact checking. * Better delineate phases of updater check in logs. * Simplify updater checks. * Print checksums of artifacts. To simplify debugging. * Fix handling of updater checks. --- .github/data/build-matrix.json | 109 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 .github/data/build-matrix.json (limited to '.github/data') diff --git a/.github/data/build-matrix.json b/.github/data/build-matrix.json new file mode 100644 index 0000000000..427819b250 --- /dev/null +++ b/.github/data/build-matrix.json @@ -0,0 +1,109 @@ +{ + "include": [ + { + "distro": "alpine:edge", + "artifact_key": "alpine-edge", + "pre": "apk add -U bash", + "rmjsonc": "apk del json-c-dev" + }, + { + "distro": "alpine:3.14", + "artifact_key": "alpine-3.14", + "pre": "apk add -U bash", + "rmjsonc": "apk del json-c-dev" + }, + { + "distro": "alpine:3.13", + "artifact_key": "alpine-3.13", + "pre": "apk add -U bash", + "rmjsonc": "apk del json-c-dev" + }, + { + "distro": "alpine:3.12", + "artifact_key": "alpine-3.12", + "pre": "apk add -U bash", + "rmjsonc": "apk del json-c-dev" + }, + { + "distro": "archlinux:latest", + "artifact_key": "archlinux", + "pre": "pacman --noconfirm -Syu && pacman --noconfirm -Sy grep libffi" + }, + { + "distro": "centos:7", + "artifact_key": "centos7" + }, + { + "distro": "centos:8", + "artifact_key": "centos8", + "rmjsonc": "dnf remove -y json-c-devel" + }, + { + "distro": "debian:11", + "artifact_key": "debian11", + "pre": "apt-get update", + "rmjsonc": "apt-get remove -y libjson-c-dev" + }, + { + "distro": "debian:10", + "artifact_key": "debian10", + "pre": "apt-get update", + "rmjsonc": "apt-get remove -y libjson-c-dev" + }, + { + "distro": "debian:9", + "artifact_key": "debian9", + "pre": "apt-get update", + "rmjsonc": "apt-get remove -y libjson-c-dev" + }, + { + "distro": "fedora:35", + "artifact_key": "fedora35", + "rmjsonc": "dnf remove -y json-c-devel" + }, + { + "distro": "fedora:34", + "artifact_key": "fedora34", + "rmjsonc": "dnf remove -y json-c-devel" + }, + { + "distro": "fedora:33", + "artifact_key": "fedora33", + "rmjsonc": "dnf remove -y json-c-devel" + }, + { + "distro": "opensuse/leap:15.3", + "artifact_key": "opensuse15.3", + "rmjsonc": "zypper rm -y libjson-c-devel" + }, + { + "distro": "opensuse/leap:15.2", + "artifact_key": "opensuse15.2", + "rmjsonc": "zypper rm -y libjson-c-devel" + }, + { + "distro": "ubuntu:21.10", + "artifact_key": "ubuntu21.10", + "pre": "rm -f /etc/apt/apt.conf.d/docker && apt-get update", + "rmjsonc": "apt-get remove -y libjson-c-dev" + }, + { + "distro": "ubuntu:21.04", + "artifact_key": "ubuntu21.04", + "pre": "apt-get update", + "rmjsonc": "apt-get remove -y libjson-c-dev" + }, + { + "distro": "ubuntu:20.04", + "artifact_key": "ubuntu20.04", + "pre": "apt-get update", + "rmjsonc": "apt-get remove -y libjson-c-dev" + }, + { + "distro": "ubuntu:18.04", + "artifact_key": "ubuntu18.04", + "pre": "apt-get update", + "rmjsonc": "apt-get remove -y libjson-c-dev" + } + ] +} -- cgit v1.2.3