From 91bddd96cf1f8d7975b1cb3b160b89c7f4a53af7 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 23 Oct 2021 03:12:48 +0200 Subject: .build.yml: Drop autogen.sh support; add GTK+-2.0 build and test support; also run unit tests on Ubuntu. --- .build.yml | 61 +++++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 49 insertions(+), 12 deletions(-) (limited to '.build.yml') diff --git a/.build.yml b/.build.yml index ad5776d..d92bbc3 100644 --- a/.build.yml +++ b/.build.yml @@ -120,9 +120,18 @@ before_scripts: - git clone --depth 1 https://github.com/AyatanaIndicators/libayatana-indicator.git libayatana-indicator-build - fi - cd libayatana-indicator-build - - cmake . -DCMAKE_INSTALL_PREFIX=/usr + - mkdir -p build/gtk3 + - cd build/gtk3 + - cmake ../../ -DCMAKE_INSTALL_PREFIX=/usr -DFLAVOUR_GTK3=ON + - make + - make install + - cd - + - mkdir -p build/gtk2 + - cd build/gtk2 + - cmake ../../ -DCMAKE_INSTALL_PREFIX=/usr -DFLAVOUR_GTK2=ON - make - make install + - cd - build_scripts: - if [ ${DISTRO_NAME} == "debian" ];then @@ -130,41 +139,69 @@ build_scripts: - cppcheck --enable=warning,style,performance,portability,information,missingInclude . - fi - - - 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 + - if [ -e ./CMakeLists.txt ]; then + - mkdir -p build/gtk3/ + - cd build/gtk3/ + - if [ ${DISTRO_NAME} == "debian" ] && [ ${DISTRO_NAME} == "ubuntu" ]; then + - scan-build $CHECKERS cmake ../../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTS=ON -DFLAOUR_GTK3=ON - else - - scan-build $CHECKERS cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON + - scan-build $CHECKERS cmake ../../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DFLAOUR_GTK3=ON - fi + - cd - + - mkdir -p build/gtk2/ + - cd build/gtk2/ + - if [ ${DISTRO_NAME} == "debian" ] && [ ${DISTRO_NAME} == "ubuntu" ]; then + - scan-build $CHECKERS cmake ../../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTS=ON -DFLAOUR_GTK2=ON + - else + - scan-build $CHECKERS cmake ../../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DFLAOUR_GTK2=ON + - fi + - cd - - else - exit 1 - fi - - if [ $CPU_COUNT -gt 1 ]; then - if [ ${DISTRO_NAME} == "debian" ];then + - cd build/gtk3/ - scan-build $CHECKERS --keep-cc --use-cc=clang --use-c++=clang++ -o html-report make -j $CPU_COUNT - make clean + - cd - + - cd build/gtk2/ + - scan-build $CHECKERS --keep-cc --use-cc=clang --use-c++=clang++ -o html-report make -j $CPU_COUNT + - make clean + - cd - - fi - scan-build $CHECKERS --keep-cc -o html-report make -j $CPU_COUNT - else - if [ ${DISTRO_NAME} == "debian" ];then + - cd build/gtk3/ + - scan-build $CHECKERS --keep-cc --use-cc=clang --use-c++=clang++ -o html-report make + - make clean + - cd - + - cd build/gtk2/ - scan-build $CHECKERS --keep-cc --use-cc=clang --use-c++=clang++ -o html-report make - make clean + - cd - - fi + - cd build/gtk3/ - scan-build $CHECKERS --keep-cc -o html-report make + - cd - + - cd build/gtk2/ + - scan-build $CHECKERS --keep-cc -o html-report make + - cd - - fi after_scripts: - if [ ${BUILD_TYPE} == "scripts" ];then - XVFB_RUN="$(which xvfb-run || true)" - - if [ ${DISTRO_NAME} == "debian" ];then - - if [ -e ./autogen.sh ]; then - - ${XVFB_RUN} make check - - elif [ -e ./CMakeLists.txt ]; then + - if [ ${DISTRO_NAME} == "debian" ] && [ ${DISTRO_NAME} == "ubuntu" ]; then + - if [ -e ./CMakeLists.txt ]; then + - cd build/gtk3/ + - ${XVFB_RUN} env CTEST_OUTPUT_ON_FAILURE=1 make test + - cd - + - cd build/gtk2/ - ${XVFB_RUN} env CTEST_OUTPUT_ON_FAILURE=1 make test + - cd - - fi - fi - fi -- cgit v1.2.3