Commit graph

48 commits

Author SHA1 Message Date
Simon McVittie
bb38fb361e CI: Don't pin msys2 packages to a specific version at all
Similar to dbus/dbus!286, but more so: just use the package names,
ignoring their version numbers completely.

pcre2 is not strictly needed at the moment, but it'll be a dependency
for GLib >= 2.73.x (older versions used pcre). For a bit of
future-proofing, download both pcre and pcre2.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-09-12 20:01:50 +01:00
Alex Richardson
ee880ef811 tools/ci-install.sh: Install meson build dependencies on FreeBSD
Python is already installed, but we need the python3 package to get the
/usr/local/bin/python3 symlink rather than the one with the version suffix.
2022-08-10 11:18:20 +00:00
Alex Richardson
2659a0f18e gitlab-ci: Use GNU make on FreeBSD
The Makefile.am files contain % pattern rules that are not supported by
`make` (bmake) on FreeBSD. Since the replacing the patterns is non-trivial,
this commit updates the CI script to use GNU make when building on FreeBSD.
2022-08-10 11:18:20 +00:00
Alex Richardson
902260f6da gitlab-ci: Install pkg-config on FreeBSD
Without this change the autotools build system fails to find glib and
reports an error. The CMake build worked prior to this change since CMake
has fallback logic to find glib even without pkg-config.
2022-08-10 11:18:20 +00:00
Alex Richardson
ca091e78d3 tools/ci-install.sh: Add FreeBSD support
This adds support for installing the required packages on FreeBSD.
2022-08-10 11:18:20 +00:00
Alex Richardson
295912045e tools/ci-{build,install}.sh: Use a portable interpreter argument
FreeBSD has bash installed as /usr/local/bin/bash, so hardcoding /bin/bash
does not work. Instead use the portable replacement using env which will
find bash in $PATH.
2022-08-10 11:18:20 +00:00
Simon McVittie
4d0341052a CI: Install cross pkg-config on openSUSE
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-13 20:36:13 +01:00
Simon McVittie
be17ca80fe CI: Add repository for word-size-independent mingw stuff
windows:mingw:win64 depends on packages from windows:mingw.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-13 20:36:13 +01:00
Simon McVittie
1e5badb071 CI: Reinstate mingw*-glib2-devel
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-13 20:36:13 +01:00
Marc-André Lureau
07ddd3597e Add meson build CI
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-07-13 20:36:13 +01:00
Simon McVittie
4fbdb14987 subprojects: Allow expat and GLib to be built as subprojects
This should let us build everything with a mingw-w64 toolchain, without
having to use prebuilt dependencies from MSYS.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-07-13 20:36:13 +01:00
Alex Richardson
364fe6be69 tools/ci-install.sh: Install newer CMake on openSuSE
This is needed for JUnit XML output for tests.
2022-05-17 10:48:06 +00:00
Ralf Habacker
a3b20acdd4 Add automatic detection of suite to CI scripts
The detection is based on the variable VERSION_CODENAME from
/etc/os-release, which is supported by systemd. For further details see
https://www.freedesktop.org/software/systemd/man/os-release.html.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2022-04-04 12:37:50 +02:00
Ralf Habacker
82f1aaeea0 Add automatic detection of distribution to CI scripts
The detection is based on the variable ID from /etc/os-release,
which is supported by systemd. For further details see
https://www.freedesktop.org/software/systemd/man/os-release.html.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2022-04-04 09:24:31 +02:00
Ralf Habacker
acdf5a7a18 On CI add build support for openSUSE distributions
The mingw related jobs are running the whole test suite which
is an extension to the available jobs.

The environment variable ci_suite is not used on openSUSE
distributions, as it is determined from the installed image.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2022-03-29 12:47:59 +00:00
Ralf Habacker
c4d69fe95e tools/ci-install.sh: clean up the previously used installation prefix and the downloaded mingw packages
This is necessary to have a clean initial state when running the script
locally.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2022-03-29 10:29:18 +02:00
Ralf Habacker
99c1de5180 tools/ci-install.sh: Use partially qualified versions with mingw package names
Fixes dbus/dbus#388

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2022-03-29 10:29:18 +02:00
Ralf Habacker
a7fb199f22 tools/ci-install.sh: on debian|ubuntu reduce the need for mingw package name changes
Instead of having to specify an exact version that needs to be adjusted
with each repository update, it is now possible to specify package names
without version or partially qualified versions, which reduces the
frequency of necessary adjustments.

