Skip to content

Commit

Permalink
Update .travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
maoe committed Mar 2, 2020
1 parent 4662576 commit a2f53cc
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 97 deletions.
119 changes: 44 additions & 75 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This Travis job script has been generated by a script via
#
# haskell-ci 'threadscope.cabal' '--apt' 'libgtk2.0-dev' '--osx' '8.6.5' '--osx' '8.8.1' '--travis-patches' '.travis/osx.patch' '--travis-patches' '.travis/deploy.patch' '--travis-patches' '.travis/allow-failrues.patch'
# haskell-ci 'threadscope.cabal' '--apt' 'libgtk2.0-dev' '--osx' '8.6.5' '--osx' '8.8.2' '--travis-patches' '.travis/deploy.patch' '--travis-patches' '.travis/osx.patch'
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.9.20191126
# version: 0.9.20200225
#
version: ~> 1.0
language: c
Expand All @@ -30,8 +30,8 @@ before_cache:
- rm -rfv $CABALHOME/packages/head.hackage
jobs:
include:
- compiler: ghc-8.8.1
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.8.1","cabal-install-3.0","libgtk2.0-dev"]}}
- compiler: ghc-8.8.2
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.8.2","cabal-install-3.0","libgtk2.0-dev"]}}
os: linux
- compiler: ghc-8.6.5
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.0","libgtk2.0-dev"]}}
Expand All @@ -42,19 +42,16 @@ jobs:
- compiler: ghc-8.2.2
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.2.2","cabal-install-3.0","libgtk2.0-dev"]}}
os: linux
- compiler: ghc-8.8.1
addons: {"homebrew": {"packages":["gtk+", "gtk-mac-integration"]}}
- compiler: ghc-8.8.2
addons: {"homebrew": {"packages":["gcc@9", "gtk+", "gtk-mac-integration", "python3"], "update": true}}
env: PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig
os: osx
osx_image: xcode11
osx_image: xcode11.3
- compiler: ghc-8.6.5
addons: {"homebrew": {"packages":["gtk+", "gtk-mac-integration"]}}
addons: {"homebrew": {"packages":["gcc@9", "gtk+", "gtk-mac-integration", "python3"], "update": true}}
env: PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig
os: osx
osx_image: xcode11
allow_failures:
- compiler: ghc-8.8.1
os: linux
osx_image: xcode11.3
before_install:
- HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
- WITHCOMPILER="-w $HC"
Expand All @@ -70,57 +67,31 @@ before_install:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then HC=$HOME/.ghc-install/ghc/bin/$TRAVIS_COMPILER; WITHCOMPILER="-w $HC"; HCPKG=${HC/ghc/ghc-pkg}; CABAL=$HOME/.ghc-install/ghc/bin/cabal; fi
- "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
- echo $HCNUMVER
- CABAL="$CABAL -vnormal+nowrap+markoutput"
- CABAL="$CABAL -vnormal+nowrap"
- set -o pipefail
- |
echo 'function blue(s) { printf "\033[0;34m" s "\033[0m " }' >> .colorful.awk
echo 'BEGIN { state = "output"; }' >> .colorful.awk
echo '/^-----BEGIN CABAL OUTPUT-----$/ { state = "cabal" }' >> .colorful.awk
echo '/^-----END CABAL OUTPUT-----$/ { state = "output" }' >> .colorful.awk
echo '!/^(-----BEGIN CABAL OUTPUT-----|-----END CABAL OUTPUT-----)/ {' >> .colorful.awk
echo ' if (state == "cabal") {' >> .colorful.awk
echo ' print blue($0)' >> .colorful.awk
echo ' } else {' >> .colorful.awk
echo ' print $0' >> .colorful.awk
echo ' }' >> .colorful.awk
echo '}' >> .colorful.awk
- cat .colorful.awk
- |
color_cabal_output () {
awk -f $TOP/.colorful.awk
}
- echo text | color_cabal_output
install:
- ${CABAL} --version
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
- TEST=--enable-tests
- BENCH=--enable-benchmarks
- HEADHACKAGE=false
- rm -f $CABALHOME/config
- |
echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
echo "remote-build-reporting: anonymous" >> $CABALHOME/config
echo "write-ghc-environment-files: always" >> $CABALHOME/config
echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
echo "world-file: $CABALHOME/world" >> $CABALHOME/config
echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config
echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config
echo "installdir: $CABALHOME/bin" >> $CABALHOME/config
echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config
echo "store-dir: $CABALHOME/store" >> $CABALHOME/config
echo "install-dirs user" >> $CABALHOME/config
echo " prefix: $CABALHOME" >> $CABALHOME/config
echo "repository hackage.haskell.org" >> $CABALHOME/config
echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
echo " secure: True" >> $CABALHOME/config
echo " key-threshold: 3" >> $CABALHOME/config
echo " root-keys:" >> $CABALHOME/config
echo " fe331502606802feac15e514d9b9ea83fee8b6ffef71335479a2e68d84adc6b0" >> $CABALHOME/config
echo " 1ea9ba32c526d1cc91ab5e5bd364ec5e9e8cb67179a471872f6e26f0ae773d42" >> $CABALHOME/config
echo " 2c6c3627bd6c982990239487f1abd02e08a02e6cf16edb105a8012d444d870c3" >> $CABALHOME/config
echo " 0a5c7ea47cd1b15f01f5f51a33adda7e655bc0f0b0615baa8e271f4c3351e21d" >> $CABALHOME/config
echo " 51f0161b906011b52c6613376b1ae937670da69322113a246a09f807c62f6921" >> $CABALHOME/config
echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
echo "remote-build-reporting: anonymous" >> $CABALHOME/config
echo "write-ghc-environment-files: always" >> $CABALHOME/config
echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
echo "world-file: $CABALHOME/world" >> $CABALHOME/config
echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config
echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config
echo "installdir: $CABALHOME/bin" >> $CABALHOME/config
echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config
echo "store-dir: $CABALHOME/store" >> $CABALHOME/config
echo "install-dirs user" >> $CABALHOME/config
echo " prefix: $CABALHOME" >> $CABALHOME/config
echo "repository hackage.haskell.org" >> $CABALHOME/config
echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
install:
- ${CABAL} --version
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
- |
echo "program-default-options" >> $CABALHOME/config
echo " ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config
Expand All @@ -132,25 +103,21 @@ install:
- touch cabal.project
- |
echo "packages: ." >> cabal.project
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then cp cabal.project.osx cabal.project; fi
- |
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(threadscope)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
echo 'constraints: gtk +have-quartz-gtk' >> cabal.project
echo 'allow-newer: Cabal, gtk-mac-integration:gtk' >> cabal.project
fi
- cat cabal.project || true
- cat cabal.project.local || true
- if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
- ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} | color_cabal_output
- ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH}
- "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
- rm cabal.project.freeze
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all | color_cabal_output
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all | color_cabal_output
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all
script:
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
# Packaging...
- ${CABAL} v2-sdist all | color_cabal_output
- ${CABAL} v2-sdist all
# Unpacking...
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
- cd ${DISTDIR} || false
Expand All @@ -163,27 +130,29 @@ script:
- |
echo "packages: ${PKGDIR_threadscope}" >> cabal.project
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
echo "constraints: gtk +have-quartz-gtk" >> cabal.project
echo "package *" >> cabal.project
echo " gcc-location: gcc-9" >> cabal.project
echo "program-locations" >> cabal.project
echo " gcc-location: gcc-9" >> cabal.project
fi
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(threadscope)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
echo 'constraints: gtk +have-quartz-gtk' >> cabal.project
echo 'allow-newer: Cabal, gtk-mac-integration:gtk' >> cabal.project
fi
- cat cabal.project || true
- cat cabal.project.local || true
# Building...
# this builds all libraries and executables (without tests/benchmarks)
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all
# Building with tests and benchmarks...
# build & run tests, build benchmarks
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all
# cabal check...
- (cd ${PKGDIR_threadscope} && ${CABAL} -vnormal check)
# Building without installed constraints for packages in global-db...
- rm -f cabal.project.local
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all

