Skip executeFile001 in threaded2 way
[packages/unix.git] / .travis.yml
1 # This Travis job script has been generated by a script via
2 #
3 #   haskell-ci '--output=.travis.yml' '--config=cabal.haskell-ci' 'cabal.project'
4 #
5 # For more information, see https://github.com/haskell-CI/haskell-ci
6 #
7 # version: 0.3.20190429
8 #
9 language: c
10 dist: xenial
11 git:
12   # whether to recursively clone submodules
13   submodules: false
14 cache:
15   directories:
16     - $HOME/.cabal/packages
17     - $HOME/.cabal/store
18 before_cache:
19   - rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
20   # remove files that are regenerated by 'cabal update'
21   - rm -fv $CABALHOME/packages/hackage.haskell.org/00-index.*
22   - rm -fv $CABALHOME/packages/hackage.haskell.org/*.json
23   - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.cache
24   - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
25   - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
26   - rm -rfv $CABALHOME/packages/head.hackage
27 matrix:
28   include:
29     - compiler: ghc-8.8.1
30       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.8.1","cabal-install-3.0"]}}
31       env: GHCHEAD=true
32     - compiler: ghc-8.6.5
33       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-2.4"]}}
34     - compiler: ghc-8.6.4
35       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.4","cabal-install-2.4"]}}
36     - compiler: ghc-8.6.3
37       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.3","cabal-install-2.4"]}}
38     - compiler: ghc-8.6.2
39       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.2","cabal-install-2.4"]}}
40     - compiler: ghc-8.6.1
41       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.1","cabal-install-2.4"]}}
42     - compiler: ghc-8.4.4
43       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.4.4","cabal-install-2.4"]}}
44     - compiler: ghc-8.4.3
45       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.4.3","cabal-install-2.4"]}}
46     - compiler: ghc-8.4.2
47       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.4.2","cabal-install-2.4"]}}
48     - compiler: ghc-8.4.1
49       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.4.1","cabal-install-2.4"]}}
50     - compiler: ghc-8.2.2
51       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.2.2","cabal-install-2.4"]}}
52     - compiler: ghc-8.2.1
53       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.2.1","cabal-install-2.4"]}}
54     - compiler: ghc-8.0.2
55       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.0.2","cabal-install-2.4"]}}
56     - compiler: ghc-8.0.1
57       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.0.1","cabal-install-2.4"]}}
58     - compiler: ghc-7.10.3
59       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.10.3","cabal-install-2.4"]}}
60     - compiler: ghc-7.10.2
61       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.10.2","cabal-install-2.4"]}}
62     - compiler: ghc-7.10.1
63       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.10.1","cabal-install-2.4"]}}
64     - compiler: ghc-7.8.4
65       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.8.4","cabal-install-2.4"]}}
66     - compiler: ghc-7.8.3
67       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.8.3","cabal-install-2.4"]}}
68     - compiler: ghc-7.8.2
69       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.8.2","cabal-install-2.4"]}}
70     - compiler: ghc-7.8.1
71       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.8.1","cabal-install-2.4"]}}
72     - compiler: ghc-7.6.3
73       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.6.3","cabal-install-2.4"]}}
74     - compiler: ghc-7.6.2
75       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.6.2","cabal-install-2.4"]}}
76     - compiler: ghc-7.6.1
77       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.6.1","cabal-install-2.4"]}}
78     - compiler: ghc-7.4.2
79       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.4.2","cabal-install-2.4"]}}
80     - compiler: ghc-7.4.1
81       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.4.1","cabal-install-2.4"]}}
82     - compiler: ghc-head
83       addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-head","cabal-install-head"]}}
84       env: GHCHEAD=true
85   allow_failures:
86     - compiler: ghc-head
87     - compiler: ghc-8.8.1
88 before_install:
89   - HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
90   - HCPKG="$HC-pkg"
91   - unset CC
92   - CABAL=/opt/ghc/bin/cabal
93   - CABALHOME=$HOME/.cabal
94   - export PATH="$CABALHOME/bin:$PATH"
95   - TOP=$(pwd)
96   - HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
97   - echo $HCNUMVER
98   - CABAL="$CABAL -vnormal+nowrap+markoutput"
99   - set -o pipefail
100   - |
101     echo 'function blue(s) { printf "\033[0;34m" s "\033[0m " }'           >> .colorful.awk
102     echo 'BEGIN { state = "output"; }'                                     >> .colorful.awk
103     echo '/^-----BEGIN CABAL OUTPUT-----$/ { state = "cabal" }'            >> .colorful.awk
104     echo '/^-----END CABAL OUTPUT-----$/ { state = "output" }'             >> .colorful.awk
105     echo '!/^(-----BEGIN CABAL OUTPUT-----|-----END CABAL OUTPUT-----)/ {' >> .colorful.awk
106     echo '  if (state == "cabal") {'                                       >> .colorful.awk
107     echo '    print blue($0)'                                              >> .colorful.awk
108     echo '  } else {'                                                      >> .colorful.awk
109     echo '    print $0'                                                    >> .colorful.awk
110     echo '  }'                                                             >> .colorful.awk
111     echo '}'                                                               >> .colorful.awk
112   - cat .colorful.awk
113   - |
114     color_cabal_output () {
115       awk -f $TOP/.colorful.awk
116     }
117   - echo text | color_cabal_output
118 install:
119   - ${CABAL} --version
120   - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
121   - TEST=--enable-tests
122   - BENCH=--enable-benchmarks
123   - GHCHEAD=${GHCHEAD-false}
124   - rm -f $CABALHOME/config
125   - |
126     echo "verbose: normal +nowrap +markoutput"          >> $CABALHOME/config
127     echo "remote-build-reporting: anonymous"            >> $CABALHOME/config
128     echo "remote-repo-cache: $CABALHOME/packages"       >> $CABALHOME/config
129     echo "logs-dir:          $CABALHOME/logs"           >> $CABALHOME/config
130     echo "world-file:        $CABALHOME/world"          >> $CABALHOME/config
131     echo "extra-prog-path:   $CABALHOME/bin"            >> $CABALHOME/config
132     echo "symlink-bindir:    $CABALHOME/bin"            >> $CABALHOME/config
133     echo "installdir:        $CABALHOME/bin"            >> $CABALHOME/config
134     echo "build-summary:     $CABALHOME/logs/build.log" >> $CABALHOME/config
135     echo "store-dir:         $CABALHOME/store"          >> $CABALHOME/config
136     echo "install-dirs user"                            >> $CABALHOME/config
137     echo "  prefix: $CABALHOME"                         >> $CABALHOME/config
138     echo "repository hackage.haskell.org"               >> $CABALHOME/config
139     echo "  url: http://hackage.haskell.org/"           >> $CABALHOME/config
140   - |
141     if $GHCHEAD; then
142     echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1/g')" >> $CABALHOME/config
143     
144     echo "repository head.hackage"                                                        >> $CABALHOME/config
145     echo "   url: http://head.hackage.haskell.org/"                                       >> $CABALHOME/config
146     echo "   secure: True"                                                                >> $CABALHOME/config
147     echo "   root-keys: 07c59cb65787dedfaef5bd5f987ceb5f7e5ebf88b904bbd4c5cbdeb2ff71b740" >> $CABALHOME/config
148     echo "              2e8555dde16ebd8df076f1a8ef13b8f14c66bad8eafefd7d9e37d0ed711821fb" >> $CABALHOME/config
149     echo "              8f79fd2389ab2967354407ec852cbe73f2e8635793ac446d09461ffb99527f6e" >> $CABALHOME/config
150     echo "   key-threshold: 3"                                                            >> $CABALHOME/config
151     fi
152   - cat $CABALHOME/config
153   - rm -fv cabal.project cabal.project.local cabal.project.freeze
154   - travis_retry ${CABAL} v2-update -v
155   # Generate cabal.project
156   - rm -rf cabal.project cabal.project.local cabal.project.freeze
157   - touch cabal.project
158   - |
159     echo 'packages: "."' >> cabal.project
160   - |
161     echo "write-ghc-environment-files: always" >> cabal.project
162   - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(unix)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
163   - cat cabal.project || true
164   - cat cabal.project.local || true
165   - if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
166   - ${CABAL} v2-freeze -w ${HC} ${TEST} ${BENCH} | color_cabal_output
167   - "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
168   - rm  cabal.project.freeze
169   - ${CABAL} v2-build -w ${HC} ${TEST} ${BENCH} --dep -j2 all | color_cabal_output
170   - ${CABAL} v2-build -w ${HC} --disable-tests --disable-benchmarks --dep -j2 all | color_cabal_output
171 script:
172   - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
173   # Packaging...
174   - ${CABAL} v2-sdist all | color_cabal_output
175   # Unpacking...
176   - mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
177   - cd ${DISTDIR} || false
178   - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
179   # Generate cabal.project
180   - rm -rf cabal.project cabal.project.local cabal.project.freeze
181   - touch cabal.project
182   - |
183     echo 'packages: "unix-*/*.cabal"' >> cabal.project
184   - |
185     echo "write-ghc-environment-files: always" >> cabal.project
186   - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(unix)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
187   - cat cabal.project || true
188   - cat cabal.project.local || true
189   # Building...
190   # this builds all libraries and executables (without tests/benchmarks)
191   - ${CABAL} v2-build -w ${HC} --disable-tests --disable-benchmarks all | color_cabal_output
192   # Building with tests and benchmarks...
193   # build & run tests, build benchmarks
194   - ${CABAL} v2-build -w ${HC} ${TEST} ${BENCH} all | color_cabal_output
195   # cabal check...
196   - (cd unix-* && ${CABAL} -vnormal check)
197   # haddock...
198   - ${CABAL} v2-haddock -w ${HC} ${TEST} ${BENCH} all | color_cabal_output
199
200 # REGENDATA ["--output=.travis.yml","--config=cabal.haskell-ci","cabal.project"]
201 # EOF