aboutsummaryrefslogtreecommitdiff
path: root/.build.yml
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2021-05-06 14:16:45 +0200
committerRobert Tari <robert@tari.in>2021-05-06 14:16:45 +0200
commitaa6723b9cc3dcac5b9bdd87944a8c99b74f16ba2 (patch)
tree99a28d818649b24b90d39056832d568742d5d23f /.build.yml
parentd68a7de3d6b359db7b1673108cb2aec6edb6afd5 (diff)
parentbc6886f1c9021f167fc44a8f125059a8416e9b84 (diff)
downloadlibayatana-indicator-aa6723b9cc3dcac5b9bdd87944a8c99b74f16ba2.tar.gz
libayatana-indicator-aa6723b9cc3dcac5b9bdd87944a8c99b74f16ba2.tar.bz2
libayatana-indicator-aa6723b9cc3dcac5b9bdd87944a8c99b74f16ba2.zip
Merge branch 'sunweaver-pr/travis-ci-with-cmake-support'
Attributes GH PR #43: https://github.com/AyatanaIndicators/libayatana-indicator/pull/43
Diffstat (limited to '.build.yml')
-rw-r--r--.build.yml26
1 files changed, 21 insertions, 5 deletions
diff --git a/.build.yml b/.build.yml
index b1ed56d..261f72e 100644
--- a/.build.yml
+++ b/.build.yml
@@ -103,9 +103,20 @@ build_scripts:
- export CFLAGS+=" -Wsign-compare -Wunused-parameter"
- cppcheck --enable=warning,style,performance,portability,information,missingInclude .
- fi
-
- - NOCONFIGURE=1 ./autogen.sh
- - scan-build $CHECKERS ./configure --prefix=/usr --enable-gtk-doc --enable-compile-warnings=maximum --enable-tests
+ -
+ - if [ -e ./autogen.sh ]; then
+ - NOCONFIGURE=1 ./autogen.sh
+ - scan-build $CHECKERS ./configure --prefix=/usr --enable-gtk-doc --enable-compile-warnings=maximum
+ - elif [ -e ./CMakeLists.txt ]; then
+ - if [ ${DISTRO_NAME} == "debian" ];then
+ - scan-build $CHECKERS cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTS=ON
+ - else
+ - scan-build $CHECKERS cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON
+ - fi
+ - else
+ - exit 1
+ - fi
+ -
- if [ $CPU_COUNT -gt 1 ]; then
- if [ ${DISTRO_NAME} == "debian" ];then
- scan-build $CHECKERS --keep-cc --use-cc=clang --use-c++=clang++ -o html-report make -j $CPU_COUNT
@@ -122,8 +133,13 @@ build_scripts:
after_scripts:
- if [ ${BUILD_TYPE} == "scripts" ];then
+ - XVFB_RUN="$(which xvfb-run || true)"
- if [ ${DISTRO_NAME} == "debian" ];then
- - make check
- - cat tests/test-suite.log
+ - if [ -e ./autogen.sh ]; then
+ - ${XVFB_RUN} make check
+ - cat tests/test-suite.log
+ - elif [ -e ./CMakeLists.txt ]; then
+ - ${XVFB_RUN} env CTEST_OUTPUT_ON_FAILURE=1 make test
+ - fi
- fi
- fi