diff options
author | Dan R Beste <drb@wishalloy.com> | 2020-04-26 14:42:55 -0500 |
---|---|---|
committer | Dan R Beste <drb@wishalloy.com> | 2020-04-26 17:10:37 -0500 |
commit | 8320ae43b11ab92bc68c0acfb755b9b65b6c261a (patch) | |
tree | 046a1dfb0667236a713ebf32f874927860a8f1bc | |
parent | 9a3d4b1d2ecbc0746c49ca7d822a17e8a5c44f44 (diff) |
fix: Fix Travis CI builds and (some) tests
https://config.travis-ci.com/explore recommendations:
* Set the `os` key
* Removes the `sudo` key
Fixes:
* Missing dependencies
Cleanups:
* Set `build_command_prepend` and `build_command` to match the process
performed by the before_script and script.
* Removed unnecessary apt package dependencies.
* Ran the file through prettier (https://prettier.io/).
Enhancements:
* Bumps dist to Ubuntu 18.04 (Bionic)
* This bump allows us to install a few packages that were previously
installed manually.
* Added a Clang build.
TODOs:
* X11 tests are broken. I've commented them out for the time being.
-rw-r--r-- | .travis.yml | 163 |
1 files changed, 75 insertions, 88 deletions
diff --git a/.travis.yml b/.travis.yml index 03918b21..fb05ba4b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,105 +1,92 @@ - -sudo: required -dist: trusty +os: linux +dist: bionic language: c env: global: - # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created - # via the "travis encrypt" command using the project repo's public key - - secure: "Uodrn3x36plX2yk4+c7eimCuv7j6p6n1XCNbNEYxibRX77730eQMCVS0BvM40OgD7m5K9s2hIQaMV7EMj3qKuRmemULDVJVTgNd1fbx6t4BhYh+Hrf6FhsNcm9nFxvQQrdJAVSOwIAlrUilVFotDRt9qKqLwwZiBKIs5gBPcHQY=" + # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created via + # the "travis encrypt" command using the project repo's public key + - secure: "Uodrn3x36plX2yk4+c7eimCuv7j6p6n1XCNbNEYxibRX77730eQMCVS0BvM40OgD7m5K9s2hIQaMV7EMj3qKuRmemULDVJVTgNd1fbx6t4BhYh+Hrf6FhsNcm9nFxvQQrdJAVSOwIAlrUilVFotDRt9qKqLwwZiBKIs5gBPcHQY=" addons: - coverity_scan: - project: - name: "DaveDavenport/rofi" - description: "Build submitted via Travis CI" - notification_email: qball@gmpclient.org - build_command_prepend: "autoreconf -i;./configure; make clean" - build_command: "make" - branch_pattern: coverity_scan - apt: - packages: - - python3.5 - - autoconf - - automake - - make - - xutils-dev - - libpango1.0-dev - - libcairo2-dev - - libstartup-notification0-dev - - libxcb-ewmh-dev - - libxcb-icccm4-dev - - libxcb-util0-dev - - libxcb-xinerama0-dev - - libxcb-xkb-dev - - libxcb-randr0-dev - - libxcb1-dev - - libxkbcommon-dev - - libxkbcommon-x11-dev - - xvfb - - discount - - xdotool - - fluxbox - - xterm - - gdb - - lcov - - doxygen - - graphviz - - texinfo - - texi2html - - xfonts-base + # TODO: Is this addon still actively used? + coverity_scan: + project: + name: "DaveDavenport/rofi" + description: "Build submitted via Travis CI" + notification_email: qball@gmpclient.org + build_command_prepend: "meson setup build" + build_command: "ninja -C build" + branch_pattern: coverity_scan + apt: + packages: + - check + - discount + - doxygen + - fluxbox + - gdb + - graphviz + - lcov + - libpango1.0-dev + - libstartup-notification0-dev + - libxcb-ewmh-dev + - libxcb-icccm4-dev + - libxcb-randr0-dev + - libxcb-util0-dev + - libxcb-xinerama0-dev + - libxcb-xkb-dev + - libxcb-xrm-dev + - libxkbcommon-dev + - libxkbcommon-dev + - libxkbcommon-x11-dev + - ninja-build + - python3-pip + - python3-setuptools + - python3-wheel + - texi2html + - texinfo + - xdotool + - xfonts-base + - xterm + - xutils-dev compiler: - - gcc - -before_install: - - sudo add-apt-repository -y 'deb https://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse' - - sudo add-apt-repository -y 'deb https://debian.jpleau.ca/ jessie-backports main contrib non-free' - - sudo apt-get update -qq - - echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca- - + - clang + - gcc -# TODO: We install xkbcommon here, until Travis use an up-to-date enough Ubuntu +# TODO: Potentially switch to coverxygen (active project with the same goal) +# at some point in the future? install: - - sudo apt-get install -y --force-yes flex/trusty-backports libfl-dev/trusty-backports - - wget https://github.com/mesonbuild/meson/releases/download/0.47.0/meson-0.47.0.tar.gz - - tar xf meson-0.47.0.tar.gz - - wget https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-linux.zip - - export MESON=$(pwd)/meson-0.47.0/meson.py - - unzip ninja-linux.zip - - export PATH=$(pwd):$PATH - - git clone https://github.com/alobbs/doxy-coverage - - git clone --recursive https://github.com/Airblader/xcb-util-xrm.git - - cd xcb-util-xrm - - ./autogen.sh --prefix=/usr - - make - - sudo make install - - cd - - - git clone https://github.com/libcheck/check/ -b 0.11.0 - - cd check - - autoreconf -i - - TEX="false" ./configure --prefix=/usr/ - - make - - sudo make install - - cd - + # doxy-coverage is not packaged in Ubuntu 18.04 (Bionic), clone the helper + # scripts manually: + - git clone https://github.com/alobbs/doxy-coverage + # Ubuntu's meson version is outdated. Use pip to install a more recent + # release: + - pip3 install --user meson + # ~/.local/bin is not a part of $PATH by default. Update $PATH to include it: + - PATH="$PATH:$HOME/.local/bin" before_script: - - python3.5 ${MESON} build -Db_coverage=true + # Configure the build directory with meson: + - meson setup build +# TODO: Fix X11 tests (and check whether or not changing the user's resource +# limit is still required for the X11 tests). script: - - ninja -C build - - ninja -C build test - - ulimit -c unlimited - - ninja -C build test-x - - ninja -C build doc/html 2>&1 > doxygen.log - - test $(grep -c warning doxygen.log) -eq 0 - - ./doxy-coverage/doxy-coverage.py build/doc/html/xml/ + # Build the project: + - ninja -C build + # Run tests: + - ninja -C build test + #- ulimit -c unlimited + #- ninja -C build test-x + - ninja -C build doc/html 2>&1 > doxygen.log + - test $(grep -c warning doxygen.log) -eq 0 + - ./doxy-coverage/doxy-coverage.py build/doc/html/xml/ after_success: - - bash <(curl -s https://codecov.io/bash) + - bash <(curl -s https://codecov.io/bash) notifications: - webhooks: - urls: - - secure: "AqDM5SkWJPSBeCiyGdXzHYLnFCML/vKxWW/0wE00ocX+97Fa5ixeU7apMJ0OMZ0ZQVXG96xVtlJ513ZSpnRYHx6FF+Ivvw5pYeZjKHqtxThEhOueW1YynYWMX7HJrA4P19ollqRLrtsJqG6x7BhVEnIyhyu9eXtgj6hiI70F0SE=" - on_success: change + webhooks: + urls: + - secure: "AqDM5SkWJPSBeCiyGdXzHYLnFCML/vKxWW/0wE00ocX+97Fa5ixeU7apMJ0OMZ0ZQVXG96xVtlJ513ZSpnRYHx6FF+Ivvw5pYeZjKHqtxThEhOueW1YynYWMX7HJrA4P19ollqRLrtsJqG6x7BhVEnIyhyu9eXtgj6hiI70F0SE=" + on_success: change |