on master help sign in
Use GHA for CI
df129ecOleg Grenrus
.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/
6
6
7package uuid-types
7package uuid-types
8 tests: True
8 tests: True
9− benchmarks: True
9+ benchmarks: False
10 -- profiling: True
10 -- profiling: True
11 -- profiling-detail: toplevel-functions
11 -- profiling-detail: toplevel-functions
12
12
13package uuid
13package uuid
14 tests: True
14 tests: True
15− benchmarks: True
15+ benchmarks: False
16 -- profiling: True
16 -- 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
10license-file: LICENSE
10license-file: LICENSE
11category: Data
11category: Data
12build-type: Simple
12build-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
14
14
15synopsis: Type definitions for Universally Unique Identifiers
15synopsis: Type definitions for Universally Unique Identifiers
16description:
16description:
@@ -39,8 +39,7 @@ Library
39 , binary >= 0.4 && < 0.9
39 , binary >= 0.4 && < 0.9
40 , bytestring >= 0.9 && < 0.11
40 , bytestring >= 0.9 && < 0.11
41 , deepseq >= 1.3 && < 1.5
41 , deepseq >= 1.3 && < 1.5
42− , hashable (>= 1.1.1.0 && < 1.2)
42+ , hashable >= 1.2.7.0 && < 1.4
43− || (>= 1.2.1 && < 1.3)
44 , random >= 1.0.1 && < 1.2
43 , random >= 1.0.1 && < 1.2
45 , text >= 1.2.3 && < 1.3
44 , text >= 1.2.3 && < 1.3
46
45
@@ -69,9 +68,9 @@ test-suite testuuid
69 , binary
68 , binary
70 , bytestring
69 , bytestring
71 -- deps w/o inherited constraints
70 -- deps w/o inherited constraints
72− , QuickCheck == 2.11.*
71+ , QuickCheck == 2.14.*
73 , ghc-byteorder == 4.11.*
72 , ghc-byteorder == 4.11.*
74− , tasty == 1.0.*
73+ , tasty >= 1.4.0.1 && <1.5
75 , tasty-hunit == 0.10.*
74 , tasty-hunit == 0.10.*
76 , tasty-quickcheck == 0.10.*
75 , tasty-quickcheck == 0.10.*
77
76
@@ -89,6 +88,6 @@ benchmark benchmark
89 , bytestring
88 , bytestring
90 , random
89 , random
91 -- deps w/o inherited constraints
90 -- deps w/o inherited constraints
92− , containers >= 0.4 && < 0.6
91+ , containers >= 0.4 && < 0.7
93− , criterion == 1.4.*
92+ , criterion == 1.5.*
94 , unordered-containers >= 0.2.7 && < 0.3
93 , unordered-containers >= 0.2.7 && < 0.3
uuid/uuid.cabal+6−6
@@ -9,7 +9,7 @@ License: BSD3
9License-file: LICENSE
9License-file: LICENSE
10Category: Data
10Category: Data
11Build-Type: Simple
11Build-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
13
13
14Synopsis: For creating, comparing, parsing and printing Universally Unique Identifiers
14Synopsis: For creating, comparing, parsing and printing Universally Unique Identifiers
15Description:
15Description:
@@ -32,13 +32,13 @@ Source-Repository head
32Library
32Library
33 Build-Depends: base >= 4.3 && < 5
33 Build-Depends: base >= 4.3 && < 5
34 , binary >= 0.4 && < 0.9
34 , binary >= 0.4 && < 0.9
35− , bytestring >= 0.10 && < 0.11
35+ , bytestring >= 0.9 && < 0.11
36 , cryptohash-sha1 >= 0.11.100 && < 0.12
36 , cryptohash-sha1 >= 0.11.100 && < 0.12
37 , cryptohash-md5 >= 0.11.100 && < 0.12
37 , cryptohash-md5 >= 0.11.100 && < 0.12
38 , entropy >= 0.3.7 && < 0.5
38 , entropy >= 0.3.7 && < 0.5
39 , network-info == 0.2.*
39 , network-info == 0.2.*
40 , random >= 1.0.1 && < 1.2
40 , random >= 1.0.1 && < 1.2
41− , time >= 1.1 && < 1.9
41+ , time >= 1.1 && < 1.12
42 , text >= 1.2.3 && < 1.3
42 , text >= 1.2.3 && < 1.3
43 , uuid-types >= 1.0.2 && < 2
43 , uuid-types >= 1.0.2 && < 2
44
44
@@ -73,8 +73,8 @@ Test-Suite testuuid
73 , bytestring
73 , bytestring
74 , random
74 , random
75 -- deps w/o inherited constraints
75 -- deps w/o inherited constraints
76− , QuickCheck == 2.11.*
76+ , QuickCheck == 2.14.*
77− , tasty == 1.0.*
77+ , tasty >= 1.4.0.1 && <1.5
78 , tasty-hunit == 0.10.*
78 , tasty-hunit == 0.10.*
79 , tasty-quickcheck == 0.10.*
79 , tasty-quickcheck == 0.10.*
80
80
@@ -91,5 +91,5 @@ benchmark benchmark
91 , base
91 , base
92 , random
92 , random
93 -- deps w/o inherited constraints
93 -- deps w/o inherited constraints
94− , criterion == 1.4.*
94+ , criterion == 1.5.*
95 , mersenne-random-pure64 == 0.2.*
95 , mersenne-random-pure64 == 0.2.*