[PATCH libinput 2/2] Add support for CircleCI

Peter Hutterer peter.hutterer at who-t.net
Fri Jul 7 01:54:55 UTC 2017


This isn't currently hooked up to the fdo repo but it's hooked up to my
github mirror. I had SemaphoreCI hooked up to that before but it only
supports ubuntu 14.04 and the recent meson switch made it a bit hard to setup.

CircleCI supports running docker containers, so let's do that and run against
the most recent released Fedora and a recent Ubuntu. I'm not bothering with
rawhide, it's likely to increase the work for little gain when it's in a
semi-broken state.

Run the default build with a few permutations to test meson options. Run
scan-build too but that's just for the logs, eventually this may turn into a
hard failure.

Ubuntu 17.04's meson is too old, so we have to clone that from git. Install
arguments are taken from the meson.deb package.

Most of this effort was done by Benjamin Tissoires.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Cc: Benjamin Tissoires <benjamin.tissoires at gmail.com>
---
 circle.yml | 151 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 151 insertions(+)
 create mode 100644 circle.yml

diff --git a/circle.yml b/circle.yml
new file mode 100644
index 00000000..7ecbaf63
--- /dev/null
+++ b/circle.yml
@@ -0,0 +1,151 @@
+# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0:
+
+libinput_jobs:
+  default_settings: &default_settings
+    working_directory: ~/libinput
+  # Define a couple of standardized build targets
+  # that we call from every build container
+  build_and_test_default: &build_and_test_default
+    name: Build
+    command: |
+      rm -rf build
+      meson build ${MESON_PARAMS}
+      mesonconf build
+      ninja -v -C build ${NINJA_ARGS}
+    environment:
+      MESON_PARAMS: --prefix=/opt/libinput
+  build_and_test: &build_and_test
+    run:
+      <<: *build_and_test_default
+  build_no_libwacom: &build_no_libwacom
+    run:
+      <<: *build_and_test_default
+      name: Build - No libwacom
+      environment:
+        MESON_PARAMS: -Dlibwacom=false
+  build_no_debug_gui: &build_no_debug_gui
+    run:
+      <<: *build_and_test_default
+      name: Build - No debug-gui
+      environment:
+        MESON_PARAMS: -Ddebug-gui=false
+  build_no_tests: &build_no_tests
+    run:
+      <<: *build_and_test_default
+      name: Build - No tests
+      environment:
+        MESON_PARAMS: -Dtests=false
+  build_no_docs: &build_no_docs
+    run:
+      <<: *build_and_test_default
+      name: Build - No docs
+      environment:
+        MESON_PARAMS: -Ddocumentation=false
+  ninja_scan_build: &ninja_scan_build
+    run:
+      <<: *build_and_test_default
+      name: Ninja scan-build
+      environment:
+        NINJA_ARGS: scan-build
+  install: &install
+    run:
+      name: Installing
+      command: ninja -v -C build install
+  export_logs: &export_logs
+    store_artifacts:
+      path: ~/libinput/build/meson-logs
+
+# Ubuntu's meson is too old, these instructions are
+# meson-specific
+meson_from_git: &meson_from_git
+  run:
+    name: Install meson from git
+    environment:
+      MESON_VERSION: 0.41.0
+    command: |
+      git clone https://github.com/mesonbuild/meson
+      pushd meson
+      git checkout -f ${MESON_VERSION}
+      python3 ./setup.py install --prefix=/usr --install-layout=deb --install-lib=/usr/share/meson --install-scripts=/usr/share/meson
+      popd
+      rm -rf meson
+
+fedora_install: &fedora_install
+  run:
+    name: Install prerequisites
+    command: |
+      dnf install -y git gcc gcc-c++ meson check-devel libudev-devel libevdev-devel doxygen graphviz valgrind binutils libwacom-devel cairo-devel gtk3-devel glib2-devel mtdev-devel
+
+fedora_build_all: &fedora_build_all
+  <<: *default_settings
+  steps:
+    - *fedora_install
+    - checkout
+    - *build_and_test
+    - *install
+    - *export_logs
+    - *build_no_libwacom
+    - *build_no_debug_gui
+    - *build_no_tests
+    - *build_no_docs
+
+ubuntu_install: &ubuntu_install
+  run:
+    name: Install prerequisites
+    command: |
+      apt-get update
+      apt-get install -y software-properties-common
+      add-apt-repository universe
+      apt-get update
+      apt-get install -y git gcc g++ meson check libudev-dev libevdev-dev doxygen graphviz valgrind binutils libwacom-dev libcairo2-dev libgtk-3-dev libglib2.0-dev libmtdev-dev
+
+ubuntu_build_all: &ubuntu_build_all
+  <<: *default_settings
+  steps:
+    - *ubuntu_install
+    - *meson_from_git # meson version not recent enough
+    - checkout
+    - *build_and_test
+    - *install
+    - *export_logs
+    - *build_no_libwacom
+    - *build_no_debug_gui
+    - *build_no_tests
+    - *build_no_docs
+
+scan_build_run: &scan_build_run
+  <<: *default_settings
+  steps:
+    - *fedora_install
+    - run:
+        name: Install clang and find
+        command: dnf install -y clang-analyzer findutils
+    - checkout
+    - *ninja_scan_build
+    - *export_logs
+    - run:
+        name: Check scan-build results
+        command: test ! -d ~/libinput/build/meson-logs/scanbuild || test $(find ~/libinput/build/meson-logs/scanbuild -maxdepth 0 ! -empty -exec echo "not empty" \; | wc -l) -eq 0 || (echo "Check scan-build results" && false)
+
+version: 2
+jobs:
+  fedora_latest:
+    <<: *fedora_build_all
+    docker:
+      - image: fedora:latest
+  ubuntu_17_04:
+    <<: *ubuntu_build_all
+    docker:
+      - image: ubuntu:zesty
+  scan_build:
+    <<: *scan_build_run
+    docker:
+      - image: fedora:latest
+
+workflows:
+  version: 2
+  compile:
+    jobs:
+      - fedora_latest
+      - scan_build
+      - ubuntu_17_04
-- 
2.13.0



More information about the wayland-devel mailing list