ci: add back target to do out-of-tree test build

this is necessary in order to ensure that our headers are usable

ref T8228

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D10036
This commit is contained in:
Mike Blumenkrantz 2019-09-19 09:28:57 -04:00 committed by Stefan Schmidt
parent 98c2a75bda
commit 8b2cae5b07
6 changed files with 78 additions and 7 deletions

16
.ci/build-example.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
set -e
if [ -d /usr/local/lib64 ] ; then
export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
else
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
fi
cd .ci/example
#build the example
mkdir build
meson . build
ninja -C build all

23
.ci/ci-build-test.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/sh
set -e
. .ci/travis.sh
travis_fold compile_test compile_test
if [ "$DISTRO" != "" ] ; then
if [ "$1" = "coverity" ] ; then
exit 0
fi
if [ "$1" = "mingw" ] ; then
exit 0
fi
if [ "$1" = "release-ready" ] ; then
exit 0
fi
docker exec --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) .ci/build-example.sh
else
exit 0
#FIXME: we don't install efl_ui.pc on osx?
export PATH="$(brew --prefix gettext)/bin:$PATH"
.ci/build-example.sh
fi
travis_endfold compile_test

13
.ci/example/meson.build Normal file
View File

@ -0,0 +1,13 @@
project(
'efl-example', 'c',
version : '0.0.1',
default_options: [ 'c_std=gnu99', 'warning_level=2' ],
meson_version : '>= 0.38.0')
eina = dependency('eina', version : '>=1.20.99')
efl = dependency('efl-ui', version : '>=1.20.99')
elm = dependency('elementary', version : '>=1.20.99')
inc = include_directories('.')
subdir('src')

11
.ci/example/src/main.c Normal file
View File

@ -0,0 +1,11 @@
#define EFL_BETA_API_SUPPORT 1
#define EFL_NOLEGACY_API_SUPPORT
#include <Efl_Ui.h>
EAPI_MAIN void
efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
{
return 0;
}
EFL_MAIN()

View File

@ -0,0 +1,12 @@
src = files([
'main.c',
])
deps = [eina, efl, elm]
executable('efl_example', src,
dependencies : deps,
include_directories : inc,
install : true
)

View File

@ -103,15 +103,11 @@ script:
if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$CI_BUILD_TYPE" == "" ]]; then
.ci/ci-make-benchmark.sh "$CI_BUILD_TYPE"
fi
#- .ci/ci-make-install.sh "$CI_BUILD_TYPE"
- .ci/ci-make-install.sh "$CI_BUILD_TYPE"
- .ci/ci-make-check.sh "$CI_BUILD_TYPE"
- .ci/ci-make-distcheck.sh "$CI_BUILD_TYPE"
#- |
#if [[ "$DISTRO" == "" ]] && [[ "$TRAVIS_OS_NAME" != "linux" ]] ; then
#true
#elif [[ "$CI_BUILD_TYPE" != "release-ready" ]] ; then
#docker exec --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) .ci/build-efl-app.sh
#fi
- |
- .ci/ci-build-test.sh "$CI_BUILD_TYPE"
before_cache:
- .ci/ci-ccache-stats.sh
- |