git.iko.soy/typeable/entropy
on 5d0c71e help sign in
.github/workflows/haskell-ci.yml+28−49
since splitsnapshots
unifiedsplit
@@ -8,9 +8,9 @@
8#
8#
9# For more information, see https://github.com/andreasabel/haskell-ci
9# For more information, see https://github.com/andreasabel/haskell-ci
10#
10#
11−# version: 0.19.20241219
11+# version: 0.19.20240630
12#
12#
13−# REGENDATA ("0.19.20241219",["github","entropy.cabal"])
13+# REGENDATA ("0.19.20240630",["github","entropy.cabal"])
14#
14#
15name: Haskell-CI
15name: Haskell-CI
16on:
16on:
@@ -32,24 +32,19 @@ jobs:
32 strategy:
32 strategy:
33 matrix:
33 matrix:
34 include:
34 include:
35− - compiler: ghc-9.12.1
36− compilerKind: ghc
37− compilerVersion: 9.12.1
38− setup-method: ghcup
39− allow-failure: false
40 - compiler: ghc-9.10.1
35 - compiler: ghc-9.10.1
41 compilerKind: ghc
36 compilerKind: ghc
42 compilerVersion: 9.10.1
37 compilerVersion: 9.10.1
43 setup-method: ghcup
38 setup-method: ghcup
44 allow-failure: false
39 allow-failure: false
45− - compiler: ghc-9.8.4
40+ - compiler: ghc-9.8.2
46 compilerKind: ghc
41 compilerKind: ghc
47− compilerVersion: 9.8.4
42+ compilerVersion: 9.8.2
48 setup-method: ghcup
43 setup-method: ghcup
49 allow-failure: false
44 allow-failure: false
50− - compiler: ghc-9.6.6
45+ - compiler: ghc-9.6.5
51 compilerKind: ghc
46 compilerKind: ghc
52− compilerVersion: 9.6.6
47+ compilerVersion: 9.6.5
53 setup-method: ghcup
48 setup-method: ghcup
54 allow-failure: false
49 allow-failure: false
55 - compiler: ghc-9.4.8
50 - compiler: ghc-9.4.8
@@ -92,32 +87,22 @@ jobs:
92 compilerVersion: 8.2.2
87 compilerVersion: 8.2.2
93 setup-method: ghcup
88 setup-method: ghcup
94 allow-failure: false
89 allow-failure: false
90+ - compiler: ghc-8.0.2
91+ compilerKind: ghc
92+ compilerVersion: 8.0.2
93+ setup-method: ghcup
94+ allow-failure: false
95 fail-fast: false
95 fail-fast: false
96 steps:
96 steps:
97− - name: apt-get install
97+ - name: apt
98 run: |
98 run: |
99 apt-get update
99 apt-get update
100 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
100 apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev
101− - name: Install GHCup
102− run: |
103 mkdir -p "$HOME/.ghcup/bin"
101 mkdir -p "$HOME/.ghcup/bin"
104− curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
102+ curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
105 chmod a+x "$HOME/.ghcup/bin/ghcup"
103 chmod a+x "$HOME/.ghcup/bin/ghcup"
106− - name: Install cabal-install (prerelease)
107− run: |
108− "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.8.yaml;
109− "$HOME/.ghcup/bin/ghcup" install cabal 3.15.0.0.2024.10.3 || (cat "$HOME"/.ghcup/logs/*.* && false)
110− echo "CABAL=$HOME/.ghcup/bin/cabal-3.15.0.0.2024.10.3 -vnormal+nowrap" >> "$GITHUB_ENV"
111− - name: Install GHC (GHCup)
112− if: matrix.setup-method == 'ghcup'
113− run: |
114 "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
104 "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
115− HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
105+ "$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
116− HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
117− HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
118− echo "HC=$HC" >> "$GITHUB_ENV"
119− echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
120− echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
121 env:
106 env:
122 HCKIND: ${{ matrix.compilerKind }}
107 HCKIND: ${{ matrix.compilerKind }}
123 HCNAME: ${{ matrix.compiler }}
108 HCNAME: ${{ matrix.compiler }}
@@ -128,12 +113,21 @@ jobs:
128 echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
113 echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
129 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
114 echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
130 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
115 echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
116+ HCDIR=/opt/$HCKIND/$HCVER
117+ HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
118+ HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
119+ HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
120+ echo "HC=$HC" >> "$GITHUB_ENV"
121+ echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
122+ echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
123+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
131 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
124 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
132 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
125 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
133 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
126 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
134 echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
127 echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
135− if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
128+ echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
136 echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
129 echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
130+ echo "GHCJSARITH=0" >> "$GITHUB_ENV"
137 env:
131 env:
138 HCKIND: ${{ matrix.compilerKind }}
132 HCKIND: ${{ matrix.compilerKind }}
139 HCNAME: ${{ matrix.compiler }}
133 HCNAME: ${{ matrix.compiler }}
@@ -160,18 +154,6 @@ jobs:
160 repository hackage.haskell.org
154 repository hackage.haskell.org
161 url: http://hackage.haskell.org/
155 url: http://hackage.haskell.org/
162 EOF
156 EOF
163− if $HEADHACKAGE; then
164− cat >> $CABAL_CONFIG <<EOF
165− repository head.hackage.ghc.haskell.org
166− url: https://ghc.gitlab.haskell.org/head.hackage/
167− secure: True
168− root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
169− 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
170− f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
171− key-threshold: 3
172− active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
173− EOF
174− fi
175 cat >> $CABAL_CONFIG <<EOF
157 cat >> $CABAL_CONFIG <<EOF
176 program-default-options
158 program-default-options
177 ghc-options: $GHCJOBS +RTS -M3G -RTS
159 ghc-options: $GHCJOBS +RTS -M3G -RTS
@@ -219,13 +201,10 @@ jobs:
219 touch cabal.project
201 touch cabal.project
220 touch cabal.project.local
202 touch cabal.project.local
221 echo "packages: ${PKGDIR_entropy}" >> cabal.project
203 echo "packages: ${PKGDIR_entropy}" >> cabal.project
222− echo "package entropy" >> cabal.project
204+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package entropy" >> cabal.project ; fi
223− echo " ghc-options: -Werror=missing-methods" >> cabal.project
205+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi
224 cat >> cabal.project <<EOF
206 cat >> cabal.project <<EOF
225 EOF
207 EOF
226− if $HEADHACKAGE; then
227− echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
228− fi
229 $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(entropy)$/; }' >> cabal.project.local
208 $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(entropy)$/; }' >> cabal.project.local
230 cat cabal.project
209 cat cabal.project
231 cat cabal.project.local
210 cat cabal.project.local
@@ -251,14 +230,14 @@ jobs:
251 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
230 $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
252 - name: haddock
231 - name: haddock
253 run: |
232 run: |
254− $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
233+ if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all ; fi
255 - name: unconstrained build
234 - name: unconstrained build
256 run: |
235 run: |
257 rm -f cabal.project.local
236 rm -f cabal.project.local
258 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
237 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
259 - name: save cache
238 - name: save cache
260− if: always()
261 uses: actions/cache/save@v4
239 uses: actions/cache/save@v4
240+ if: always()
262 with:
241 with:
263 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
242 key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
264 path: ~/.cabal/store
243 path: ~/.cabal/store
Setup.hs+1−4
@@ -106,10 +106,7 @@ checkGetentropy cc lbi = do
106 where cArgs = ["-DHAVE_GETENTROPY"]
106 where cArgs = ["-DHAVE_GETENTROPY"]
107
107
108myRawSystemExitCode :: Verbosity -> FilePath -> [String] -> IO ExitCode
108myRawSystemExitCode :: Verbosity -> FilePath -> [String] -> IO ExitCode
109−#if MIN_VERSION_Cabal(3,14,0)
110−myRawSystemExitCode verbosity program arguments =
111− rawSystemExitCode verbosity Nothing program arguments Nothing
112−#elif __GLASGOW_HASKELL__ >= 704
109+#if __GLASGOW_HASKELL__ >= 704
113-- We know for sure, that if GHC >= 7.4 implies Cabal >= 1.14
110-- We know for sure, that if GHC >= 7.4 implies Cabal >= 1.14
114myRawSystemExitCode = rawSystemExitCode
111myRawSystemExitCode = rawSystemExitCode
115#else
112#else
entropy.cabal+8−7
@@ -1,6 +1,7 @@
1cabal-version: >=1.10
1cabal-version: >=1.10
2name: entropy
2name: entropy
3−version: 0.4.1.11
3+version: 0.4.1.10
4+x-revision: 2
4description: A mostly platform independent method to obtain cryptographically strong entropy
5description: A mostly platform independent method to obtain cryptographically strong entropy
5 (RDRAND, urandom, CryptAPI, and patches welcome)
6 (RDRAND, urandom, CryptAPI, and patches welcome)
6 Users looking for cryptographically strong (number-theoretically
7 Users looking for cryptographically strong (number-theoretically
@@ -19,10 +20,9 @@ stability: stable
19build-type: Custom
20build-type: Custom
20
21
21tested-with:
22tested-with:
22− GHC == 9.12.1
23 GHC == 9.10.1
23 GHC == 9.10.1
24− GHC == 9.8.4
24+ GHC == 9.8.2
25− GHC == 9.6.6
25+ GHC == 9.6.5
26 GHC == 9.4.8
26 GHC == 9.4.8
27 GHC == 9.2.8
27 GHC == 9.2.8
28 GHC == 9.0.2
28 GHC == 9.0.2
@@ -31,6 +31,7 @@ tested-with:
31 GHC == 8.6.5
31 GHC == 8.6.5
32 GHC == 8.4.4
32 GHC == 8.4.4
33 GHC == 8.2.2
33 GHC == 8.2.2
34+ GHC == 8.0.2
34
35
35extra-source-files:
36extra-source-files:
36 ./cbits/getrandom.c
37 ./cbits/getrandom.c
@@ -46,7 +47,7 @@ Flag DoNotGetEntropy
46 Manual: True
47 Manual: True
47
48
48custom-setup
49custom-setup
49− setup-depends: Cabal >= 1.10 && < 3.17
50+ setup-depends: Cabal >= 1.10 && < 3.13
50 , base < 5
51 , base < 5
51 , filepath < 1.6
52 , filepath < 1.6
52 , directory < 1.4
53 , directory < 1.4
@@ -55,7 +56,7 @@ custom-setup
55library
56library
56 ghc-options: -O2
57 ghc-options: -O2
57 exposed-modules: System.Entropy
58 exposed-modules: System.Entropy
58− if impl(ghcjs) || os(ghcjs) || arch(wasm32)
59+ if impl(ghcjs) || os(ghcjs)
59 other-modules: System.EntropyGhcjs
60 other-modules: System.EntropyGhcjs
60 else {
61 else {
61 if os(windows)
62 if os(windows)
@@ -70,7 +71,7 @@ library
70
71
71 default-language: Haskell2010
72 default-language: Haskell2010
72
73
73− if impl(ghcjs) || os(ghcjs) || arch(wasm32) {
74+ if impl(ghcjs) || os(ghcjs) {
74 build-depends: ghcjs-dom >= 0.9.5.0 && < 1
75 build-depends: ghcjs-dom >= 0.9.5.0 && < 1
75 , jsaddle
76 , jsaddle
76 }
77 }