nim-snappy/.travis.yml

47 lines
1.2 KiB
YAML

language: c # or other C/C++ variants
sudo: false
# https://docs.travis-ci.com/user/caching/
#
# Caching the whole nim folder is better than relying on ccache - this way, we
# skip the expensive bootstrap process and linking
cache:
directories:
- nim
os:
- linux
- osx
install:
# build nim from our own branch - this to avoid the day-to-day churn and
# regressions of the fast-paced Nim development while maintaining the
# flexibility to apply patches
#
# check version of remote branch
- "export NIMVER=$(git ls-remote https://github.com/nim-lang/nim.git HEAD | cut -f 1)"
# after building nim, wipe csources to save on cache space
- "{ [ -f nim/$NIMVER/bin/nim ] && [ -f nim/$NIMVER/bin/nimble ] ; } ||
{ rm -rf nim ;
mkdir -p nim ;
git clone --depth=1 https://github.com/nim-lang/nim.git nim/$NIMVER ;
cd nim/$NIMVER ;
sh build_all.sh > /dev/null;
rm -rf csources ;
cd ../.. ;
}"
- "export PATH=$PWD/nim/$NIMVER/bin:$PATH"
- git clone --depth 1 https://github.com/google/snappy
script:
- cd snappy
- mkdir build
- cd build && cmake ../ && make
- cd ../..
- cp snappy/build/libsnappy.a tests/libsnappy.a
- nimble install -y > /dev/null
- nimble test