-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI test that runs on different OS/versions
Fixes #1
- Loading branch information
Showing
1 changed file
with
52 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,59 @@ | ||
--- | ||
language: crystal | ||
dist: trusty | ||
sudo: required | ||
|
||
before_install: | ||
- sudo apt-get -qq update | ||
- sudo apt-get install -y pkg-config libicu52 | ||
matrix: | ||
include: | ||
# Linux | ||
- os: linux | ||
dist: precise | ||
- os: linux | ||
dist: trusty | ||
- os: linux | ||
dist: xenial | ||
- os: linux | ||
dist: trusty | ||
env: GENERATE_LIB=1 # regenerate the binding | ||
# OSX | ||
- os: osx | ||
osx_image: xcode8.3 | ||
- os: osx | ||
osx_image: xcode8.3 | ||
env: GENERATE_LIB=1 # regenerate the binding | ||
|
||
before_install: | | ||
case $TRAVIS_OS_NAME in | ||
linux) | ||
sudo apt-get -qq update | ||
if [[ -n $GENERATE_LIB ]]; then | ||
sudo apt-get install -y llvm-3.5-dev libclang-3.5-dev | ||
fi | ||
sudo apt-get install -y libicu-dev | ||
;; | ||
osx) | ||
brew update | ||
# FIXME: ugly fix for the CI's image, crystal-lang should not be reinstalled | ||
rm -f /usr/local/bin/shards | ||
brew install crystal-lang | ||
if [[ -n $GENERATE_LIB ]]; then | ||
# install LLVM and Clang 3.7 | ||
brew install [email protected] | ||
# FIXME: ugly fix since the libclang.dylib is not symlinked correctly | ||
brew list --verbose [email protected] | grep "\.dylib$" | xargs -n1 -I{} ln -sf {} $(brew --prefix)/lib | ||
fi | ||
brew install icu4c | ||
brew link --force icu4c | ||
;; | ||
*) | ||
exit 1;; | ||
esac | ||
before_script: | ||
- "[ -z $GENERATE_LIB ] || make" | ||
|
||
script: | ||
- crystal tool format --check | ||
- crystal tool format --check src spec | ||
- crystal spec |