This is achieved by searching for the package names in a previously
downloaded list of available packages.

Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
2022-03-29 10:29:18 +02:00
Simon McVittie
61cfa140cb CI: Use https to download MSYS packages
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-02-25 14:08:58 +00:00
Simon McVittie
97c2f9e306 CI: Install ci-certificates
We need this to be able to download MSYS packages now.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-02-25 14:08:58 +00:00
Simon McVittie
69c610f6f0 CI: Remove EOL versions of Debian and Ubuntu
Debian 9 'stretch' is EOL, and Ubuntu 16.04 is EOL unless you enter into
a special subscription with Canonical. This puts them outside our
informal security-support policy, and realistically, anyone sufficiently
change-averse to be following these distributions is not going to be
backporting a current version of dbus.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-02-25 13:54:05 +00:00
Ralf Habacker
acb9ca7422 tools/ci-*.sh: Show used command line for CI build scripts
This makes it much easier to determine the command line used for the
purpose of reproducing the build.
2021-11-29 15:20:10 +00:00
Marc-André Lureau
c5385dfd60 ci: bump msys2 deps, fix broken links
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-01-13 18:53:23 +04:00
Ralf Habacker
6412ccdf67 tools/ci-install.sh: Use package=() style for local package list to avoid '\' notation 2020-11-24 07:08:42 +00:00
Ralf Habacker
9c5734fe90 On CI use common install prefix named 'dep_prefix' for installing local packages
With this commit a new variable 'ci_local_packages' has been introduced
to have a choice for using development packages from a local installation
or from the distribution.
2020-11-24 07:08:42 +00:00
Ralf Habacker
478484f13c tools/ci-install.sh: merge multiple calls to apt-get
This required a reorganization of the steps that had been carried out.
The new order is:
   1. install packages with apt-get
   2. create user for build if required
   3. fetch and unpack tar balls
   4. create messagebus user
2020-11-24 07:08:42 +00:00
Ralf Habacker
1e3d82d85e Move installing packages into tools/ci-install.sh
In tools/ci-build.sh the cross compile setup has to be moved further up
to match the correct subdirectory.
2020-11-24 07:08:42 +00:00
Ralf Habacker
d64316a676 CI: Add running test cases for cross builds
Before building a wine prefix is created and search pathes
for binaries are configured in the wine prefix.

This commit adds a new shell variable 'ci_runtime' for specifing
the type of compiler support library which defaults to static for now.
2020-05-29 16:43:45 +02:00
Ralf Habacker
6e8d75834e Add support to generate the api documentation in Qt help format
Qt help files are used by Qt Creator and KDevelop, for example, to support
the development of Qt-based applications and libraries.

Generating api documentation in Qt help format is controlled by two
user specific options named --enable-qt-help and --with-qchdir (autotools)
and -DENABLE_QT_HELP and -DINSTALL_QCH_DIR (cmake).
2020-04-29 15:23:23 +00:00
Simon McVittie
23e1f044f4 CI: Install qhelpgenerator for native production build on buster
This will be used in dbus!150.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2020-04-06 14:59:34 +01:00
Simon McVittie
78efbb6c0d CI: Install yelp-tools, for yelp-build, in recent distros
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-12-05 14:54:24 +00:00
Simon McVittie
52fcc82379 CI: Make adduser properly non-interactive
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-12-05 14:54:24 +00:00
Simon McVittie
cb6abc6391 CI: Don't install weak dependencies (Recommends)
In particular this avoids installing the TeX toolchain.

However, this also means we don't install dbus, which broke some tests
in minimal containers where dbus wasn't already installed, because the
messagebus user wouldn't have been created. Make sure that user exists,
using the same adduser call as the Debian dbus package.

CMake really wants to find a C++ compiler (even though we only use C++
when compiling for Windows), so explicitly install the default
version of the GNU C++ compiler, g++.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-12-05 14:54:24 +00:00
Simon McVittie
a59eb6e944 Merge branch 'unpythonize' into 'master'
Translate Python-based tests to C

See merge request dbus/dbus!37

