From e6e2b27105e675485e2b347d511d4f76f159d2b0 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 6 Jun 2021 11:18:56 -0700 Subject: [PATCH] add an out-of-source build to CI The existing CI tasks run an uncommon work flow: building distributable packages on each operating system. A more common work flow end users will be following with the portable source tarball is simply building and installing it. This change adds a job that does this, to provide a safeguard against breaking this work flow in future. The added job runs on Ubuntu 21.04. The intent is to bump this job to the latest each time there is a new Ubuntu release. There is no companion test job for the build job because we assume the existing test jobs are providing sufficient coverage. Closes #2073. --- .gitlab-ci.yml | 23 +++++++++++++++++++++++ ci/out-of-source-build.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100755 ci/out-of-source-build.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 32b56f580..5c6b847ad 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -349,6 +349,29 @@ ubuntu21-04-build: variables: IMAGE: ubuntu-21.04 +out-of-source-build: + <<: *deb_build_definition + script: + - logfile=`mktemp` + - ci/out-of-source-build.sh |& tee $logfile + - echo "$CI_JOB_NAME-warnings `grep -c 'warning:' $logfile`" > metrics.txt + - rm $logfile + - cat metrics.txt + needs: + - job: docker_build_ubuntu-21.04 + artifacts: false + - job: portable-source + artifacts: true + tags: + - linux + artifacts: + when: on_success + expire_in: 1 week + reports: + metrics: metrics.txt + variables: + IMAGE: ubuntu-21.04 + macos-autotools-build: <<: *macos_build_definition before_script: diff --git a/ci/out-of-source-build.sh b/ci/out-of-source-build.sh new file mode 100755 index 000000000..8ab01ded7 --- /dev/null +++ b/ci/out-of-source-build.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +# this script does something close to the work flow end users may follow when +# building Graphviz + +set -x +set -e +set -o pipefail + +# output some info for debugging +uname -rms +cat /etc/os-release + +GV_VERSION=$(cat VERSION) + +# unpack the portable source tarball +tar xfz graphviz-${GV_VERSION}.tar.gz + +# setup a directory for building in +mkdir build +cd build +../graphviz-${GV_VERSION}/configure + +# build Graphviz +make + +# install Graphviz +make install -- 2.50.1