# REGENDATA ("0.9.20191126",["threadscope.cabal","--apt","libgtk2.0-dev","--osx","8.6.5","--osx","8.8.1","--travis-patches",".travis/osx.patch","--travis-patches",".travis/deploy.patch","--travis-patches",".travis/allow-failrues.patch"])
# REGENDATA ("0.9.20200225",["threadscope.cabal","--apt","libgtk2.0-dev","--osx","8.6.5","--osx","8.8.2","--travis-patches",".travis/deploy.patch","--travis-patches",".travis/osx.patch"])
# EOF

before_deploy:
Expand Down
37 changes: 16 additions & 21 deletions .travis/osx.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ index 8d435cb..a8af409 100644
@@ -49,11 +49,15 @@ jobs:
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-7.10.2","cabal-install-3.0","libgtk2.0-dev"]}}
os: linux
- compiler: ghc-8.8.1
- addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.8.1","cabal-install-3.0","libgtk2.0-dev"]}}
+ addons: {"homebrew": {"packages":["gtk+", "gtk-mac-integration"]}}
- compiler: ghc-8.8.2
- addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.8.2","cabal-install-3.0","libgtk2.0-dev"]}}
+ addons: {"homebrew": {"packages":["gcc@9", "gtk+", "gtk-mac-integration", "python3"], "update": true}}
+ env: PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig
os: osx
+ osx_image: xcode11
+ osx_image: xcode11.3
- compiler: ghc-8.6.5
- addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.0","libgtk2.0-dev"]}}
+ addons: {"homebrew": {"packages":["gtk+", "gtk-mac-integration"]}}
+ addons: {"homebrew": {"packages":["gcc@9", "gtk+", "gtk-mac-integration", "python3"], "update": true}}
+ env: PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig
os: osx
+ osx_image: xcode11
+ osx_image: xcode11.3
before_install:
- HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
- WITHCOMPILER="-w $HC"
Expand All @@ -29,25 +29,20 @@ index 8d435cb..a8af409 100644
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then HC=$HOME/.ghc-install/ghc/bin/$TRAVIS_COMPILER; WITHCOMPILER="-w $HC"; HCPKG=${HC/ghc/ghc-pkg}; CABAL=$HOME/.ghc-install/ghc/bin/cabal; fi
- "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
- echo $HCNUMVER
@@ -138,5 +138,10 @@ install:
@@ -103,6 +103,7 @@ install:
- touch cabal.project
- |
echo "packages: ." >> cabal.project
+ - if [ "$TRAVIS_OS_NAME" = "osx" ]; then cp cabal.project.osx cabal.project; fi
- |
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(threadscope)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
+ - |
+ if [ "$TRAVIS_OS_NAME" = "osx" ]; then
+ echo 'constraints: gtk +have-quartz-gtk' >> cabal.project
+ echo 'allow-newer: Cabal, gtk-mac-integration:gtk' >> cabal.project
+ fi
- cat cabal.project || true
- cat cabal.project.local || true
- if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
@@ -167,5 +178,10 @@ script:
@@ -124,7 +124,7 @@ script:
- touch cabal.project
- |
echo "packages: ${PKGDIR_threadscope}" >> cabal.project
- - |
+ - if [ "$TRAVIS_OS_NAME" = "osx" ]; then cp ${PKGDIR_threadscope}/cabal.project.osx cabal.project; fi
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(threadscope)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
+ - |
+ if [ "$TRAVIS_OS_NAME" = "osx" ]; then
+ echo 'constraints: gtk +have-quartz-gtk' >> cabal.project
+ echo 'allow-newer: Cabal, gtk-mac-integration:gtk' >> cabal.project
+ fi
- cat cabal.project || true
- cat cabal.project.local || true
# Building...
2 changes: 1 addition & 1 deletion threadscope.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Extra-source-files: include/windows_cconv.h
Tested-with: GHC == 8.2.2
GHC == 8.4.4
GHC == 8.6.5
GHC == 8.8.1
GHC == 8.8.2

source-repository head
type: git
Expand Down

0 comments on commit a2f53cc

Please sign in to comment.