diff --git a/contrib/ci/arch.sh b/contrib/ci/arch.sh index 1a10c62f4..7842a2d2b 100755 --- a/contrib/ci/arch.sh +++ b/contrib/ci/arch.sh @@ -37,6 +37,10 @@ pacman -Syu --noconfirm qt5-base meson qt5-thread-test ../contrib/ci/qt5-thread-test ninja -C qt5-thread-test test +#run the CI tests for making sure we can link fwupd/fwupdplugin +meson out-of-tree-link ../contrib/ci/out-of-tree-link +ninja -C out-of-tree-link test + # move the package to working dir mv *.pkg.* ../dist diff --git a/contrib/ci/out-of-tree-link/.gitignore b/contrib/ci/out-of-tree-link/.gitignore new file mode 100644 index 000000000..378eac25d --- /dev/null +++ b/contrib/ci/out-of-tree-link/.gitignore @@ -0,0 +1 @@ +build diff --git a/contrib/ci/out-of-tree-link/fwupd.c b/contrib/ci/out-of-tree-link/fwupd.c new file mode 100644 index 000000000..5d73f3c26 --- /dev/null +++ b/contrib/ci/out-of-tree-link/fwupd.c @@ -0,0 +1,10 @@ +#undef NDEBUG +#include + +#include + +int main (void) +{ + assert (fwupd_error_to_string (FWUPD_ERROR_NOTHING_TO_DO) != NULL); + return 0; +} diff --git a/contrib/ci/out-of-tree-link/fwupdplugin.c b/contrib/ci/out-of-tree-link/fwupdplugin.c new file mode 100644 index 000000000..30d1423ca --- /dev/null +++ b/contrib/ci/out-of-tree-link/fwupdplugin.c @@ -0,0 +1,10 @@ +#undef NDEBUG +#include + +#include + +int main (void) +{ + assert (fu_common_vercmp_full ("1.0", "2.1", FWUPD_VERSION_FORMAT_NUMBER) < 0); + return 0; +} diff --git a/contrib/ci/out-of-tree-link/meson.build b/contrib/ci/out-of-tree-link/meson.build new file mode 100644 index 000000000..88822b76c --- /dev/null +++ b/contrib/ci/out-of-tree-link/meson.build @@ -0,0 +1,27 @@ + project('out-of-tree-link', 'c', + license : 'LGPL-2.1+', +) +fwupd = dependency('fwupd') +fwupdplugin = dependency('fwupdplugin') +env = environment() +env.set('G_DEBUG', 'fatal-criticals') +e = executable( + 'fwupd', + sources : [ + 'fwupd.c' + ], + dependencies : [ + fwupd + ], + ) +test('fwupd', e, timeout: 60, env: env) +e = executable( + 'fwupdplugin', + sources : [ + 'fwupdplugin.c' + ], + dependencies : [ + fwupdplugin + ], + ) +test('fwupdplugin', e, timeout: 60, env: env)