on master help sign in
Support GHC-9.6.5...9.10.1 (uuid-types)
d1fbad4Oleg Grenrus
.github/workflows/haskell-ci-bench.yml+25−67
@@ -8,9 +8,9 @@
8#
8#
9# For more information, see https://github.com/haskell-CI/haskell-ci
9# For more information, see https://github.com/haskell-CI/haskell-ci
10#
10#
11−# version: 0.19.20240402
11+# version: 0.19.20240514
12#
12#
13−# REGENDATA ("0.19.20240402",["github","--project","cabal.bench.project","-o",".github/workflows/haskell-ci-bench.yml","--github-action-name","Benchmarks"])
13+# REGENDATA ("0.19.20240514",["github","--project","cabal.bench.project","-o",".github/workflows/haskell-ci-bench.yml","--github-action-name","Benchmarks"])
14#
14#
15name: Benchmarks
15name: Benchmarks
16on:
16on:
@@ -27,7 +27,7 @@ jobs:
27 timeout-minutes:
27 timeout-minutes:
28 60
28 60
29 container:
29 container:
30− image: buildpack-deps:bionic
30+ image: buildpack-deps:jammy
31 continue-on-error: ${{ matrix.allow-failure }}
31 continue-on-error: ${{ matrix.allow-failure }}
32 strategy:
32 strategy:
33 matrix:
33 matrix:
@@ -65,27 +65,12 @@ jobs:
65 - compiler: ghc-8.8.4
65 - compiler: ghc-8.8.4
66 compilerKind: ghc
66 compilerKind: ghc
67 compilerVersion: 8.8.4
67 compilerVersion: 8.8.4
68− setup-method: hvr-ppa
68+ setup-method: ghcup
69− allow-failure: false
70− - compiler: ghc-8.6.4
71− compilerKind: ghc
72− compilerVersion: 8.6.4
73− setup-method: hvr-ppa
74− allow-failure: false
75− - compiler: ghc-8.4.4
76− compilerKind: ghc
77− compilerVersion: 8.4.4
78− setup-method: hvr-ppa
79− allow-failure: false
80− - compiler: ghc-8.2.2
81− compilerKind: ghc
82− compilerVersion: 8.2.2
83− setup-method: hvr-ppa
84 allow-failure: false
69 allow-failure: false
85− - compiler: ghc-8.0.2
70+ - compiler: ghc-8.6.5
86 compilerKind: ghc
71 compilerKind: ghc
87− compilerVersion: 8.0.2
72+ compilerVersion: 8.6.5
88− setup-method: hvr-ppa
73+ setup-method: ghcup
89 allow-failure: false
74 allow-failure: false
90 fail-fast: false
75 fail-fast: false
91 steps:
76 steps:
@@ -93,23 +78,11 @@ jobs:
93 run: |
78 run: |
94 apt-get update
79 apt-get update
95 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
80 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
96− if [ "${{ matrix.setup-method }}" = ghcup ]; then
97− mkdir -p "$HOME/.ghcup/bin"
81+ mkdir -p "$HOME/.ghcup/bin"
98− curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
82+ curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
99− chmod a+x "$HOME/.ghcup/bin/ghcup"
83+ chmod a+x "$HOME/.ghcup/bin/ghcup"
100− "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
101− "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
84+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
102− "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
103− else
104− apt-add-repository -y 'ppa:hvr/ghc'
105− apt-get update
106− apt-get install -y "$HCNAME"
107− mkdir -p "$HOME/.ghcup/bin"
108− curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
109− chmod a+x "$HOME/.ghcup/bin/ghcup"
110− "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
111− "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
85+ "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
112− fi
113 env:
86 env:
114 HCKIND: ${{ matrix.compilerKind }}
87 HCKIND: ${{ matrix.compilerKind }}
115 HCNAME: ${{ matrix.compiler }}
88 HCNAME: ${{ matrix.compiler }}
@@ -121,22 +94,13 @@ jobs:
121 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
94 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
122 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
95 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
123 HCDIR=/opt/$HCKIND/$HCVER
96 HCDIR=/opt/$HCKIND/$HCVER
124− if [ "${{ matrix.setup-method }}" = ghcup ]; then
125− HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
97+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
126− HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
98+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
127− HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
99+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
128− echo "HC=$HC" >> "$GITHUB_ENV"
100+ echo "HC=$HC" >> "$GITHUB_ENV"
129− echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
101+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
130− echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
102+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
131− echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
132− else
133− HC=$HCDIR/bin/$HCKIND
134− echo "HC=$HC" >> "$GITHUB_ENV"
135− echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
136− echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
137− echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
103+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
138− fi
139−
140 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
104 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
141 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
105 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
142 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
106 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -193,7 +157,7 @@ jobs:
193 chmod a+x $HOME/.cabal/bin/cabal-plan
157 chmod a+x $HOME/.cabal/bin/cabal-plan
194 cabal-plan --version
158 cabal-plan --version
195 - name: checkout
159 - name: checkout
196− uses: actions/checkout@v3
160+ uses: actions/checkout@v4
197 with:
161 with:
198 path: source
162 path: source
199 - name: initial cabal.project for sdist
163 - name: initial cabal.project for sdist
@@ -217,11 +181,11 @@ jobs:
217 touch cabal.project
181 touch cabal.project
218 touch cabal.project.local
182 touch cabal.project.local
219 echo "packages: ${PKGDIR_uuid_bench}" >> cabal.project
183 echo "packages: ${PKGDIR_uuid_bench}" >> cabal.project
220− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package uuid-bench" >> cabal.project ; fi
184+ echo "package uuid-bench" >> cabal.project
221− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
185+ echo " ghc-options: -Werror=missing-methods" >> cabal.project
222 cat >> cabal.project <<EOF
186 cat >> cabal.project <<EOF
223 EOF
187 EOF
224− $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(uuid-bench)$/; }' >> cabal.project.local
188+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(uuid-bench)$/; }' >> cabal.project.local
225 cat cabal.project
189 cat cabal.project
226 cat cabal.project.local
190 cat cabal.project.local
227 - name: dump install plan
191 - name: dump install plan
@@ -229,7 +193,7 @@ jobs:
229 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
193 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
230 cabal-plan
194 cabal-plan
231 - name: restore cache
195 - name: restore cache
232− uses: actions/cache/restore@v3
196+ uses: actions/cache/restore@v4
233 with:
197 with:
234 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
198 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
235 path: ~/.cabal/store
199 path: ~/.cabal/store
@@ -264,14 +228,8 @@ jobs:
264 cabal-plan topo | sort
228 cabal-plan topo | sort
265 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' --dependencies-only -j2 all
229 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' --dependencies-only -j2 all
266 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all
230 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all
267− - name: constraint set random-1.1
268− run: |
269− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.1.*' all --dry-run ; fi
270− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then cabal-plan topo | sort ; fi
271− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.1.*' --dependencies-only -j2 all ; fi
272− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.1.*' all ; fi
273 - name: save cache
231 - name: save cache
274− uses: actions/cache/save@v3
232+ uses: actions/cache/save@v4
275 if: always()
233 if: always()
276 with:
234 with:
277 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
235 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
.github/workflows/haskell-ci.yml+42−99
@@ -8,9 +8,9 @@
8#
8#
9# For more information, see https://github.com/haskell-CI/haskell-ci
9# For more information, see https://github.com/haskell-CI/haskell-ci
10#
10#
11−# version: 0.19.20240402
11+# version: 0.19.20240514
12#
12#
13−# REGENDATA ("0.19.20240402",["github","cabal.project"])
13+# REGENDATA ("0.19.20240514",["github","cabal.project"])
14#
14#
15name: Haskell-CI
15name: Haskell-CI
16on:
16on:
@@ -27,19 +27,24 @@ jobs:
27 timeout-minutes:
27 timeout-minutes:
28 60
28 60
29 container:
29 container:
30− image: buildpack-deps:bionic
30+ image: buildpack-deps:jammy
31 continue-on-error: ${{ matrix.allow-failure }}
31 continue-on-error: ${{ matrix.allow-failure }}
32 strategy:
32 strategy:
33 matrix:
33 matrix:
34 include:
34 include:
35+ - compiler: ghc-9.10.1
36+ compilerKind: ghc
37+ compilerVersion: 9.10.1
38+ setup-method: ghcup
39+ allow-failure: false
35 - compiler: ghc-9.8.2
40 - compiler: ghc-9.8.2
36 compilerKind: ghc
41 compilerKind: ghc
37 compilerVersion: 9.8.2
42 compilerVersion: 9.8.2
38 setup-method: ghcup
43 setup-method: ghcup
39 allow-failure: false
44 allow-failure: false
40− - compiler: ghc-9.6.4
45+ - compiler: ghc-9.6.5
41 compilerKind: ghc
46 compilerKind: ghc
42− compilerVersion: 9.6.4
47+ compilerVersion: 9.6.5
43 setup-method: ghcup
48 setup-method: ghcup
44 allow-failure: false
49 allow-failure: false
45 - compiler: ghc-9.4.8
50 - compiler: ghc-9.4.8
@@ -65,47 +70,12 @@ jobs:
65 - compiler: ghc-8.8.4
70 - compiler: ghc-8.8.4
66 compilerKind: ghc
71 compilerKind: ghc
67 compilerVersion: 8.8.4
72 compilerVersion: 8.8.4
68− setup-method: hvr-ppa
73+ setup-method: ghcup
69− allow-failure: false
70− - compiler: ghc-8.6.4
71− compilerKind: ghc
72− compilerVersion: 8.6.4
73− setup-method: hvr-ppa
74− allow-failure: false
75− - compiler: ghc-8.4.4
76− compilerKind: ghc
77− compilerVersion: 8.4.4
78− setup-method: hvr-ppa
79− allow-failure: false
80− - compiler: ghc-8.2.2
81− compilerKind: ghc
82− compilerVersion: 8.2.2
83− setup-method: hvr-ppa
84− allow-failure: false
85− - compiler: ghc-8.0.2
86− compilerKind: ghc
87− compilerVersion: 8.0.2
88− setup-method: hvr-ppa
89− allow-failure: false
90− - compiler: ghc-7.10.3
91− compilerKind: ghc
92− compilerVersion: 7.10.3
93− setup-method: hvr-ppa
94− allow-failure: false
95− - compiler: ghc-7.8.4
96− compilerKind: ghc
97− compilerVersion: 7.8.4
98− setup-method: hvr-ppa
99− allow-failure: false
100− - compiler: ghc-7.6.3
101− compilerKind: ghc
102− compilerVersion: 7.6.3
103− setup-method: hvr-ppa
104 allow-failure: false
74 allow-failure: false
105− - compiler: ghc-7.4.2
75+ - compiler: ghc-8.6.5
106 compilerKind: ghc
76 compilerKind: ghc
107− compilerVersion: 7.4.2
77+ compilerVersion: 8.6.5
108− setup-method: hvr-ppa
78+ setup-method: ghcup
109 allow-failure: false
79 allow-failure: false
110 fail-fast: false
80 fail-fast: false
111 steps:
81 steps:
@@ -113,23 +83,11 @@ jobs:
113 run: |
83 run: |
114 apt-get update
84 apt-get update
115 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
85 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
116− if [ "${{ matrix.setup-method }}" = ghcup ]; then
117− mkdir -p "$HOME/.ghcup/bin"
86+ mkdir -p "$HOME/.ghcup/bin"
118− curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
87+ curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
119− chmod a+x "$HOME/.ghcup/bin/ghcup"
88+ chmod a+x "$HOME/.ghcup/bin/ghcup"
120− "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
121− "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
89+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
122− "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
123− else
124− apt-add-repository -y 'ppa:hvr/ghc'
125− apt-get update
126− apt-get install -y "$HCNAME"
127− mkdir -p "$HOME/.ghcup/bin"
128− curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
129− chmod a+x "$HOME/.ghcup/bin/ghcup"
130− "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
131− "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
90+ "$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
132− fi
133 env:
91 env:
134 HCKIND: ${{ matrix.compilerKind }}
92 HCKIND: ${{ matrix.compilerKind }}
135 HCNAME: ${{ matrix.compiler }}
93 HCNAME: ${{ matrix.compiler }}
@@ -141,22 +99,13 @@ jobs:
141 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
99 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
142 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
100 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
143 HCDIR=/opt/$HCKIND/$HCVER
101 HCDIR=/opt/$HCKIND/$HCVER
144− if [ "${{ matrix.setup-method }}" = ghcup ]; then
145− HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
102+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
146− HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
103+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
147− HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
104+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
148− echo "HC=$HC" >> "$GITHUB_ENV"
105+ echo "HC=$HC" >> "$GITHUB_ENV"
149− echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
106+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
150− echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
107+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
151− echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
152− else
153− HC=$HCDIR/bin/$HCKIND
154− echo "HC=$HC" >> "$GITHUB_ENV"
155− echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
156− echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
157− echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
108+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
158− fi
159−
160 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
109 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
161 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
110 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
162 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
111 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
@@ -213,14 +162,14 @@ jobs:
213 chmod a+x $HOME/.cabal/bin/cabal-plan
162 chmod a+x $HOME/.cabal/bin/cabal-plan
214 cabal-plan --version
163 cabal-plan --version
215 - name: checkout
164 - name: checkout
216− uses: actions/checkout@v3
165+ uses: actions/checkout@v4
217 with:
166 with:
218 path: source
167 path: source
219 - name: initial cabal.project for sdist
168 - name: initial cabal.project for sdist
220 run: |
169 run: |
221 touch cabal.project
170 touch cabal.project
222 echo "packages: $GITHUB_WORKSPACE/source/uuid-types" >> cabal.project
171 echo "packages: $GITHUB_WORKSPACE/source/uuid-types" >> cabal.project
223− echo "packages: $GITHUB_WORKSPACE/source/uuid" >> cabal.project
172+ if [ $((HCNUMVER < 91000)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/uuid" >> cabal.project ; fi
224 cat cabal.project
173 cat cabal.project
225 - name: sdist
174 - name: sdist
226 run: |
175 run: |
@@ -240,14 +189,14 @@ jobs:
240 touch cabal.project
189 touch cabal.project
241 touch cabal.project.local
190 touch cabal.project.local
242 echo "packages: ${PKGDIR_uuid_types}" >> cabal.project
191 echo "packages: ${PKGDIR_uuid_types}" >> cabal.project
243− echo "packages: ${PKGDIR_uuid}" >> cabal.project
192+ if [ $((HCNUMVER < 91000)) -ne 0 ] ; then echo "packages: ${PKGDIR_uuid}" >> cabal.project ; fi
244− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package uuid-types" >> cabal.project ; fi
193+ echo "package uuid-types" >> cabal.project
245− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
194+ echo " ghc-options: -Werror=missing-methods" >> cabal.project
246− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package uuid" >> cabal.project ; fi
195+ if [ $((HCNUMVER < 91000)) -ne 0 ] ; then echo "package uuid" >> cabal.project ; fi
247− if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
196+ if [ $((HCNUMVER < 91000)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
248 cat >> cabal.project <<EOF
197 cat >> cabal.project <<EOF
249 EOF
198 EOF
250− $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(uuid|uuid-types)$/; }' >> cabal.project.local
199+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(uuid|uuid-types)$/; }' >> cabal.project.local
251 cat cabal.project
200 cat cabal.project
252 cat cabal.project.local
201 cat cabal.project.local
253 - name: dump install plan
202 - name: dump install plan
@@ -255,7 +204,7 @@ jobs:
255 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
204 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
256 cabal-plan
205 cabal-plan
257 - name: restore cache
206 - name: restore cache
258− uses: actions/cache/restore@v3
207+ uses: actions/cache/restore@v4
259 with:
208 with:
260 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
209 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
261 path: ~/.cabal/store
210 path: ~/.cabal/store
@@ -277,8 +226,8 @@ jobs:
277 run: |
226 run: |
278 cd ${PKGDIR_uuid_types} || false
227 cd ${PKGDIR_uuid_types} || false
279 ${CABAL} -vnormal check
228 ${CABAL} -vnormal check
280− cd ${PKGDIR_uuid} || false
229+ if [ $((HCNUMVER < 91000)) -ne 0 ] ; then cd ${PKGDIR_uuid} || false ; fi
281− ${CABAL} -vnormal check
230+ if [ $((HCNUMVER < 91000)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
282 - name: haddock
231 - name: haddock
283 run: |
232 run: |
284 $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
233 $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
@@ -291,18 +240,12 @@ jobs:
291 rm -f cabal.project.local
240 rm -f cabal.project.local
292 - name: constraint set random-1.2
241 - name: constraint set random-1.2
293 run: |
242 run: |
294− if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all --dry-run ; fi
243+ $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all --dry-run
295− if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then cabal-plan topo | sort ; fi
244+ cabal-plan topo | sort
296− if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' --dependencies-only -j2 all ; fi
245+ $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' --dependencies-only -j2 all
297− if [ $((HCNUMVER >= 71000)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all ; fi
246+ $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.2.*' all
298− - name: constraint set random-1.1
299− run: |
300− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.1.*' all --dry-run ; fi
301− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then cabal-plan topo | sort ; fi
302− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.1.*' --dependencies-only -j2 all ; fi
303− if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='random==1.1.*' all ; fi
304 - name: save cache
247 - name: save cache
305− uses: actions/cache/save@v3
248+ uses: actions/cache/save@v4
306 if: always()
249 if: always()
307 with:
250 with:
308 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
251 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
cabal.haskell-ci−4
@@ -2,10 +2,6 @@ branches: master
2jobs-selection: any
2jobs-selection: any
3head-hackage: False
3head-hackage: False
4
4
5−constraint-set random-1.1
6− ghc: <9.7
7− constraints: random==1.1.*
8−
9constraint-set random-1.2
5constraint-set random-1.2
10 ghc: >=7.10
6 ghc: >=7.10
11 constraints: random==1.2.*
7 constraints: random==1.2.*
uuid-bench/uuid-bench.cabal+8−11
@@ -14,10 +14,7 @@ build-type: Simple
14
14
15-- Benchmarking with older GHCs is not meaningful
15-- Benchmarking with older GHCs is not meaningful
16tested-with:
16tested-with:
17− GHC ==8.0.2
17+ GHC ==8.6.5
18− || ==8.2.2
19− || ==8.4.4
20− || ==8.6.4
21 || ==8.8.4
18 || ==8.8.4
22 || ==8.10.7
19 || ==8.10.7
23 || ==9.0.2
20 || ==9.0.2
@@ -42,17 +39,17 @@ source-repository head
42
39
43library
40library
44 build-depends:
41 build-depends:
45− base >=4.9 && <5
42+ base >=4.12.0.0 && <5
46− , binary >=0.5.1.0 && <0.9
43+ , binary >=0.8.6.0 && <0.9
47− , bytestring >=0.9.2.1 && <0.13
44+ , bytestring >=0.10.8.2 && <0.13
48 , cryptohash-md5 >=0.11.100 && <0.12
45 , cryptohash-md5 >=0.11.100 && <0.12
49 , cryptohash-sha1 >=0.11.100 && <0.12
46 , cryptohash-sha1 >=0.11.100 && <0.12
50− , deepseq >=1.3.0.0 && <1.6
47+ , deepseq >=1.4.4.0 && <1.6
51 , entropy >=0.3.7 && <0.5
48 , entropy >=0.3.7 && <0.5
52− , hashable >=1.2.7.0 && <1.5
49+ , hashable >=1.4.4.0 && <1.5
53 , network-info >=0.2 && <0.3
50 , network-info >=0.2 && <0.3
54− , random >=1.1 && <1.3
51+ , random >=1.2.1.2 && <1.3
55− , template-haskell >=2.7.0.0 && <2.22
52+ , template-haskell >=2.14.0.0 && <2.22
56 , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2
53 , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2
57 , time >=1.4 && <1.13
54 , time >=1.4 && <1.13
58
55
uuid-types/src/Data/UUID/Types.hs−4
@@ -1,8 +1,4 @@
1−{-# LANGUAGE CPP #-}
2−
3−#if __GLASGOW_HASKELL__ >= 702
4{-# LANGUAGE Trustworthy #-}
1{-# LANGUAGE Trustworthy #-}
5−#endif
6
2
7{- |
3{- |
8Module : Data.UUID.Types
4Module : Data.UUID.Types
uuid-types/src/Data/UUID/Types/Internal.hs+1−72
@@ -2,14 +2,9 @@
2{-# LANGUAGE DeriveDataTypeable #-}
2{-# LANGUAGE DeriveDataTypeable #-}
3{-# LANGUAGE TypeFamilies #-}
3{-# LANGUAGE TypeFamilies #-}
4{-# LANGUAGE ViewPatterns #-}
4{-# LANGUAGE ViewPatterns #-}
5−#if __GLASGOW_HASKELL__ >= 704
6{-# LANGUAGE Unsafe #-}
5{-# LANGUAGE Unsafe #-}
7−#endif
8−#if __GLASGOW_HASKELL__ >=800
9{-# LANGUAGE DeriveLift #-}
6{-# LANGUAGE DeriveLift #-}
10{-# LANGUAGE StandaloneDeriving #-}
7{-# LANGUAGE StandaloneDeriving #-}
11−#endif
12−
13{-# OPTIONS_HADDOCK hide #-}
8{-# OPTIONS_HADDOCK hide #-}
14
9
15-- |
10-- |
@@ -76,19 +71,10 @@ import qualified Data.Text.Encoding as T
76
71
77import Data.UUID.Types.Internal.Builder
72import Data.UUID.Types.Internal.Builder
78
73
79−#if MIN_VERSION_random(1,2,0)
80import System.Random (Random (..), uniform)
74import System.Random (Random (..), uniform)
81import System.Random.Stateful (Uniform (..), uniformWord64)
75import System.Random.Stateful (Uniform (..), uniformWord64)
82−#else
83−import System.Random (Random (..), next)
84−#endif
85
76
86−#if __GLASGOW_HASKELL__ >=800
87import Language.Haskell.TH.Syntax (Lift)
77import Language.Haskell.TH.Syntax (Lift)
88−#else
89−import Language.Haskell.TH (appE, varE)
90−import Language.Haskell.TH.Syntax (Lift (..), mkNameG_v, Lit (IntegerL), Exp (LitE))
91−#endif
92
78
93-- | Type representing <https://en.wikipedia.org/wiki/UUID Universally Unique Identifiers (UUID)> as specified in
79-- | Type representing <https://en.wikipedia.org/wiki/UUID Universally Unique Identifiers (UUID)> as specified in
94-- <http://tools.ietf.org/html/rfc4122 RFC 4122>.
80-- <http://tools.ietf.org/html/rfc4122 RFC 4122>.
@@ -471,23 +457,13 @@ fromASCIIBytes bs = do
471-- | Similar to `toASCIIBytes` except we produce a lazy `BL.ByteString`.
457-- | Similar to `toASCIIBytes` except we produce a lazy `BL.ByteString`.
472toLazyASCIIBytes :: UUID -> BL.ByteString
458toLazyASCIIBytes :: UUID -> BL.ByteString
473toLazyASCIIBytes =
459toLazyASCIIBytes =
474−#if MIN_VERSION_bytestring(0,10,0)
475 BL.fromStrict
460 BL.fromStrict
476−#else
477− BL.fromChunks . return
478−#endif
479 . toASCIIBytes
461 . toASCIIBytes
480
462
481-- | Similar to `fromASCIIBytes` except parses from a lazy `BL.ByteString`.
463-- | Similar to `fromASCIIBytes` except parses from a lazy `BL.ByteString`.
482fromLazyASCIIBytes :: BL.ByteString -> Maybe UUID
464fromLazyASCIIBytes :: BL.ByteString -> Maybe UUID
483fromLazyASCIIBytes bs =
465fromLazyASCIIBytes bs =
484− if BL.length bs == 36 then fromASCIIBytes (
466+ if BL.length bs == 36 then fromASCIIBytes (BL.toStrict bs) else Nothing
485−#if MIN_VERSION_bytestring(0,10,0)
486− BL.toStrict bs
487−#else
488− B.concat $ BL.toChunks bs
489−#endif
490− ) else Nothing
491
467
492--
468--
493-- Class Instances
469-- Class Instances
@@ -495,7 +471,6 @@ fromLazyASCIIBytes bs =
495
471
496-- | This 'Random' instance produces __insecure__ version 4 UUIDs as
472-- | This 'Random' instance produces __insecure__ version 4 UUIDs as
497-- specified in <http://tools.ietf.org/html/rfc4122 RFC 4122>.
473-- specified in <http://tools.ietf.org/html/rfc4122 RFC 4122>.
498−#if MIN_VERSION_random(1,2,0)
499instance Random UUID where
474instance Random UUID where
500 random = uniform
475 random = uniform
501 randomR _ = random -- range is ignored
476 randomR _ = random -- range is ignored
@@ -506,29 +481,6 @@ instance Uniform UUID where
506 w0 <- uniformWord64 gen
481 w0 <- uniformWord64 gen
507 w1 <- uniformWord64 gen
482 w1 <- uniformWord64 gen
508 pure $ buildFromBytes 4 /-/ w0 /-/ w1
483 pure $ buildFromBytes 4 /-/ w0 /-/ w1
509−#else
510−instance Random UUID where
511− random g = (fromGenNext w0 w1 w2 w3 w4, g4)
512− where (w0, g0) = next g
513− (w1, g1) = next g0
514− (w2, g2) = next g1
515− (w3, g3) = next g2
516− (w4, g4) = next g3
517− randomR _ = random -- range is ignored
518−
519−-- |Build a UUID from the results of five calls to next on a StdGen.
520−-- While next on StdGet returns an Int, it doesn't provide 32 bits of
521−-- randomness. This code relies on at last 28 bits of randomness in the
522−-- and optimizes its use so as to make only five random values, not six.
523−fromGenNext :: Int -> Int -> Int -> Int -> Int -> UUID
524−fromGenNext w0 w1 w2 w3 w4 =
525− buildFromBytes 4 /-/ (ThreeByte w0)
526− /-/ (ThreeByte w1)
527− /-/ w2 -- use all 4 bytes because we know the version
528− -- field will "cover" the upper, non-random bits
529− /-/ (ThreeByte w3)
530− /-/ (ThreeByte w4)
531−#endif
532
484
533-- |A ByteSource to extract only three bytes from an Int, since next on StdGet
485-- |A ByteSource to extract only three bytes from an Int, since next on StdGet
534-- only returns 31 bits of randomness.
486-- only returns 31 bits of randomness.
@@ -622,27 +574,4 @@ instance Data UUID where
622uuidType :: DataType
574uuidType :: DataType
623uuidType = mkNoRepType "Data.UUID.Types.UUID"
575uuidType = mkNoRepType "Data.UUID.Types.UUID"
624
576
625−#if !MIN_VERSION_base(4,5,0)
626−unsafeShiftR, unsafeShiftL :: Bits w => w -> Int -> w
627−{-# INLINE unsafeShiftR #-}
628−unsafeShiftR = shiftR
629−{-# INLINE unsafeShiftL #-}
630−unsafeShiftL = shiftL
631−#endif
632−
633−#if __GLASGOW_HASKELL__ >=800
634deriving instance Lift UUID
577deriving instance Lift UUID
635−#else
636−instance Lift UUID where
637− lift (UUID w1 w2) = varE fromWords64Name `appE` liftW64 w1 `appE` liftW64 w2
638− where
639− fromWords64Name = mkNameG_v currentPackageKey "Data.UUID.Types.Internal" "fromWords64"
640− liftW64 x = return (LitE (IntegerL (fromIntegral x)))
641−
642−currentPackageKey :: String
643−#ifdef CURRENT_PACKAGE_KEY
644−currentPackageKey = CURRENT_PACKAGE_KEY
645−#else
646−currentPackageKey = "uuid-types-1.0.5"
647−#endif
648−#endif
uuid-types/src/Data/UUID/Types/Internal/Builder.hs−3
@@ -1,8 +1,5 @@
1−{-# LANGUAGE CPP #-}
2{-# LANGUAGE TypeFamilies #-}
1{-# LANGUAGE TypeFamilies #-}
3−#if __GLASGOW_HASKELL__ >= 704
4{-# LANGUAGE Unsafe #-}
2{-# LANGUAGE Unsafe #-}
5−#endif
6
3
7{-# OPTIONS_HADDOCK hide #-}
4{-# OPTIONS_HADDOCK hide #-}
8
5
uuid-types/uuid-types.cabal+12−18
@@ -1,6 +1,6 @@
1cabal-version: 1.12
1cabal-version: 1.12
2name: uuid-types
2name: uuid-types
3−version: 1.0.5.1
3+version: 1.0.6
4copyright:
4copyright:
5 (c) 2017-2018 Herbert Valerio Riedel
5 (c) 2017-2018 Herbert Valerio Riedel
6 (c) 2008-2014 Antoine Latter
6 (c) 2008-2014 Antoine Latter
@@ -12,21 +12,15 @@ license-file: LICENSE
12category: Data
12category: Data
13build-type: Simple
13build-type: Simple
14tested-with:
14tested-with:
15− GHC ==7.4.2
15+ GHC ==8.6.5
16− || ==7.6.3
17− || ==7.8.4
18− || ==7.10.3
19− || ==8.0.2
20− || ==8.2.2
21− || ==8.4.4
22− || ==8.6.4
23 || ==8.8.4
16 || ==8.8.4
24 || ==8.10.7
17 || ==8.10.7
25 || ==9.0.2
18 || ==9.0.2
26 || ==9.2.8
19 || ==9.2.8
27 || ==9.4.8
20 || ==9.4.8
28− || ==9.6.4
21+ || ==9.6.5
29 || ==9.8.2
22 || ==9.8.2
23+ || ==9.10.1
30
24
31synopsis: Type definitions for Universally Unique Identifiers
25synopsis: Type definitions for Universally Unique Identifiers
32description:
26description:
@@ -50,14 +44,14 @@ source-repository head
50
44
51library
45library
52 build-depends:
46 build-depends:
53− base >=4.5 && <5
47+ base >=4.12.0.0 && <5
54− , binary >=0.5.1.0 && <0.9
48+ , binary >=0.8.6.0 && <0.9
55− , bytestring >=0.9.2.1 && <0.13
49+ , bytestring >=0.10.8.2 && <0.13
56− , deepseq >=1.3.0.0 && <1.6
50+ , deepseq >=1.4.4.0 && <1.6
57− , hashable >=1.2.7.0 && <1.5
51+ , hashable >=1.4.4.0 && <1.5
58− , random >=1.1 && <1.3
52+ , random >=1.2.1.2 && <1.3
59− , template-haskell >=2.7.0.0 && <2.22
53+ , template-haskell >=2.14.0.0 && <2.23
60− , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2
54+ , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2
61
55
62 exposed-modules: Data.UUID.Types
56 exposed-modules: Data.UUID.Types
63
57
uuid/uuid.cabal+9−19
@@ -1,7 +1,6 @@
1cabal-version: 1.12
1cabal-version: 1.12
2name: uuid
2name: uuid
3−version: 1.3.15
3+version: 1.3.16
4−x-revision: 3
5copyright: (c) 2008-2014 Antoine Latter
4copyright: (c) 2008-2014 Antoine Latter
6author: Antoine Latter
5author: Antoine Latter
7maintainer: Oleg Grenrus <oleg.grenrus@iki.fi>
6maintainer: Oleg Grenrus <oleg.grenrus@iki.fi>
@@ -10,20 +9,13 @@ license-file: LICENSE
10category: Data
9category: Data
11build-type: Simple
10build-type: Simple
12tested-with:
11tested-with:
13− GHC ==7.4.2
12+ GHC ==8.6.5
14− || ==7.6.3
15− || ==7.8.4
16− || ==7.10.3
17− || ==8.0.2
18− || ==8.2.2
19− || ==8.4.4
20− || ==8.6.4
21 || ==8.8.4
13 || ==8.8.4
22 || ==8.10.7
14 || ==8.10.7
23 || ==9.0.2
15 || ==9.0.2
24 || ==9.2.8
16 || ==9.2.8
25 || ==9.4.8
17 || ==9.4.8
26− || ==9.6.4
18+ || ==9.6.5
27 || ==9.8.2
19 || ==9.8.2
28
20
29synopsis:
21synopsis:
@@ -46,22 +38,20 @@ source-repository head
46
38
47library
39library
48 build-depends:
40 build-depends:
49− base >=4.5 && <5
41+ base >=4.12 && <5
50− , binary >=0.5.1.0 && <0.9
42+ , binary >=0.8.6.0 && <0.9
51− , bytestring >=0.9.2.1 && <0.13
43+ , bytestring >=0.10.8.2 && <0.13
52 , cryptohash-md5 >=0.11.100 && <0.12
44 , cryptohash-md5 >=0.11.100 && <0.12
53 , cryptohash-sha1 >=0.11.100 && <0.12
45 , cryptohash-sha1 >=0.11.100 && <0.12
54 , entropy >=0.3.7 && <0.5
46 , entropy >=0.3.7 && <0.5
55 , network-info >=0.2 && <0.3
47 , network-info >=0.2 && <0.3
56− , random >=1.1 && <1.3
48+ , random >=1.2.1.2 && <1.3
57− , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2
49+ , text >=1.2.3.0 && <1.3 || >=2.0 && <2.2
58 , time >=1.4 && <1.13
50 , time >=1.4 && <1.13
59
51
60 -- strict dependency on uuid-types,
52 -- strict dependency on uuid-types,
61 -- as we re-rexport datatype, thus leak instances etc.
53 -- as we re-rexport datatype, thus leak instances etc.
62− build-depends:
54+ build-depends: uuid-types >=1.0.6 && <1.0.7
63− uuid-types >=1.0.5 && <1.0.6
64−
65 exposed-modules:
55 exposed-modules:
66 Data.UUID
56 Data.UUID
67 Data.UUID.Util
57 Data.UUID.Util