1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-18 05:40:07 +00:00

Execute tests on various ZSH versions

This commit is contained in:
Dominik Ritter 2018-07-13 01:18:07 +02:00
parent d031b3e035
commit 6c4a3e8a1b

View file

@ -1,23 +1,78 @@
sudo: true
dist: trusty
language: sh language: sh
os:
- linux
- osx
addons: addons:
apt: apt:
packages: packages:
- build-essential - build-essential
- git
- mercurial
- subversion
- jq
- node
- golang
- ruby
- python
- python-virtualenv
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
env:
global:
- ZSH_DIST=$HOME/.zshdist
matrix:
# Use _ZSH_VERSION since if ZSH_VERSION is present, travis cacher thinks it
# is running in zsh and tries to use zsh specific functions.
- _ZSH_VERSION=5.5.1
- _ZSH_VERSION=5.5
- _ZSH_VERSION=5.4.2
- _ZSH_VERSION=5.4.1
- _ZSH_VERSION=5.3.1
- _ZSH_VERSION=5.3
- _ZSH_VERSION=5.2
- _ZSH_VERSION=5.1.1
- _ZSH_VERSION=5.0.8
- _ZSH_VERSION=5.0.2
cache:
directories:
- $ZSH_DIST
before_script: before_script:
- >
setup_zsh() {
dest="$ZSH_DIST/$1"
if [[ ! -d $dest/bin ]]; then
coreutils_mktemp="mktemp"
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
coreutils_mktemp="gmktemp"
fi
tmp="$(${coreutils_mktemp} --directory --tmpdir="${TMPDIR:/tmp}" zshbuild.XXXXXX)"
(
cd "$tmp" &&
curl -L http://downloads.sourceforge.net/zsh/zsh-${1}.tar.gz | tar zx &&
cd zsh-$1 &&
./configure --prefix="$dest" &&
make &&
mkdir -p "$dest" &&
make install ||
echo "Failed to build zsh-${1}!"
)
fi
export PATH="$dest/bin:$PATH"
}
- setup_zsh $_ZSH_VERSION
# Show the git version being used to test. # Show the git version being used to test.
- "git --version" - "git --version"
# Show the mercurial version being used to test.
- "hg --version"
# Show the zsh version being used to test. # Show the zsh version being used to test.
- "zsh --version" - "zsh --version"
install:
- "sudo apt-get update -qq"
- "sudo apt-get install -y zsh"
- "sudo chsh -s $(which zsh)"
- "sudo apt-get install -y git mercurial subversion jq node golang ruby python python-virtualenv"
script: script:
- test/powerlevel9k.spec - test/powerlevel9k.spec
- test/functions/utilities.spec - test/functions/utilities.spec