forked from opensuse-haskell/configuration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
43 lines (37 loc) · 1.42 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# .travis.yml
dist: bionic
language: c
cache:
directories:
- $HOME/.cabal/packages
- $HOME/.cabal/store
- $HOME/build/opensuse-haskell/configuration/_build
before_cache:
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
# remove files that are regenerated by 'cabal update'
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.*
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/*.json
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.cache
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx
before_install:
- unset CC
- sudo add-apt-repository ppa:hvr/ghc -y
- sudo apt-get update -q
- sudo apt-get install cabal-install-3.2 ghc-8.10.2 rpm -y
- export PATH="$HOME/.cabal/bin:/opt/ghc/bin:/opt/cabal/bin:$PATH"
install:
- python3 --version
- cabal --version
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
- travis_retry cabal v2-update
- "sed -i 's/^jobs:.*/jobs: 2/' $HOME/.cabal/config"
- cabal v2-install shelltestrunner doctest hlint weeder
script:
- rm -f _build/*/*/*.changes
- cabal v2-run --write-ghc-environment-files=always cabal2obs -- --keep-going -j2
- cabal v2-test --write-ghc-environment-files=always all
- tests/run-tests
- for n in src/*; do echo doctesting $n ...; doctest $n; done
- hlint src
- weeder