ci: add back target to do out-of-tree test build
authorMike Blumenkrantz <zmike@samsung.com>
Thu, 19 Sep 2019 13:28:57 +0000 (09:28 -0400)
committerJongmin Lee <jm105.lee@samsung.com>
Mon, 23 Sep 2019 21:32:19 +0000 (06:32 +0900)
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

.ci/build-example.sh [new file with mode: 0755]
.ci/ci-build-test.sh [new file with mode: 0755]
.ci/example/meson.build [new file with mode: 0644]
.ci/example/src/main.c [new file with mode: 0644]
.ci/example/src/meson.build [new file with mode: 0644]
.travis.yml

diff --git a/.ci/build-example.sh b/.ci/build-example.sh
new file mode 100755 (executable)
index 0000000..0e1a16b
--- /dev/null
@@ -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
+
diff --git a/.ci/ci-build-test.sh b/.ci/ci-build-test.sh
new file mode 100755 (executable)
index 0000000..67b39de
--- /dev/null
@@ -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
diff --git a/.ci/example/meson.build b/.ci/example/meson.build
new file mode 100644 (file)
index 0000000..b3d698a
--- /dev/null
@@ -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')
+
diff --git a/.ci/example/src/main.c b/.ci/example/src/main.c
new file mode 100644 (file)
index 0000000..1d1230e
--- /dev/null
@@ -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()
diff --git a/.ci/example/src/meson.build b/.ci/example/src/meson.build
new file mode 100644 (file)
index 0000000..47673e9
--- /dev/null
@@ -0,0 +1,12 @@
+src = files([
+  'main.c',
+])
+
+deps = [eina, efl, elm]
+
+executable('efl_example', src,
+  dependencies : deps,
+  include_directories : inc,
+  install : true
+)
+
index 9af193a..08c9fc2 100644 (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
   - |