Skip to content

Commit

Permalink
Merge branch 'ci-ubuntu-18.04'
Browse files Browse the repository at this point in the history
Fix ODBC CI build under Ubuntu 18.04 by moving it inside a container.

See #1048.
  • Loading branch information
vadz committed Apr 18, 2023
2 parents be5e1a4 + 249d1a4 commit 957afaf
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ on:
jobs:
build:
runs-on: ${{ matrix.runner || 'ubuntu-22.04' }}
container: ${{ matrix.container }}
name: ${{ matrix.name }}
strategy:
fail-fast: false
Expand All @@ -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
Expand Down
4 changes: 3 additions & 1 deletion scripts/ci/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
9 changes: 9 additions & 0 deletions scripts/ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/install_odbc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 957afaf

Please sign in to comment.