62 lines
1.6 KiB
YAML
62 lines
1.6 KiB
YAML
sudo: true
|
|
language: haskell
|
|
|
|
git:
|
|
depth: 5
|
|
|
|
cabal: "3.0"
|
|
|
|
cache:
|
|
directories:
|
|
- "$HOME/.cabal/store"
|
|
- "$HOME/.stack"
|
|
- "$TRAVIS_BUILD_DIR/.stack-work"
|
|
|
|
matrix:
|
|
include:
|
|
|
|
# Cabal
|
|
- ghc: 8.4.4
|
|
- ghc: 8.6.5
|
|
- ghc: 8.8.3
|
|
|
|
# Stack
|
|
- ghc: 8.6.5
|
|
env: STACK_YAML="$TRAVIS_BUILD_DIR/stack.yaml"
|
|
|
|
before_install:
|
|
- sudo apt-get install devscripts
|
|
- mkdir /tmp/minio /tmp/certs
|
|
- (cd /tmp/minio; wget https://dl.min.io/server/minio/release/linux-amd64/minio; chmod +x ./minio)
|
|
- (cd /tmp/certs; openssl req -newkey rsa:2048 -nodes -keyout private.key -x509 -days 36500 -out public.crt -subj "/C=US/ST=NRW/L=Earth/O=CompanyName/OU=IT/CN=localhost/emailAddress=email@example.com")
|
|
- sudo cp /tmp/certs/public.crt /usr/local/share/ca-certificates/
|
|
- sudo update-ca-certificates
|
|
- MINIO_ACCESS_KEY=minio MINIO_SECRET_KEY=minio123 /tmp/minio/minio server --quiet --certs-dir /tmp/certs data 2>&1 > minio.log &
|
|
|
|
install:
|
|
- |
|
|
if [ -z "$STACK_YAML" ]; then
|
|
ghc --version
|
|
cabal --version
|
|
cabal new-update
|
|
cabal new-build --enable-tests --enable-benchmarks -fexamples
|
|
else
|
|
# install stack
|
|
curl -sSL https://get.haskellstack.org/ | sh
|
|
|
|
# build project with stack
|
|
stack --version
|
|
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks --flag minio-hs:examples
|
|
fi
|
|
|
|
script:
|
|
- |
|
|
if [ -z "$STACK_YAML" ]; then
|
|
MINIO_LOCAL=1 MINIO_SECURE=1 cabal new-test --enable-tests -flive-test
|
|
else
|
|
MINIO_LOCAL=1 MINIO_SECURE=1 stack test --system-ghc --flag minio-hs:live-test
|
|
fi
|
|
|
|
notifications:
|
|
email: false
|