Reviewed-by: pwithnall
2018-12-05 14:09:00 +00:00
Simon McVittie
bcc34caa43 CI: Exercise maintainer-only documentation build
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-12-04 11:48:53 +00:00
Simon McVittie
0c553afcd9 CI: Stop building on Ubuntu 14.04 'trusty'
The version of gcc in trusty is too old for AddressSanitizer, which we
want to be able to start using, and Travis-CI finally supports Ubuntu
16.04 'xenial' now. This lets us remove some workarounds, but we need
to update others.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-12-03 20:00:32 +00:00
Simon McVittie
1191262f5e Translate Python-based tests to C
This simplifies bootstrapping: now you don't have to build dbus,
build dbus-python (with GLib), and use dbus-python to test dbus.

It also avoids test failures when using facilities like
AddressSanitizer. When libdbus is built with AddressSanitizer, but the
system copies of Python and dbus-python were not, dbus-python will exit
the Python interpreter on load, because libasan wasn't already
initialized. The simplest way to avoid this is to not use Python:
the scripts are not *that* hard to translate into C.

Both of these tests happen to be conditionally compiled for Unix only.
test_activation_forking() relies on code in TestSuiteForkingEchoService
that calls fork(), which can only work on Unix; meanwhile,
test_system_signals() tests the system bus configuration, which is
only relevant to Unix because we don't support using dbus-daemon as
a privilege boundary on Windows (and in any case D-Bus is not a Windows
OS feature, so the system bus cannot be used to communicate with OS
services like it can on most Linux systems).

This is also a partial solution to
<https://gitlab.freedesktop.org/dbus/dbus/issues/135>, by reducing the
size of name-test/.

For this to work, we need to build the test-service helper executable
even if embedded tests are disabled.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-12-03 17:42:48 +00:00
Ralf Habacker
0764f08e7e Fix broken meinproc4 based docbook generating by already used xsltproc
Using xsltproc helps to reduce manual editing of xml doc and avoids
cyclic dependency (kdelibs depends on dbus and dbus depends on kdelibs).
It is available on all platforms (in the opposite to xmlto) and supports
freedesktop CI out of the box.

This commit adds docbook-xml and docbook-xsl as new dependency for cmake
and removes obsolate xmlto support, which depends on xsltproc.
2018-11-20 15:56:12 +01:00
Simon McVittie
d0728fd06e ci: Use ccache to speed up repeated builds
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-10-04 10:50:37 +01:00
Simon McVittie
408b222a9f ci: Teach ci-install.sh to install wine on Debian 9 'stretch'
Signed-off-by: Simon McVittie <smcv@collabora.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=108177
Acked-by: Philip Withnall <withnall@endlessm.com>
2018-10-04 10:21:29 +01:00
Simon McVittie
907832e008 ci: Explicitly install cmake
Travis-CI workers have cmake preinstalled, but Gitlab-CI Docker images
typically don't.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=108177
Acked-by: Philip Withnall <withnall@endlessm.com>
2018-10-04 10:21:25 +01:00
Ralf Habacker
d22e7901b5 travis-ci: Add cross building support for mingw 64 bit compiler
Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de>
Reviewed-by: Simon McVittie <smcv@collabora.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=105662
2018-03-22 21:13:47 +01:00
Simon McVittie
acb775a92b travis-ci: Get autoconf-archive from Debian 9 'stretch'
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-01-29 11:55:17 +00:00
Simon McVittie
9935a5b7d1 Travis-CI: Get new autoconf-archive from Ubuntu
Hopefully this has better uptime than snapshot.debian.org, which is
really an archival service rather than a production component.

This particular autoconf-archive version was in Ubuntu 16.10, so it
should stay around for a while.

Signed-off-by: Simon McVittie <smcv@debian.org>
2017-02-14 08:58:26 +00:00
Simon McVittie
ab1973ed15 ci-install, ci-build: add brief documentation for parameter variables
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889
2016-11-29 13:05:14 +00:00
Simon McVittie
e7c048f36a ci-install.sh: make ci_in_docker follow the yes/no convention too
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889
2016-11-29 12:47:49 +00:00
Simon McVittie
367526aff6 travis-ci: Add and use infrastructure to build and test in Docker
Debian stable, Debian testing and Ubuntu LTS provide a reasonable
spectrum of old and new distributions. I'm only doing one build on
each to avoid a combinatorial explosion of options.

The Docker images don't have any deb-src apt sources set up, so don't
use `apt-get build-dep`; just include dependencies manually.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889
2016-11-29 12:37:48 +00:00
Simon McVittie
c807f383a9 travis-ci: add an install script instead of open-coding it in .travis.yml
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
[smcv: move comment to install script as suggested]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98889
2016-11-29 12:37:27 +00:00