The package already installed on the system results in build errors when
trying to use it:
In file included from /usr/include/sql.h:19:0,
from /usr/include/sqlext.h:43,
from /home/runner/work/soci/soci/include/soci/odbc/soci-odbc.h:25,
from /home/runner/work/soci/soci/src/backends/odbc/factory.cpp:9:
/usr/include/sqltypes.h:56:10: fatal error: unixodbc.h: No such file or directory
#include "unixodbc.h"
^~~~~~~~~~~~
so remove it before installing the Debian version.
See https://github.com/microsoft/linux-package-repositories/issues/36
Set Dpkg::Use-Pty=0 to avoid more useless output and use this function
in all CI scripts instead of specifying the same apt-get options in all
of them.
This script must be sourced from all the other ones, including
install.sh which is used to install bash under FreeBSD, so it can't rely
on bash being already available.
It doesn't make much sense to configure this outside of the installation
script when we can already just install it from the script itself.
No real changes.
Pass the option to CMake too, instead of just skipping Boost
installation in this case because this didn't prevent any Boost
libraries already available on the system from being used.
This was always the intention, but it wasn't actually done, resulting in
not enabling -Werror and, also, building static libraries which is more
or less useless.
Under FreeBSD, for example, bash is installed only in /usr/local/bin and
/bin/bash is not available, so use "/usr/bin/env bash" to find it any
location.
As there doesn't seem to be any portable way to pass "-e" option to bash
when using env ("env -S" doesn't work with older GNU coreutils used in
GitHub CI Linux builds), set this option in common.sh once now instead
of doing it on the shebang line of all the scripts.
It would be even better to rewrite the scripts to avoid requiring bash,
but this would require more effort.
This is simpler than parsing /sys/devices/system/cpu/online ourselves
and also works under macOS.
Reduce the number of jobs, 1.5*CPU number is too much, so use more
conservative +1 instead.
Also rename TCI_NUMTHREADS (which was another reference to Travis CI) to
just num_cpus.
Use python3-venv package which should work on all Ubuntu versions,
including Xenial where this script currently runs, and which doesn't
have python3.4-venv.
This might help with sporadic failures in Travis CI Firebird build,
which sometimes fails with weird errors like this:
Unable to complete network request to host "localhost".
Failed to establish a connection.
unable to open database
Error setting new SYSDBA password
Note that dpkg-reconfigure does not return an error in this case, so we
need to check the password file itself to see if it was updated.
"services" can't be used with macOS runners and there is no way to limit
them to Linux runners only (i.e. "if:" is not supported here), so we'd
have to use 2 different jobs and duplicate all the other steps if we
wanted to continue using them.
Instead, just install PostgreSQL manually under Linux. This also means
that it isn't done for the builds that don't need it uselessly any more.
It is installed there but not started by default, so just launch it
ourselves.
Note that we must not use PGHOST etc variables under Mac, as the server
seems to be configured to only listen on the local socket by default, so
don't define them globally and do it only for Linux manually instead.
It doesn't make sense to call these scripts "before install" because
they do actually install things themselves.
In fact the whole separation into "install" and "before build" is
probably not very useful, but keep it as long as we keep using Travis CI
at all, as it maps better to its config file keys.
No real changes.
"readline" frontend doesn't work without a controlling TTY as can be
seen by setting DEBCONF_DEBUG=user before running dpkg-reconfigure, so
use "teletype" instead.
Also note that DEBIAN_FRONTEND environment variable unexpectedly seems
to override the value explicitly passed via dpkg-reconfigure -f option,
so we need to reset it (and then we don't need the -f option at all).
Handle Xenial which is similar to Trusty and also Focal, where we need
to install Firebird 3.0 server and tweak expect command to work with it.
Note that we still use Xenial for GitHub Actions Firebird CI build as
using Focal version results in memory leaks inside Firebird libraries
and there doesn't seem to be a debug symbol package for Firebird 3.0
that would be required to write a suppression file for them.