Permalink
Fetching contributors…
Cannot retrieve contributors at this time
83 lines (72 sloc) 3.39 KB
language: shell
os:
- linux
- osx
sudo: required
dist: trusty
# Note: needed by winetricks-test, which not yet supported in TravisCI
# - cabextract
# - p7zip
# - unrar
# - unzip
# - wine
addons:
apt:
packages:
# for bashate
- python-tz
# for checkbashisms
- devscripts
# Note: if statements cannot go across multiple lines. Combine into one, or move to a shell script!
# Ubuntu notes:
# * ShellCheck is already installed in TravisCI
# * bashate is not available on Trusty and we need to install it manually
# macOS note:
# * Homebrew doesn't provide bashate, they don't package things
# that are on pypi
#
# We use a script that installs bashate by unpacking .deb files built for
# Ubuntu Bionic (18.04) because:
# 1. python-bashate 0.3.1-2 (for Artful) can be installed but
# Artful will not be supported after July 2018
# 2. python-bashate 0.5.1-1 (for Bionic) can't be installed on Trusty
# because it contains "control.tar.xz"
# > dpkg-deb: error: archive '/var/cache/apt/archives/python-bashate_0.5.1-1_all.deb' has premature member 'control.tar.xz' before 'control.tar.gz', giving up
# > dpkg: error processing archive /var/cache/apt/archives/python-bashate_0.5.1-1_all.deb (--unpack):
# > subprocess dpkg-deb --control returned error exit status 2
# 3. Adding apt-line for newer Ubuntu release breaks dependencies
# e.g. can't install Official Wine package on Ubuntu
# > The following packages have unmet dependencies:
# > winehq-stable : Depends: wine-stable (= 3.0.0~trusty)
# > E: Unable to correct problems, you have held broken packages.
# 4. Ubuntu Bionic is an LTS release and will be supported until April 2023
# This means that we can use version 0.5.1-1 until April 2023
# 5. The installation via the script is quick
# (simply download and unpack files)
#
# If the script fails, install pip and use it to install bashate
before_install:
- time sh ./misc/travis-install-bashate-deb.sh || time sh ./misc/travis-install-bashate-pip.sh
# "brew update" (or auto-update when installing) takes long time
# checkbashisms and shellcheck can be installed without this
# So installing with "HOMEBREW_NO_AUTO_UPDATE=1" considerably reduces
# job time on macOS
# If it fails retry with auto-update
- if [[ "$TRAVIS_OS_NAME" == "osx" ]] ; then time env HOMEBREW_NO_AUTO_UPDATE=1 brew install checkbashisms shellcheck || time brew install checkbashisms shellcheck ; fi
# Note if testing on a branch, you can replace this with your desired command, e.g.,:
# script: time sh ./src/winetricks -q comctl32
# Some tests require a working $DISPLAY, and not just Xvfb. See tests/winetricks-test for the list.
# Either skip those / test manually, or run them on OS X.
# Also note:
# Installing wine on the vms is a pain.
# Linux: currently can't get 1.8.x / 1.9.x installed :/
# OS X: 38 minutes
# shell-checks is quick and works, no display or compiles needed
script:
- time sh ./tests/shell-checks
# Also check for trailing whitespace. Not doing in shell-checks because it depends on a clean tree (uses git diff):
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then time sh ./tests/whitespace-check; fi
# OS X doesn't allow writing to /usr/bin, skip non-PREFIX make install test there
install:
- if [[ "$TRAVIS_OS_NAME" != "osx" ]] ; then time sudo make install ; fi
- time make install PREFIX="$(mktemp -d)"