on master help sign in
Use GHA for CI

Let's try without benchmarks first

commitdf129eccf53461051bba17a31ac83c8a32cdfaa9 authorOleg Grenrus <oleg.grenrus@iki.fi> dateTue 16 Feb 2021, 22:02 (6 years ago) parentbfaf1ef
6 files changed+213−93
.github/workflows/haskell-ci.yml+196 .travis.yml−77 cabal.haskell-ci+2 cabal.project+3−3 uuid-types/uuid-types.cabal+6−7 uuid/uuid.cabal+6−6
.github/workflows/haskell-ci.ymlnew file+196
@@ -0,0 +1,196 @@
1+# This GitHub workflow config has been generated by a script via
2+#
3+# haskell-ci 'github' 'cabal.project'
4+#
5+# To regenerate the script (for example after adjusting tested-with) run
6+#
7+# haskell-ci regenerate
8+#
9+# For more information, see https://github.com/haskell-CI/haskell-ci
10+#
11+# version: 0.11.20210214
12+#
13+# REGENDATA ("0.11.20210214",["github","cabal.project"])
14+#
15+name: Haskell-CI
16+on:
17+ push:
18+ branches:
19+ - master
20+ pull_request:
21+ branches:
22+ - master
23+jobs:
24+ linux:
25+ name: Haskell-CI - Linux - GHC ${{ matrix.ghc }}
26+ runs-on: ubuntu-18.04
27+ container:
28+ image: buildpack-deps:bionic
29+ continue-on-error: ${{ matrix.allow-failure }}
30+ strategy:
31+ matrix:
32+ include:
33+ - ghc: 8.10.3
34+ allow-failure: false
35+ - ghc: 8.8.4
36+ allow-failure: false
37+ - ghc: 8.6.4
38+ allow-failure: false
39+ - ghc: 8.4.4
40+ allow-failure: false
41+ - ghc: 8.2.2
42+ allow-failure: false
43+ - ghc: 8.0.2
44+ allow-failure: false
45+ - ghc: 7.10.3
46+ allow-failure: false
47+ - ghc: 7.8.4
48+ allow-failure: false
49+ - ghc: 7.6.3
50+ allow-failure: false
51+ - ghc: 7.4.2
52+ allow-failure: false
53+ fail-fast: false
54+ steps:
55+ - name: apt
56+ run: |
57+ apt-get update
58+ apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common
59+ apt-add-repository -y 'ppa:hvr/ghc'
60+ apt-get update
61+ apt-get install -y ghc-$GHC_VERSION cabal-install-3.2
62+ env:
63+ GHC_VERSION: ${{ matrix.ghc }}
64+ - name: Set PATH and environment variables
65+ run: |
66+ echo "$HOME/.cabal/bin" >> $GITHUB_PATH
67+ echo "LANG=C.UTF-8" >> $GITHUB_ENV
68+ echo "CABAL_DIR=$HOME/.cabal" >> $GITHUB_ENV
69+ echo "CABAL_CONFIG=$HOME/.cabal/config" >> $GITHUB_ENV
70+ HC=/opt/ghc/$GHC_VERSION/bin/ghc
71+ echo "HC=$HC" >> $GITHUB_ENV
72+ echo "HCPKG=/opt/ghc/$GHC_VERSION/bin/ghc-pkg" >> $GITHUB_ENV
73+ echo "HADDOCK=/opt/ghc/$GHC_VERSION/bin/haddock" >> $GITHUB_ENV
74+ echo "CABAL=/opt/cabal/3.2/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV
75+ HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
76+ echo "HCNUMVER=$HCNUMVER" >> $GITHUB_ENV
77+ echo "ARG_TESTS=--enable-tests" >> $GITHUB_ENV
78+ echo "ARG_BENCH=--disable-benchmarks" >> $GITHUB_ENV
79+ echo "HEADHACKAGE=false" >> $GITHUB_ENV
80+ echo "ARG_COMPILER=--ghc --with-compiler=/opt/ghc/$GHC_VERSION/bin/ghc" >> $GITHUB_ENV
81+ echo "GHCJSARITH=0" >> $GITHUB_ENV
82+ env:
83+ GHC_VERSION: ${{ matrix.ghc }}
84+ - name: env
85+ run: |
86+ env
87+ - name: write cabal config
88+ run: |
89+ mkdir -p $CABAL_DIR
90+ cat >> $CABAL_CONFIG <<EOF
91+ remote-build-reporting: anonymous
92+ write-ghc-environment-files: never
93+ remote-repo-cache: $CABAL_DIR/packages
94+ logs-dir: $CABAL_DIR/logs
95+ world-file: $CABAL_DIR/world
96+ extra-prog-path: $CABAL_DIR/bin
97+ symlink-bindir: $CABAL_DIR/bin
98+ installdir: $CABAL_DIR/bin
99+ build-summary: $CABAL_DIR/logs/build.log
100+ store-dir: $CABAL_DIR/store
101+ install-dirs user
102+ prefix: $CABAL_DIR
103+ repository hackage.haskell.org
104+ url: http://hackage.haskell.org/
105+ EOF
106+ cat $CABAL_CONFIG
107+ - name: versions
108+ run: |
109+ $HC --version || true
110+ $HC --print-project-git-commit-id || true
111+ $CABAL --version || true
112+ - name: update cabal index
113+ run: |
114+ $CABAL v2-update -v
115+ - name: install cabal-plan
116+ run: |
117+ mkdir -p $HOME/.cabal/bin
118+ curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2.0/cabal-plan-0.6.2.0-x86_64-linux.xz > cabal-plan.xz
119+ echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
120+ xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
121+ rm -f cabal-plan.xz
122+ chmod a+x $HOME/.cabal/bin/cabal-plan
123+ cabal-plan --version
124+ - name: checkout
125+ uses: actions/checkout@v2
126+ with:
127+ path: source
128+ - name: initial cabal.project for sdist
129+ run: |
130+ touch cabal.project
131+ echo "packages: $GITHUB_WORKSPACE/source/uuid-types" >> cabal.project
132+ echo "packages: $GITHUB_WORKSPACE/source/uuid" >> cabal.project
133+ cat cabal.project
134+ - name: sdist
135+ run: |
136+ mkdir -p sdist
137+ $CABAL sdist all --output-dir $GITHUB_WORKSPACE/sdist
138+ - name: unpack
139+ run: |
140+ mkdir -p unpacked
141+ find sdist -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C $GITHUB_WORKSPACE/unpacked -xzvf {} \;
142+ - name: generate cabal.project
143+ run: |
144+ PKGDIR_uuid_types="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/uuid-types-[0-9.]*')"
145+ echo "PKGDIR_uuid_types=${PKGDIR_uuid_types}" >> $GITHUB_ENV
146+ PKGDIR_uuid="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/uuid-[0-9.]*')"
147+ echo "PKGDIR_uuid=${PKGDIR_uuid}" >> $GITHUB_ENV
148+ touch cabal.project
149+ touch cabal.project.local
150+ echo "packages: ${PKGDIR_uuid_types}" >> cabal.project
151+ echo "packages: ${PKGDIR_uuid}" >> cabal.project
152+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package uuid-types" >> cabal.project ; fi
153+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
154+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package uuid" >> cabal.project ; fi
155+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
156+ cat >> cabal.project <<EOF
157+ EOF
158+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(uuid|uuid-types)$/; }' >> cabal.project.local
159+ cat cabal.project
160+ cat cabal.project.local
161+ - name: dump install plan
162+ run: |
163+ $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
164+ cabal-plan
165+ - name: cache
166+ uses: actions/cache@v2
167+ with:
168+ key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
169+ path: ~/.cabal/store
170+ restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
171+ - name: install dependencies
172+ run: |
173+ $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all
174+ $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only -j2 all
175+ - name: build w/o tests
176+ run: |
177+ $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
178+ - name: build
179+ run: |
180+ $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
181+ - name: tests
182+ run: |
183+ $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
184+ - name: cabal check
185+ run: |
186+ cd ${PKGDIR_uuid_types} || false
187+ ${CABAL} -vnormal check
188+ cd ${PKGDIR_uuid} || false
189+ ${CABAL} -vnormal check
190+ - name: haddock
191+ run: |
192+ $CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
193+ - name: unconstrained build
194+ run: |
195+ rm -f cabal.project.local
196+ $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
.travis.ymldeleted−77
@@ -1,77 +0,0 @@
1−# This Travis job script has been generated by a script via
2−#
3−# make_travis_yml_2.hs 'uuid-types.cabal'
4−#
5−# For more information, see https://github.com/hvr/multi-ghc-travis
6−#
7−language: c
8−sudo: false
9−dist: trusty
10−
11−git:
12− submodules: false # whether to recursively clone submodules
13−
14−cache:
15− directories:
16− - $HOME/.cabal/packages
17− - $HOME/.cabal/store
18−
19−before_cache:
20− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
21− # remove files that are regenerated by 'cabal update'
22− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.*
23− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/*.json
24− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.cache
25− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar
26− - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx
27−
28−matrix:
29− include:
30− # - compiler: "ghc-7.0.4"
31− # # env: TEST=--disable-tests BENCH=--disable-benchmarks
32− # addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.0.4], sources: [hvr-ghc]}}
33− - compiler: "ghc-7.4.2"
34− # env: TEST=--disable-tests BENCH=--disable-benchmarks
35− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.4.2], sources: [hvr-ghc]}}
36− - compiler: "ghc-7.6.3"
37− # env: TEST=--disable-tests BENCH=--disable-benchmarks
38− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.6.3], sources: [hvr-ghc]}}
39− - compiler: "ghc-7.8.4"
40− # env: TEST=--disable-tests BENCH=--disable-benchmarks
41− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.8.4], sources: [hvr-ghc]}}
42− - compiler: "ghc-7.10.3"
43− # env: TEST=--disable-tests BENCH=--disable-benchmarks
44− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.10.3], sources: [hvr-ghc]}}
45− - compiler: "ghc-8.0.2"
46− # env: TEST=--disable-tests BENCH=--disable-benchmarks
47− addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.0.2], sources: [hvr-ghc]}}
48−
49−before_install:
50− - HC=${CC}
51− - unset CC
52− - PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$PATH
53−
54−install:
55− - cabal --version
56− - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
57− - travis_retry cabal update -v
58− - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
59−
60− - cabal new-build -w ${HC} --dep -j2 all
61−
62−# Here starts the actual work to be performed for the package under test;
63−# any command which exits with a non-zero exit code causes the build to fail.
64−script:
65− - cd uuid-types/
66− - cabal sdist
67− - cabal new-build -w ${HC} -j1
68− - cabal new-test -w ${HC}
69− - cd ..
70−
71− - cd uuid/
72− - cabal sdist
73− - cabal new-build -w ${HC} -j1
74− - cabal new-test -w ${HC}
75− - cd ..
76−
77−# EOF
cabal.haskell-cinew file+2
@@ -0,0 +1,2 @@
1+branches: master
2+benchmarks: False
cabal.project+3−3
@@ -6,12 +6,12 @@ packages: uuid-types/
66
77package uuid-types
88 tests: True
9− benchmarks: True
9+ benchmarks: False
1010 -- profiling: True
1111 -- profiling-detail: toplevel-functions
1212
1313package uuid
1414 tests: True
15− benchmarks: True
15+ benchmarks: False
1616 -- profiling: True
17− -- profiling-detail: toplevel-functions
17+ -- profiling-detail: toplevel-functions
uuid-types/uuid-types.cabal+6−7
@@ -10,7 +10,7 @@ license: BSD3
1010license-file: LICENSE
1111category: Data
1212build-type: Simple
13−tested-with: GHC==8.4.1, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2
13+tested-with: GHC==8.10.3, GHC==8.8.4, GHC==8.6.4, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2
1414
1515synopsis: Type definitions for Universally Unique Identifiers
1616description:
@@ -39,8 +39,7 @@ Library
3939 , binary >= 0.4 && < 0.9
4040 , bytestring >= 0.9 && < 0.11
4141 , deepseq >= 1.3 && < 1.5
42− , hashable (>= 1.1.1.0 && < 1.2)
43− || (>= 1.2.1 && < 1.3)
42+ , hashable >= 1.2.7.0 && < 1.4
4443 , random >= 1.0.1 && < 1.2
4544 , text >= 1.2.3 && < 1.3
4645
@@ -69,9 +68,9 @@ test-suite testuuid
6968 , binary
7069 , bytestring
7170 -- deps w/o inherited constraints
72− , QuickCheck == 2.11.*
71+ , QuickCheck == 2.14.*
7372 , ghc-byteorder == 4.11.*
74− , tasty == 1.0.*
73+ , tasty >= 1.4.0.1 && <1.5
7574 , tasty-hunit == 0.10.*
7675 , tasty-quickcheck == 0.10.*
7776
@@ -89,6 +88,6 @@ benchmark benchmark
8988 , bytestring
9089 , random
9190 -- deps w/o inherited constraints
92− , containers >= 0.4 && < 0.6
93− , criterion == 1.4.*
91+ , containers >= 0.4 && < 0.7
92+ , criterion == 1.5.*
9493 , unordered-containers >= 0.2.7 && < 0.3
uuid/uuid.cabal+6−6
@@ -9,7 +9,7 @@ License: BSD3
99License-file: LICENSE
1010Category: Data
1111Build-Type: Simple
12−Tested-With: GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2
12+tested-with: GHC==8.10.3, GHC==8.8.4, GHC==8.6.4, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2
1313
1414Synopsis: For creating, comparing, parsing and printing Universally Unique Identifiers
1515Description:
@@ -32,13 +32,13 @@ Source-Repository head
3232Library
3333 Build-Depends: base >= 4.3 && < 5
3434 , binary >= 0.4 && < 0.9
35− , bytestring >= 0.10 && < 0.11
35+ , bytestring >= 0.9 && < 0.11
3636 , cryptohash-sha1 >= 0.11.100 && < 0.12
3737 , cryptohash-md5 >= 0.11.100 && < 0.12
3838 , entropy >= 0.3.7 && < 0.5
3939 , network-info == 0.2.*
4040 , random >= 1.0.1 && < 1.2
41− , time >= 1.1 && < 1.9
41+ , time >= 1.1 && < 1.12
4242 , text >= 1.2.3 && < 1.3
4343 , uuid-types >= 1.0.2 && < 2
4444
@@ -73,8 +73,8 @@ Test-Suite testuuid
7373 , bytestring
7474 , random
7575 -- deps w/o inherited constraints
76− , QuickCheck == 2.11.*
77− , tasty == 1.0.*
76+ , QuickCheck == 2.14.*
77+ , tasty >= 1.4.0.1 && <1.5
7878 , tasty-hunit == 0.10.*
7979 , tasty-quickcheck == 0.10.*
8080
@@ -91,5 +91,5 @@ benchmark benchmark
9191 , base
9292 , random
9393 -- deps w/o inherited constraints
94− , criterion == 1.4.*
94+ , criterion == 1.5.*
9595 , mersenne-random-pure64 == 0.2.*