2020-01-25 06:09:23 +03:00
|
|
|
dist: xenial
|
2015-10-01 12:54:59 +03:00
|
|
|
|
|
|
|
language: c
|
|
|
|
|
2016-08-05 12:31:00 +03:00
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- PKGNAME=idris
|
|
|
|
|
2015-10-01 12:54:59 +03:00
|
|
|
matrix:
|
|
|
|
include:
|
2020-03-18 21:24:52 +03:00
|
|
|
- env: CABALVER="2.4" GHCVER="8.6.5" STACKVER="15.4" STYLISH=YES
|
2019-11-19 17:26:47 +03:00
|
|
|
addons: {apt: {packages: [cabal-install-2.4,ghc-8.6.5,hscolour], sources: [hvr-ghc]}}
|
2020-03-18 21:24:08 +03:00
|
|
|
- env: CABALVER="2.4" GHCVER="8.2.2" TESTS="lib_doc doc"
|
|
|
|
compiler: ": #GHC 8.2.2"
|
|
|
|
addons: {apt: {packages: [cabal-install-2.4,ghc-8.2.2,cppcheck,hscolour], sources: [hvr-ghc]}}
|
|
|
|
- env: CABALVER="2.4" GHCVER="8.2.2" TESTS="test_js"
|
|
|
|
compiler: ": #GHC 8.2.2"
|
|
|
|
addons: {apt: {packages: [cabal-install-2.4,ghc-8.2.2,cppcheck,hscolour], sources: [hvr-ghc]}}
|
|
|
|
- env: CABALVER="2.4" GHCVER="8.2.2" TESTS="test_c"
|
|
|
|
compiler: ": #GHC 8.2.2"
|
|
|
|
addons: {apt: {packages: [cabal-install-2.4,ghc-8.2.2,cppcheck,hscolour], sources: [hvr-ghc]}}
|
2020-03-19 00:23:31 +03:00
|
|
|
- env: CABALVER="2.4" GHCVER="8.4.4" TESTS="lib_doc doc"
|
|
|
|
compiler: ": #GHC 8.4.4"
|
|
|
|
addons: {apt: {packages: [cabal-install-2.4,ghc-8.4.4,cppcheck,hscolour], sources: [hvr-ghc]}}
|
|
|
|
- env: CABALVER="2.4" GHCVER="8.4.4" TESTS="test_js"
|
|
|
|
compiler: ": #GHC 8.4.4"
|
|
|
|
addons: {apt: {packages: [cabal-install-2.4,ghc-8.4.4,cppcheck,hscolour], sources: [hvr-ghc]}}
|
|
|
|
- env: CABALVER="2.4" GHCVER="8.4.4" TESTS="test_c"
|
|
|
|
compiler: ": #GHC 8.4.4"
|
|
|
|
addons: {apt: {packages: [cabal-install-2.4,ghc-8.4.4,cppcheck,hscolour], sources: [hvr-ghc]}}
|
2020-03-18 21:24:08 +03:00
|
|
|
- env: CABALVER="3.0" GHCVER="8.8.3" TESTS="lib_doc doc"
|
|
|
|
compiler: ": #GHC 8.8.3"
|
|
|
|
addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.3,cppcheck,hscolour], sources: [hvr-ghc]}}
|
|
|
|
- env: CABALVER="3.0" GHCVER="8.8.3" TESTS="test_js"
|
|
|
|
compiler: ": #GHC 8.8.3"
|
|
|
|
addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.3,cppcheck,hscolour], sources: [hvr-ghc]}}
|
|
|
|
- env: CABALVER="3.0" GHCVER="8.8.3" TESTS="test_c"
|
|
|
|
compiler: ": #GHC 8.8.3"
|
|
|
|
addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.3,cppcheck,hscolour], sources: [hvr-ghc]}}
|
|
|
|
- env: CABALVER="3.0" GHCVER="8.8.3" IDRIS2=YES
|
|
|
|
addons: {apt: {packages: [cabal-install-3.0,ghc-8.8.3], sources: [hvr-ghc]}}
|
2017-01-05 23:45:36 +03:00
|
|
|
fast-finish: true
|
2015-10-01 12:54:59 +03:00
|
|
|
|
2020-03-13 15:57:03 +03:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.cabsnap
|
|
|
|
- $HOME/.cabal/packages
|
|
|
|
- $HOME/.stack
|
2015-10-01 12:54:59 +03:00
|
|
|
|
|
|
|
before_cache:
|
|
|
|
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
|
|
|
|
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.tar
|
2015-02-27 17:14:22 +03:00
|
|
|
|
2013-07-05 01:08:19 +04:00
|
|
|
before_install:
|
2017-05-24 09:52:17 +03:00
|
|
|
- nvm install 6
|
|
|
|
- nvm use 6
|
2015-10-01 12:54:59 +03:00
|
|
|
- unset CC
|
2016-07-30 19:57:42 +03:00
|
|
|
- if [[ $TRAVIS_OS_NAME == 'linux' ]];
|
|
|
|
then
|
2020-01-31 21:05:32 +03:00
|
|
|
export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$HOME/.cabal/bin:$HOME/opt/scheme/bin/:$PATH;
|
2016-07-30 19:57:42 +03:00
|
|
|
export SED=sed;
|
|
|
|
export ZCAT=zcat;
|
|
|
|
fi
|
2015-10-01 12:54:59 +03:00
|
|
|
- env
|
2016-07-30 19:57:42 +03:00
|
|
|
- if [[ $TRAVIS_OS_NAME == 'osx' ]];
|
|
|
|
then
|
2016-11-24 22:14:23 +03:00
|
|
|
brew outdated pkgconfig || brew install pkgconfig;
|
|
|
|
brew install ghc cabal-install libffi cppcheck gnu-sed;
|
2016-07-30 19:57:42 +03:00
|
|
|
export PATH=$HOME/.cabal/bin:$PATH;
|
|
|
|
export SED=gsed;
|
|
|
|
export ZCAT=gzcat;
|
|
|
|
export PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH;
|
|
|
|
fi
|
2016-10-13 00:54:31 +03:00
|
|
|
- if [ -n "$STYLISH" ]; then ./stylize.sh; exit $?; fi
|
2020-01-31 21:05:32 +03:00
|
|
|
- if [ -n "$IDRIS2" ];
|
|
|
|
then
|
|
|
|
git clone https://github.com/edwinb/Idris2 &&
|
|
|
|
wget https://github.com/cisco/ChezScheme/archive/v9.5.2.tar.gz &&
|
|
|
|
tar xvzf v9.5.2.tar.gz &&
|
|
|
|
cd ChezScheme-9.5.2 &&
|
|
|
|
./configure --threads --installprefix=$HOME/opt/scheme &&
|
|
|
|
make -j install &&
|
|
|
|
cd .. &&
|
|
|
|
cabal v1-update &&
|
|
|
|
travis_wait cabal v1-install &&
|
|
|
|
cd Idris2 &&
|
|
|
|
make idris2 && make base && make contrib;
|
|
|
|
exit $?;
|
|
|
|
fi
|
2015-10-01 12:54:59 +03:00
|
|
|
|
2013-11-01 01:33:46 +04:00
|
|
|
install:
|
2016-12-05 15:04:40 +03:00
|
|
|
- which cabal
|
|
|
|
- which ghc
|
2015-10-01 12:54:59 +03:00
|
|
|
- cabal --version
|
|
|
|
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
|
|
|
|
- if [ -f $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz ];
|
|
|
|
then
|
2016-07-30 19:57:42 +03:00
|
|
|
$ZCAT $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz >
|
|
|
|
$HOME/.cabal/packages/hackage.haskell.org/00-index.tar;
|
2016-07-31 14:32:24 +03:00
|
|
|
fi
|
2015-10-01 12:54:59 +03:00
|
|
|
- travis_retry cabal update -v
|
|
|
|
# Run build with 2 parallel jobs
|
|
|
|
# The container environment reports 16 cores,
|
|
|
|
# causing cabal's default configuration (jobs: $ncpus)
|
|
|
|
# to run into the GHC #9221 bug which can result in longer build-times.
|
2016-07-31 14:32:24 +03:00
|
|
|
- $SED -i -r 's/(^jobs:).*/\1 2/' $HOME/.cabal/config
|
2020-01-25 05:21:07 +03:00
|
|
|
- cabal v1-install -f FFI --only-dependencies --enable-tests --dry -v > installplan.txt
|
2016-07-31 14:32:24 +03:00
|
|
|
- $SED -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt
|
2015-10-01 12:54:59 +03:00
|
|
|
# check whether current requested install-plan matches cached package-db snapshot
|
|
|
|
- if diff -u installplan.txt $HOME/.cabsnap/installplan.txt;
|
|
|
|
then
|
|
|
|
echo "cabal build-cache HIT";
|
|
|
|
rm -rfv .ghc;
|
|
|
|
cp -a $HOME/.cabsnap/ghc $HOME/.ghc;
|
|
|
|
cp -a $HOME/.cabsnap/lib $HOME/.cabsnap/share $HOME/.cabsnap/bin $HOME/.cabal/;
|
|
|
|
else
|
|
|
|
echo "cabal build-cache MISS";
|
|
|
|
rm -rf $HOME/.cabsnap;
|
|
|
|
mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin;
|
2020-01-25 05:21:07 +03:00
|
|
|
cabal v1-install -f FFI --only-dependencies --enable-tests;
|
2015-10-01 12:54:59 +03:00
|
|
|
fi
|
|
|
|
# snapshot package-db on cache miss
|
|
|
|
- if [ ! -d $HOME/.cabsnap ];
|
|
|
|
then
|
|
|
|
echo "snapshotting package-db to build-cache";
|
|
|
|
mkdir $HOME/.cabsnap;
|
|
|
|
cp -a $HOME/.ghc $HOME/.cabsnap/ghc;
|
|
|
|
cp -a $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin installplan.txt $HOME/.cabsnap/;
|
|
|
|
fi
|
2020-03-12 22:19:10 +03:00
|
|
|
|
2015-10-01 12:54:59 +03:00
|
|
|
|
2013-06-29 04:51:44 +04:00
|
|
|
before_script:
|
2016-08-05 15:57:00 +03:00
|
|
|
- ORIGINAL_DIR=$(pwd)
|
2020-01-25 06:28:05 +03:00
|
|
|
- cabal v1-sdist
|
2013-08-01 08:57:30 +04:00
|
|
|
- cd ..
|
2016-08-05 15:57:00 +03:00
|
|
|
- tar -xf ${ORIGINAL_DIR}/dist/${PKGNAME}*.tar.gz
|
2016-08-05 12:31:00 +03:00
|
|
|
- cd ${PKGNAME}*
|
2013-06-29 04:51:44 +04:00
|
|
|
script:
|
2020-03-13 17:05:17 +03:00
|
|
|
- export LD_PRELOAD=/opt/ghc/${GHCVER}/lib/ghc-${GHCVER}/rts/libffi.so.7
|
2016-07-27 15:46:01 +03:00
|
|
|
###
|
|
|
|
- echo 'Configure...' && echo -en 'travis_fold:start:script.configure\\r'
|
2020-01-25 05:21:07 +03:00
|
|
|
- cabal v1-configure -f FFI -f CI --enable-tests
|
2016-07-27 15:46:01 +03:00
|
|
|
- echo -en 'travis_fold:end:script.configure\\r'
|
|
|
|
###
|
|
|
|
- echo 'Build...' && echo -en 'travis_fold:start:script.build\\r'
|
2020-03-13 17:05:17 +03:00
|
|
|
- cabal v1-build
|
2016-07-27 15:46:01 +03:00
|
|
|
- echo -en 'travis_fold:end:script.build\\r'
|
|
|
|
###
|
|
|
|
- echo 'Copy...' && echo -en 'travis_fold:start:script.copy\\r'
|
2020-03-13 17:05:17 +03:00
|
|
|
- cabal v1-copy
|
2016-07-27 15:46:01 +03:00
|
|
|
- echo -en 'travis_fold:end:script.copy\\r'
|
|
|
|
###
|
|
|
|
- echo 'Register...' && echo -en 'travis_fold:start:script.register\\r'
|
2020-01-25 05:21:07 +03:00
|
|
|
- cabal v1-register
|
2016-07-27 15:46:01 +03:00
|
|
|
- echo -en 'travis_fold:end:script.register\\r'
|
|
|
|
###
|
|
|
|
- echo 'Cppcheck...' && echo -en 'travis_fold:start:script.cppcheck\\r'
|
2015-10-01 12:54:59 +03:00
|
|
|
- if [[ "$TESTS" == "test_c" ]]; then
|
|
|
|
cppcheck -i 'mini-gmp.c' rts;
|
|
|
|
fi
|
2016-07-27 15:46:01 +03:00
|
|
|
- echo -en 'travis_fold:end:script.cppcheck\\r'
|
|
|
|
###
|
|
|
|
- echo 'Tests...' && echo -en 'travis_fold:start:script.tests\\r'
|
2015-10-01 12:54:59 +03:00
|
|
|
- for test in $TESTS; do
|
2016-07-27 15:46:10 +03:00
|
|
|
echo "make TEST-JOBS=2 $test";
|
2020-03-13 17:05:17 +03:00
|
|
|
travis_wait make TEST-JOBS=2 $test;
|
2015-10-01 12:54:59 +03:00
|
|
|
done
|
2016-07-27 15:46:01 +03:00
|
|
|
- echo -en 'travis_fold:end:script.tests\\r'
|
|
|
|
###
|
|
|
|
- echo 'Benchmarks...' && echo -en 'travis_fold:start:script.benchmarks\\r'
|
2017-06-20 22:53:55 +03:00
|
|
|
- if [[ "$TESTS" == "test_c" ]]; then
|
|
|
|
cd benchmarks && ./build.pl && ./run.pl && cd ..;
|
|
|
|
fi
|
2016-07-27 15:46:01 +03:00
|
|
|
- echo -en 'travis_fold:end:script.benchmarks\\r'
|
|
|
|
###
|
2016-08-06 18:19:12 +03:00
|
|
|
# EOF
|