aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2021-08-05 21:39:23 +0200
committerRobert Tari <robert@tari.in>2021-08-05 21:39:23 +0200
commitdf123b1e072fe51073ecd53ac9454e3980a96042 (patch)
tree583c620d4434b060158e3ca2b0c850e2b9e8e1b0
parentf3e62f2116b7f476ba834d220b9c05eb64f08c68 (diff)
parent0fd84df69e24d5509ae1cb4af51d0b274ce7e57b (diff)
downloadayatana-indicator-sound-df123b1e072fe51073ecd53ac9454e3980a96042.tar.gz
ayatana-indicator-sound-df123b1e072fe51073ecd53ac9454e3980a96042.tar.bz2
ayatana-indicator-sound-df123b1e072fe51073ecd53ac9454e3980a96042.zip
Merge branch 'sunweaver-pr/travis-ci'
Attributes GH PR #19: https://github.com/AyatanaIndicators/ayatana-indicator-sound/pull/19
-rw-r--r--.build.yml234
-rw-r--r--.travis.yml43
-rwxr-xr-xdebian/rules1
-rw-r--r--tests/CMakeLists.txt8
-rw-r--r--tests/integration/CMakeLists.txt1
5 files changed, 286 insertions, 1 deletions
diff --git a/.build.yml b/.build.yml
new file mode 100644
index 0000000..1ca40ca
--- /dev/null
+++ b/.build.yml
@@ -0,0 +1,234 @@
+#########################################################
+# THE FOLLOWING LINES IS USED BY docker-build
+##########################################################
+requires:
+ archlinux:
+ # Useful URL: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ayatana-indicator-sound
+ - clang
+ - gcc
+ - git
+ - make
+ - startup-notification
+ - which
+ - cmake
+ - cmake-extras
+ - mate-common
+ - dbus
+ - accountsservice
+ - gsettings-desktop-schemas
+ - intltool
+ - vala
+ - glib2
+ - libpulse
+ - libnotify
+ - libgee
+ - libxml2
+ - pulseaudio
+ - qt5-base
+ - qt5-declarative
+ - systemd
+ - gobject-introspection
+
+ debian:
+ # Useful URL: https://salsa.debian.org/debian-ayatana-team/ayatana-indicator-sound
+ - autopoint
+ - clang
+ - clang-tools
+ - g++
+ - cppcheck
+ - git
+ - cmake
+ - cmake-extras
+ - mate-common
+ - dbus
+ - gir1.2-accountsservice-1.0
+ - intltool
+ - valac
+ - libaccountsservice-dev
+ - libgirepository1.0-dev
+ - libglib2.0-dev
+ - liblomiri-api-dev
+ - liblomiri-url-dispatcher-dev
+ - libpulse-dev
+ - libpulse-mainloop-glib0
+ - libnotify-dev
+ - libgee-0.8-dev
+ - libxml2-dev
+ - pulseaudio
+ - qtbase5-dev
+ - qtbase5-dev-tools
+ - qtdeclarative5-dev
+ - qtdeclarative5-dev-tools
+ - systemd
+ - dbus-test-runner
+ - libgtest-dev
+ - libdbustest1-dev
+ - libqtdbusmock1-dev
+ - libqtdbustest1-dev
+ - python3-dbusmock
+
+ debian:stable:
+ - autopoint
+ - clang
+ - clang-tools
+ - g++
+ - cppcheck
+ - git
+ - cmake
+ - cmake-extras
+ - mate-common
+ - dbus
+ - gir1.2-accountsservice-1.0
+ - intltool
+ - valac
+ - libaccountsservice-dev
+ - libgirepository1.0-dev
+ - libglib2.0-dev
+ - libpulse-dev
+ - libpulse-mainloop-glib0
+ - libnotify-dev
+ - libgee-0.8-dev
+ - libxml2-dev
+ - pulseaudio
+ - qtbase5-dev
+ - qtbase5-dev-tools
+ - qtdeclarative5-dev
+ - qtdeclarative5-dev-tools
+ - systemd
+ - dbus-test-runner
+ - libgtest-dev
+ - libdbustest1-dev
+ - libqtdbusmock1-dev
+ - libqtdbustest1-dev
+ - python3-dbusmock
+
+ ubuntu:
+ - autopoint
+ - clang
+ - clang-tools
+ - g++
+ - git
+ - cmake
+ - cmake-extras
+ - mate-common
+ - dbus
+ - gir1.2-accountsservice-1.0
+ - intltool
+ - valac
+ - libaccountsservice-dev
+ - libgirepository1.0-dev
+ - libglib2.0-dev
+ - liblomiri-api-dev
+ - liblomiri-url-dispatcher-dev
+ - libpulse-dev
+ - libpulse-mainloop-glib0
+ - libnotify-dev
+ - libgee-0.8-dev
+ - libxml2-dev
+ - pulseaudio
+ - qtbase5-dev
+ - qtbase5-dev-tools
+ - qtdeclarative5-dev
+ - qtdeclarative5-dev-tools
+ - systemd
+
+ ubuntu:focal:
+ - autopoint
+ - clang
+ - clang-tools
+ - g++
+ - git
+ - cmake
+ - cmake-extras
+ - mate-common
+ - dbus
+ - gir1.2-accountsservice-1.0
+ - intltool
+ - valac
+ - libaccountsservice-dev
+ - libgirepository1.0-dev
+ - libglib2.0-dev
+ - libpulse-dev
+ - libpulse-mainloop-glib0
+ - libnotify-dev
+ - libgee-0.8-dev
+ - libxml2-dev
+ - pulseaudio
+ - qtbase5-dev
+ - qtbase5-dev-tools
+ - qtdeclarative5-dev
+ - qtdeclarative5-dev-tools
+ - systemd
+
+variables:
+ - 'CHECKERS="
+ -enable-checker deadcode.DeadStores
+ -enable-checker alpha.deadcode.UnreachableCode
+ -enable-checker alpha.core.CastSize
+ -enable-checker alpha.core.CastToStruct
+ -enable-checker alpha.core.IdenticalExpr
+ -enable-checker alpha.core.SizeofPtr
+ -enable-checker alpha.security.ArrayBoundV2
+ -enable-checker alpha.security.MallocOverflow
+ -enable-checker alpha.security.ReturnPtrRange
+ -enable-checker alpha.unix.SimpleStream
+ -enable-checker alpha.unix.cstring.BufferOverlap
+ -enable-checker alpha.unix.cstring.NotNullTerminated
+ -enable-checker alpha.unix.cstring.OutOfBounds
+ -enable-checker alpha.core.FixedAddr
+ -enable-checker security.insecureAPI.strcpy"'
+
+before_scripts:
+ - cd ${START_DIR}
+ - if [ ! -d libayatana-common-build ]; then
+ - git clone --depth 1 https://github.com/AyatanaIndicators/libayatana-common.git libayatana-common-build
+ - fi
+ - cd libayatana-common-build
+ - cmake . -DCMAKE_INSTALL_PREFIX=/usr
+ - make
+ - make install
+
+build_scripts:
+ - if [ ${DISTRO_NAME} == "debian" ];then
+ - export CFLAGS+=" -Wsign-compare -Wunused-parameter"
+ - 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
+ - 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
+ - make clean
+ - fi
+ - scan-build $CHECKERS --keep-cc -o html-report make -j $CPU_COUNT
+ - else
+ - if [ ${DISTRO_NAME} == "debian" ];then
+ - scan-build $CHECKERS --keep-cc --use-cc=clang --use-c++=clang++ -o html-report make
+ - make clean
+ - fi
+ - scan-build $CHECKERS --keep-cc -o html-report make
+ - 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
+# - ${XVFB_RUN} env CTEST_OUTPUT_ON_FAILURE=1 make test
+# - fi
+# - fi
+# - fi
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..5382638
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,43 @@
+# vim: set ts=2 sts=2 sw=2 expandtab :
+dist: bionic
+language: shell
+os: linux
+
+arch:
+ - amd64
+ - ppc64le
+
+services:
+ - docker
+
+addons:
+ apt:
+ packages:
+ - python3-pip
+ - python3-setuptools
+
+before_install:
+ # let's use the MATE project's docker build script...
+ - curl -Ls -o docker-build https://github.com/AyatanaIndicators/ayatana-dev-scripts/raw/master/travis/docker-build
+ - chmod +x docker-build
+
+install:
+ - pip3 install wheel
+ - pip3 install PyGithub
+ - ./docker-build --name ${DISTRO} --config .build.yml --install
+
+script:
+ - ./docker-build --name ${DISTRO} --verbose --config .build.yml --build scripts
+
+env:
+# temp disable of archlinux builds, see https://gitlab.archlinux.org/archlinux/archlinux-docker/-/issues/56
+# - DISTRO="archlinux:latest"
+ - DISTRO="debian:testing"
+ - DISTRO="debian:stable"
+# - DISTRO="ubuntu:rolling"
+ - DISTRO="ubuntu:focal"
+
+jobs:
+ exclude:
+ - env: DISTRO="archlinux:latest"
+ arch: ppc64le
diff --git a/debian/rules b/debian/rules
index 5a01b3c..593fdf0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,7 +11,6 @@ override_dh_auto_configure:
# Debian defines CMAKE_INSTALL_LOCALSTATEDIR as /usr/var, which is wrong.
# So until Debian bug 719148 is fixed, do it ourselves.
dh_auto_configure -- -DCMAKE_INSTALL_LOCALSTATEDIR="/var" \
- -Denable_tests=off \
$(NULL)
override_dh_install:
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index bbb5b84..278da0e 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -165,6 +165,7 @@ target_link_libraries (pulse-mock ${PULSEAUDIO_LIBRARIES})
include_directories(${CMAKE_SOURCE_DIR}/src)
add_executable (name-watch-test name-watch-test.cc ${CMAKE_SOURCE_DIR}/src/bus-watch-namespace.c)
+target_link_options (name-watch-test PRIVATE -no-pie)
target_link_libraries (name-watch-test ${SOUNDSERVICE_LIBRARIES} ${GMOCK_LIBRARIES})
add_test(name-watch-test name-watch-test)
@@ -174,6 +175,7 @@ add_test(name-watch-test name-watch-test)
include_directories(${CMAKE_SOURCE_DIR}/src)
add_executable (accounts-service-user-test accounts-service-user.cc)
+target_link_options (accounts-service-user-test PRIVATE -no-pie)
target_link_libraries (
accounts-service-user-test
indicator-sound-service-lib
@@ -199,6 +201,7 @@ add_test(accounts-service-user-test-player
include_directories(${CMAKE_SOURCE_DIR}/src)
add_executable (volume-control-test volume-control-test.cc)
add_dependencies (volume-control-test gschemas-compiled)
+target_link_options (volume-control-test PRIVATE -no-pie)
target_link_libraries (
volume-control-test
indicator-sound-service-lib
@@ -216,6 +219,7 @@ add_test(volume-control-test volume-control-test)
include_directories(${CMAKE_SOURCE_DIR}/src)
add_executable (sound-menu-test sound-menu.cc)
+target_link_options (sound-menu-test PRIVATE -no-pie)
target_link_libraries (
sound-menu-test
indicator-sound-service-lib
@@ -233,6 +237,7 @@ add_test(sound-menu-test sound-menu-test)
include_directories(${CMAKE_SOURCE_DIR}/src)
add_executable (notifications-test notifications-test.cc)
+target_link_options (notifications-test PRIVATE -no-pie)
target_link_libraries (
notifications-test
indicator-sound-service-lib
@@ -251,6 +256,7 @@ add_test(notifications-test notifications-test)
include_directories(${CMAKE_SOURCE_DIR}/src)
add_executable (media-player-user-test media-player-user.cc)
+target_link_options (media-player-user-test PRIVATE -no-pie)
target_link_libraries (
media-player-user-test
indicator-sound-service-lib
@@ -277,6 +283,7 @@ add_test(media-player-user-test-timeout
include_directories(${CMAKE_SOURCE_DIR}/src)
add_executable (greeter-list-test greeter-list.cc)
+target_link_options (greeter-list-test PRIVATE -no-pie)
target_link_libraries (
greeter-list-test
indicator-sound-service-lib
@@ -304,6 +311,7 @@ add_definitions(
)
add_executable (indicator-test indicator-test.cc)
add_dependencies (indicator-test gschemas-compiled)
+target_link_options (indicator-test PRIVATE -no-pie)
target_link_libraries (
indicator-test
${SOUNDSERVICE_LIBRARIES}
diff --git a/tests/integration/CMakeLists.txt b/tests/integration/CMakeLists.txt
index 20b311b..74b9c23 100644
--- a/tests/integration/CMakeLists.txt
+++ b/tests/integration/CMakeLists.txt
@@ -75,6 +75,7 @@ qt5_use_modules(
Test
)
+target_link_options (integration-tests PRIVATE -no-pie)
target_link_libraries(
integration-tests
sound-indicator-dbus-interfaces