mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Fix Travis CI builds (#1107)
* 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. * Create multiple jobs Jobs (4 total): Compilers: * Clang * GCC Build tools: * Autotools * Meson Enhancements: * DRY out the CI config. Failure (seemingly related to `check`?) here: https://travis-ci.org/github/davatorium/rofi/jobs/680265096#L1125 * [Travis] More debug output * [Travis] Add ldconfig * [Travis] try to fix doxy tests. * [Travis] Try to fix doxygen stuff. * [Travis] Trying to fix meson doxy gen tests. * Minor cleanups Co-authored-by: Dave Davenport <qball@gmpclient.org>
This commit is contained in:
parent
86cdcae55b
commit
80fc8e16b2
1 changed files with 130 additions and 86 deletions
216
.travis.yml
216
.travis.yml
|
@ -1,105 +1,149 @@
|
||||||
|
os: linux
|
||||||
sudo: required
|
dist: bionic
|
||||||
dist: trusty
|
|
||||||
language: c
|
language: c
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
|
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created via
|
||||||
# via the "travis encrypt" command using the project repo's public key
|
# the "travis encrypt" command using the project repo's public key
|
||||||
- secure: "Uodrn3x36plX2yk4+c7eimCuv7j6p6n1XCNbNEYxibRX77730eQMCVS0BvM40OgD7m5K9s2hIQaMV7EMj3qKuRmemULDVJVTgNd1fbx6t4BhYh+Hrf6FhsNcm9nFxvQQrdJAVSOwIAlrUilVFotDRt9qKqLwwZiBKIs5gBPcHQY="
|
- secure: "Uodrn3x36plX2yk4+c7eimCuv7j6p6n1XCNbNEYxibRX77730eQMCVS0BvM40OgD7m5K9s2hIQaMV7EMj3qKuRmemULDVJVTgNd1fbx6t4BhYh+Hrf6FhsNcm9nFxvQQrdJAVSOwIAlrUilVFotDRt9qKqLwwZiBKIs5gBPcHQY="
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
coverity_scan:
|
coverity_scan:
|
||||||
project:
|
project:
|
||||||
name: "DaveDavenport/rofi"
|
name: "DaveDavenport/rofi"
|
||||||
description: "Build submitted via Travis CI"
|
description: "Build submitted via Travis CI"
|
||||||
notification_email: qball@gmpclient.org
|
notification_email: qball@gmpclient.org
|
||||||
build_command_prepend: "autoreconf -i;./configure; make clean"
|
# TODO: What do these actually do?
|
||||||
build_command: "make"
|
build_command_prepend: "meson setup build"
|
||||||
branch_pattern: coverity_scan
|
build_command: "ninja -C build"
|
||||||
apt:
|
branch_pattern: coverity_scan
|
||||||
packages:
|
apt:
|
||||||
- python3.5
|
packages:
|
||||||
- autoconf
|
- discount
|
||||||
- automake
|
- doxygen
|
||||||
- make
|
- fluxbox
|
||||||
- xutils-dev
|
- gdb
|
||||||
- libpango1.0-dev
|
- graphviz
|
||||||
- libcairo2-dev
|
- jq
|
||||||
- libstartup-notification0-dev
|
- lcov
|
||||||
- libxcb-ewmh-dev
|
- libpango1.0-dev
|
||||||
- libxcb-icccm4-dev
|
- libstartup-notification0-dev
|
||||||
- libxcb-util0-dev
|
- libxcb-ewmh-dev
|
||||||
- libxcb-xinerama0-dev
|
- libxcb-icccm4-dev
|
||||||
- libxcb-xkb-dev
|
- libxcb-randr0-dev
|
||||||
- libxcb-randr0-dev
|
- libxcb-util0-dev
|
||||||
- libxcb1-dev
|
- libxcb-xinerama0-dev
|
||||||
- libxkbcommon-dev
|
- libxcb-xkb-dev
|
||||||
- libxkbcommon-x11-dev
|
- libxcb-xrm-dev
|
||||||
- xvfb
|
- libxkbcommon-dev
|
||||||
- discount
|
- libxkbcommon-dev
|
||||||
- xdotool
|
- libxkbcommon-x11-dev
|
||||||
- fluxbox
|
- ninja-build
|
||||||
- xterm
|
- python3-pip
|
||||||
- gdb
|
- python3-setuptools
|
||||||
- lcov
|
- python3-wheel
|
||||||
- doxygen
|
- texi2html
|
||||||
- graphviz
|
- texinfo
|
||||||
- texinfo
|
- xdotool
|
||||||
- texi2html
|
- xfonts-base
|
||||||
- xfonts-base
|
- xterm
|
||||||
|
- xutils-dev
|
||||||
compiler:
|
|
||||||
- gcc
|
|
||||||
|
|
||||||
|
# TODO: Potentially switch to coverxygen (active project with the same goal) at
|
||||||
|
# some point in the future?
|
||||||
before_install:
|
before_install:
|
||||||
- sudo add-apt-repository -y 'deb https://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse'
|
# doxy-coverage is not packaged in Ubuntu 18.04 (Bionic), clone the helper
|
||||||
- sudo add-apt-repository -y 'deb https://debian.jpleau.ca/ jessie-backports main contrib non-free'
|
# scripts manually:
|
||||||
- sudo apt-get update -qq
|
- git clone https://github.com/alobbs/doxy-coverage
|
||||||
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
|
# Ubuntu 18.04 ships an outdated version of check. Install a more recent
|
||||||
|
# version instead:
|
||||||
|
- curl -L https://github.com/libcheck/check/releases/download/0.14.0/check-0.14.0.tar.gz | tar xzf -
|
||||||
|
- cd check-0.14.0
|
||||||
|
- ./configure
|
||||||
|
- make
|
||||||
|
# Disable tests for non-"debug" runs (as these tests can take several minutes
|
||||||
|
# to complete):
|
||||||
|
#- make check
|
||||||
|
- sudo make install
|
||||||
|
- sudo ldconfig
|
||||||
|
- cd ..
|
||||||
|
|
||||||
|
# YAML anchor, ignored by Travis CI (albeit present in the JSON render):
|
||||||
# TODO: We install xkbcommon here, until Travis use an up-to-date enough Ubuntu
|
.autotools: &autotools
|
||||||
install:
|
before_script: &autotools_before_script
|
||||||
- sudo apt-get install -y --force-yes flex/trusty-backports libfl-dev/trusty-backports
|
# prettier-ignore
|
||||||
- wget https://github.com/mesonbuild/meson/releases/download/0.47.0/meson-0.47.0.tar.gz
|
# Generate the configure script:
|
||||||
- tar xf meson-0.47.0.tar.gz
|
- autoreconf --install
|
||||||
- wget https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-linux.zip
|
# Make the build directory:
|
||||||
- export MESON=$(pwd)/meson-0.47.0/meson.py
|
- mkdir build
|
||||||
- unzip ninja-linux.zip
|
# Change into the build directory:
|
||||||
- export PATH=$(pwd):$PATH
|
- cd build
|
||||||
- git clone https://github.com/alobbs/doxy-coverage
|
# Configure the build directory
|
||||||
- git clone --recursive https://github.com/Airblader/xcb-util-xrm.git
|
- ../configure
|
||||||
- cd xcb-util-xrm
|
# TODO: Fix X11 tests (and check whether or not changing the user's resource
|
||||||
- ./autogen.sh --prefix=/usr
|
# limit is still required for the X11 tests).
|
||||||
|
script: &autotools_script # Build the project:
|
||||||
- make
|
- make
|
||||||
- sudo make install
|
# Run tests:
|
||||||
- cd -
|
- make distcheck
|
||||||
- git clone https://github.com/libcheck/check/ -b 0.11.0
|
# Code coverage:
|
||||||
- cd check
|
- make doxy 2>&1 > doxygen.log
|
||||||
- autoreconf -i
|
# Check for warnings in doxygen.log:
|
||||||
- TEX="false" ./configure --prefix=/usr/
|
- test $(grep -c warning doxygen.log) -eq 0
|
||||||
- make
|
- ../doxy-coverage/doxy-coverage.py doc/html/xml/
|
||||||
- sudo make install
|
|
||||||
- cd -
|
|
||||||
|
|
||||||
before_script:
|
# YAML anchor, ignored by Travis CI (albeit present in the JSON render):
|
||||||
- python3.5 ${MESON} build -Db_coverage=true
|
.meson: &meson
|
||||||
|
install: &meson_install
|
||||||
script:
|
# 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:
|
||||||
|
&meson_before_script # 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: &meson_script # Build the project:
|
||||||
- ninja -C build
|
- ninja -C build
|
||||||
|
# Run tests:
|
||||||
- ninja -C build test
|
- ninja -C build test
|
||||||
- ulimit -c unlimited
|
#- ulimit -c unlimited
|
||||||
- ninja -C build test-x
|
#- ninja -C build test-x
|
||||||
- ninja -C build doc/html 2>&1 > doxygen.log
|
- ninja -C build doc/html 2>&1 > doxygen.log
|
||||||
- test $(grep -c warning doxygen.log) -eq 0
|
- test $(grep -c warning doxygen.log) -eq 0
|
||||||
- ./doxy-coverage/doxy-coverage.py build/doc/html/xml/
|
- ./doxy-coverage/doxy-coverage.py build/doc/html/xml/
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- bash <(curl -s https://codecov.io/bash)
|
- bash <(curl -s https://codecov.io/bash)
|
||||||
|
|
||||||
|
# Travis CI doesn't propagate the compiler key to individual jobs. Define
|
||||||
|
# a _single_ compiler for each job, as a list will only result in the first
|
||||||
|
# compiler being used!
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
include:
|
||||||
|
- name: "Autotools - Clang"
|
||||||
|
compiler: clang
|
||||||
|
# Merge keys from the .autotools map:
|
||||||
|
<<: *autotools
|
||||||
|
- name: "Autotools - GCC"
|
||||||
|
compiler: gcc
|
||||||
|
# Merge keys from the .autotools map:
|
||||||
|
<<: *autotools
|
||||||
|
- name: "Meson - Clang"
|
||||||
|
compiler: clang
|
||||||
|
# Merge keys from the .meson map:
|
||||||
|
<<: *meson
|
||||||
|
- name: "Meson - GCC"
|
||||||
|
compiler: gcc
|
||||||
|
# Merge keys from the .meson map:
|
||||||
|
<<: *meson
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
webhooks:
|
webhooks:
|
||||||
urls:
|
urls:
|
||||||
- secure: "AqDM5SkWJPSBeCiyGdXzHYLnFCML/vKxWW/0wE00ocX+97Fa5ixeU7apMJ0OMZ0ZQVXG96xVtlJ513ZSpnRYHx6FF+Ivvw5pYeZjKHqtxThEhOueW1YynYWMX7HJrA4P19ollqRLrtsJqG6x7BhVEnIyhyu9eXtgj6hiI70F0SE="
|
- secure: "AqDM5SkWJPSBeCiyGdXzHYLnFCML/vKxWW/0wE00ocX+97Fa5ixeU7apMJ0OMZ0ZQVXG96xVtlJ513ZSpnRYHx6FF+Ivvw5pYeZjKHqtxThEhOueW1YynYWMX7HJrA4P19ollqRLrtsJqG6x7BhVEnIyhyu9eXtgj6hiI70F0SE="
|
||||||
on_success: change
|
on_success: change
|
||||||
|
# vim: et sw=2 ts=2
|
||||||
|
|
Loading…
Reference in a new issue