Skip to content

Commit 0f1a03f

Browse files
committed
Regenerate .travis.yml.
1 parent d886502 commit 0f1a03f

File tree

1 file changed

+38
-29
lines changed

1 file changed

+38
-29
lines changed

.travis.yml

Lines changed: 38 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# This Travis job script has been generated by a script via
22
#
3-
# runghc make_travis_yml_2.hs '-o' '.travis.yml' 'OpenGLRaw.cabal'
3+
# runghc make_travis_yml_2.hs '--ghc-head' '-o' '.travis.yml' 'OpenGLRaw.cabal'
44
#
5-
# For more information, see https://github.com/hvr/multi-ghc-travis
5+
# For more information, see https://github.com/haskell-CI/haskell-ci
66
#
77
language: c
88
sudo: false
99

1010
git:
11-
submodules: true # whether to recursively clone submodules
11+
submodules: false # whether to recursively clone submodules
1212

1313
cache:
1414
directories:
@@ -28,28 +28,26 @@ before_cache:
2828

2929
matrix:
3030
include:
31-
- compiler: "ghc-7.8.4"
32-
# env: TEST=--disable-tests BENCH=--disable-benchmarks
33-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.8.4], sources: [hvr-ghc]}}
34-
- compiler: "ghc-7.10.3"
31+
- compiler: "ghc-8.6.3"
3532
# env: TEST=--disable-tests BENCH=--disable-benchmarks
36-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.10.3], sources: [hvr-ghc]}}
37-
- compiler: "ghc-8.0.2"
33+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.3], sources: [hvr-ghc]}}
34+
- compiler: "ghc-8.4.3"
3835
# env: TEST=--disable-tests BENCH=--disable-benchmarks
39-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.0.2], sources: [hvr-ghc]}}
36+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.4.3], sources: [hvr-ghc]}}
4037
- compiler: "ghc-8.2.2"
4138
# env: TEST=--disable-tests BENCH=--disable-benchmarks
42-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.2.2], sources: [hvr-ghc]}}
43-
- compiler: "ghc-8.4.3"
39+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.2.2], sources: [hvr-ghc]}}
40+
- compiler: "ghc-8.0.2"
4441
# env: TEST=--disable-tests BENCH=--disable-benchmarks
45-
env: HADDOCK=false
46-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.4.3], sources: [hvr-ghc]}}
47-
- compiler: "ghc-8.6.3"
42+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.0.2], sources: [hvr-ghc]}}
43+
- compiler: "ghc-7.10.3"
44+
# env: TEST=--disable-tests BENCH=--disable-benchmarks
45+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.10.3], sources: [hvr-ghc]}}
46+
- compiler: "ghc-7.8.4"
4847
# env: TEST=--disable-tests BENCH=--disable-benchmarks
49-
env: HADDOCK=false
50-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.6.3], sources: [hvr-ghc]}}
48+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.8.4], sources: [hvr-ghc]}}
5149
- compiler: "ghc-head"
52-
env: GHCHEAD=true HADDOCK=false
50+
env: GHCHEAD=true
5351
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-head], sources: [hvr-ghc]}}
5452

5553
allow_failures:
@@ -71,15 +69,17 @@ install:
7169
- BENCH=${BENCH---enable-benchmarks}
7270
- TEST=${TEST---enable-tests}
7371
- HADDOCK=${HADDOCK-true}
74-
- INSTALLED=${INSTALLED-true}
72+
- UNCONSTRAINED=${UNCONSTRAINED-true}
73+
- NOINSTALLEDCONSTRAINTS=${NOINSTALLEDCONSTRAINTS-false}
7574
- GHCHEAD=${GHCHEAD-false}
7675
- travis_retry cabal update -v
7776
- "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
7877
- rm -fv cabal.project cabal.project.local
7978
# Overlay Hackage Package Index for GHC HEAD: https://github.com/hvr/head.hackage
8079
- |
8180
if $GHCHEAD; then
82-
sed -i.bak 's/-- allow-newer:.*/allow-newer: *:base, *:template-haskell, *:ghc, *:Cabal/' ${HOME}/.cabal/config
81+
sed -i 's/-- allow-newer: .*/allow-newer: *:base/' ${HOME}/.cabal/config
82+
for pkg in $($HCPKG list --simple-output); do pkg=$(echo $pkg | sed 's/-[^-]*$//'); sed -i "s/allow-newer: /allow-newer: *:$pkg, /" ${HOME}/.cabal/config; done
8383
8484
echo 'repository head.hackage' >> ${HOME}/.cabal/config
8585
echo ' url: http://head.hackage.haskell.org/' >> ${HOME}/.cabal/config
@@ -89,11 +89,17 @@ install:
8989
echo ' 8f79fd2389ab2967354407ec852cbe73f2e8635793ac446d09461ffb99527f6e' >> ${HOME}/.cabal/config
9090
echo ' key-threshold: 3' >> ${HOME}/.cabal.config
9191
92+
grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
93+
9294
cabal new-update head.hackage -v
9395
fi
9496
- grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
9597
- "printf 'packages: \".\"\\n' > cabal.project"
96-
- cat cabal.project
98+
- "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
99+
- touch cabal.project.local
100+
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- OpenGLRaw | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
101+
- cat cabal.project || true
102+
- cat cabal.project.local || true
97103
- if [ -f "./configure.ac" ]; then
98104
(cd "." && autoreconf -i);
99105
fi
@@ -107,27 +113,30 @@ install:
107113
# any command which exits with a non-zero exit code causes the build to fail.
108114
script:
109115
# test that source-distributions can be generated
110-
- (cd "." && cabal sdist)
111-
- mv "."/dist/OpenGLRaw-*.tar.gz ${DISTDIR}/
116+
- cabal new-sdist all
117+
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
112118
- cd ${DISTDIR} || false
113119
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
114120
- "printf 'packages: OpenGLRaw-*/*.cabal\\n' > cabal.project"
115-
- cat cabal.project
121+
- "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
122+
- touch cabal.project.local
123+
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- OpenGLRaw | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
124+
- cat cabal.project || true
125+
- cat cabal.project.local || true
116126
# this builds all libraries and executables (without tests/benchmarks)
117127
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
118128

119-
# Build with installed constraints for packages in global-db
120-
- if $INSTALLED; then echo cabal new-build -w ${HC} --disable-tests --disable-benchmarks $(${HCPKG} list --global --simple-output --names-only | sed 's/\([a-zA-Z0-9-]\{1,\}\) */--constraint="\1 installed" /g') all | sh; else echo "Not building with installed constraints"; fi
121-
122129
# build & run tests, build benchmarks
123130
- cabal new-build -w ${HC} ${TEST} ${BENCH} all
124131

125132
# cabal check
126133
- (cd OpenGLRaw-* && cabal check)
127134

128135
# haddock
129-
- rm -rf ./dist-newstyle
130136
- if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
131137

132-
# REGENDATA ["-o",".travis.yml","OpenGLRaw.cabal"]
138+
# Build without installed constraints for packages in global-db
139+
- if $UNCONSTRAINED; then rm -f cabal.project.local; echo cabal new-build -w ${HC} --disable-tests --disable-benchmarks all; else echo "Not building without installed constraints"; fi
140+
141+
# REGENDATA ["--ghc-head","-o",".travis.yml","OpenGLRaw.cabal"]
133142
# EOF

0 commit comments

Comments
 (0)