Skip to content

Commit 3364f6d

Browse files
committed
Try to get fgl-arbitrary tested again
1 parent f610c11 commit 3364f6d

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.travis.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ install:
119119
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks --project-file="cabal.project" --dep -j2 all
120120
- rm -rf .ghc.environment.* "."/dist
121121
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
122+
- DISTDIRARB=$(mktemp -d /tmp/dist-test.XXXX)
122123

123124
# Here starts the actual work to be performed for the package under test;
124125
# any command which exits with a non-zero exit code causes the build to fail.
@@ -149,5 +150,27 @@ script:
149150
# Build without installed constraints for packages in global-db
150151
- 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
151152

153+
# Check the fgl-arbitrary sub-package
154+
- cd fgl-arbitrary
155+
# Relying upon fgl being installed above when testing sdist, and that
156+
# it doesn't require any other dependencies not used by fgl.
157+
158+
# test that source-distributions can be generated
159+
- cabal new-sdist all
160+
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIRARB}/
161+
- cd ${DISTDIRARB} || false
162+
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
163+
- "printf 'packages: fgl-arbitrary-*/*.cabal\\n' > cabal.project"
164+
- touch cabal.project.local
165+
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- fgl | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
166+
- cat cabal.project || true
167+
- cat cabal.project.local || true
168+
# this builds all libraries and executables (without tests/benchmarks)
169+
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
170+
171+
# build & run tests, build benchmarks
172+
- cabal new-build -w ${HC} ${TEST} ${BENCH} all
173+
- if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} ${BENCH} all; fi
174+
152175
# REGENDATA ["--ghc-head","fgl.cabal"]
153176
# EOF

0 commit comments

Comments
 (0)