diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae5e2562f..e7cef2231 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,7 @@ on: jobs: build: runs-on: ${{ matrix.runner || 'ubuntu-22.04' }} + container: ${{ matrix.container }} name: ${{ matrix.name }} strategy: fail-fast: false @@ -40,7 +41,7 @@ jobs: name: Valgrind - backend: odbc # There are many leak reports under Ubuntu 22.04, see #1008. - runner: ubuntu-18.04 + container: ubuntu:18.04 name: ODBC - backend: firebird name: Firebird diff --git a/scripts/ci/common.sh b/scripts/ci/common.sh index c1864ea28..30ffb787f 100644 --- a/scripts/ci/common.sh +++ b/scripts/ci/common.sh @@ -80,10 +80,12 @@ tmstamp() echo -n "[$(date '+%H:%M:%S')]" ; } +SOCI_APT_OPTIONS='-q -y -o=Dpkg::Use-Pty=0 --no-install-recommends' + run_apt() { # Disable some (but not all) output. - sudo apt-get -q -y -o=Dpkg::Use-Pty=0 "$@" + sudo apt-get $SOCI_APT_OPTIONS "$@" } run_make() diff --git a/scripts/ci/install.sh b/scripts/ci/install.sh index 47bb4860a..86286dd3f 100755 --- a/scripts/ci/install.sh +++ b/scripts/ci/install.sh @@ -9,6 +9,15 @@ case "$(uname)" in Linux) + # Install the bare minimum for the rest to work if we're running on a + # minimum system. + if ! command -v lsb_release > /dev/null; then + # We can't use run_apt here because it uses sudo which may also be + # not available yet. + apt-get $SOCI_APT_OPTIONS update + apt-get $SOCI_APT_OPTIONS install build-essential lsb-release sudo + fi + packages_to_install="cmake libc6-dbg" if [ "${WITH_BOOST}" != OFF ]; then packages_to_install="$packages_to_install libboost-dev libboost-date-time-dev" diff --git a/scripts/ci/install_odbc.sh b/scripts/ci/install_odbc.sh index 1c11505d1..b76ccacc9 100755 --- a/scripts/ci/install_odbc.sh +++ b/scripts/ci/install_odbc.sh @@ -14,7 +14,7 @@ run_apt remove \ run_apt install \ tar bzip2 \ unixodbc unixodbc-dbgsym unixodbc-dev \ - odbc-postgresql odbc-postgresql-dbgsym + odbc-postgresql odbc-postgresql-dbgsym postgresql # Use full path to the driver library to avoid errors like # [01000][unixODBC][Driver Manager]Can't open lib 'psqlodbca.so' : file not found