git.iko.soy/typeable/openapi3
on master help sign in
Allow GHC-9.2 dependencies (#39)
feeaa1fMaxim Koltsov
.github/workflows/haskell-ci.yml+81−28
@@ -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.12.1
11+# version: 0.14
12#
12#
13−# REGENDATA ("0.12.1",["github","cabal.project"])
13+# REGENDATA ("0.14",["github","cabal.project"])
14#
14#
15name: Haskell-CI
15name: Haskell-CI
16on:
16on:
@@ -24,55 +24,101 @@ jobs:
24 linux:
24 linux:
25 name: Haskell-CI - Linux - ${{ matrix.compiler }}
25 name: Haskell-CI - Linux - ${{ matrix.compiler }}
26 runs-on: ubuntu-18.04
26 runs-on: ubuntu-18.04
27+ timeout-minutes:
28+ 60
27 container:
29 container:
28− image: buildpack-deps:bionic
30+ image: buildpack-deps:focal
29 continue-on-error: ${{ matrix.allow-failure }}
31 continue-on-error: ${{ matrix.allow-failure }}
30 strategy:
32 strategy:
31 matrix:
33 matrix:
32 include:
34 include:
33− - compiler: ghc-9.0.1
35+ - compiler: ghc-9.2.1
36+ compilerKind: ghc
37+ compilerVersion: 9.2.1
38+ setup-method: ghcup
34 allow-failure: true
39 allow-failure: true
35− - compiler: ghc-8.10.4
40+ - compiler: ghc-9.0.2
41+ compilerKind: ghc
42+ compilerVersion: 9.0.2
43+ setup-method: ghcup
44+ allow-failure: false
45+ - compiler: ghc-8.10.7
46+ compilerKind: ghc
47+ compilerVersion: 8.10.7
48+ setup-method: ghcup
36 allow-failure: false
49 allow-failure: false
37 - compiler: ghc-8.8.4
50 - compiler: ghc-8.8.4
51+ compilerKind: ghc
52+ compilerVersion: 8.8.4
53+ setup-method: hvr-ppa
38 allow-failure: false
54 allow-failure: false
39 - compiler: ghc-8.6.5
55 - compiler: ghc-8.6.5
56+ compilerKind: ghc
57+ compilerVersion: 8.6.5
58+ setup-method: hvr-ppa
40 allow-failure: false
59 allow-failure: false
41 - compiler: ghc-8.4.4
60 - compiler: ghc-8.4.4
61+ compilerKind: ghc
62+ compilerVersion: 8.4.4
63+ setup-method: hvr-ppa
42 allow-failure: false
64 allow-failure: false
43 fail-fast: false
65 fail-fast: false
44 steps:
66 steps:
45 - name: apt
67 - name: apt
46 run: |
68 run: |
47 apt-get update
69 apt-get update
48− apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common
70+ apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
71+ if [ "${{ matrix.setup-method }}" = ghcup ]; then
72+ mkdir -p "$HOME/.ghcup/bin"
73+ curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
74+ chmod a+x "$HOME/.ghcup/bin/ghcup"
75+ "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
76+ "$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
77+ else
49− apt-add-repository -y 'ppa:hvr/ghc'
78+ apt-add-repository -y 'ppa:hvr/ghc'
50− apt-get update
79+ apt-get update
51− apt-get install -y $CC cabal-install-3.4
80+ apt-get install -y "$HCNAME"
81+ mkdir -p "$HOME/.ghcup/bin"
82+ curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
83+ chmod a+x "$HOME/.ghcup/bin/ghcup"
84+ "$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
85+ fi
52 env:
86 env:
87+ HCKIND: ${{ matrix.compilerKind }}
53− CC: ${{ matrix.compiler }}
88+ HCNAME: ${{ matrix.compiler }}
89+ HCVER: ${{ matrix.compilerVersion }}
54 - name: Set PATH and environment variables
90 - name: Set PATH and environment variables
55 run: |
91 run: |
56 echo "$HOME/.cabal/bin" >> $GITHUB_PATH
92 echo "$HOME/.cabal/bin" >> $GITHUB_PATH
57− echo "LANG=C.UTF-8" >> $GITHUB_ENV
93+ echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
58− echo "CABAL_DIR=$HOME/.cabal" >> $GITHUB_ENV
94+ echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
59− echo "CABAL_CONFIG=$HOME/.cabal/config" >> $GITHUB_ENV
95+ echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
60− HCDIR=$(echo "/opt/$CC" | sed 's/-/\//')
96+ HCDIR=/opt/$HCKIND/$HCVER
61− HCNAME=ghc
97+ if [ "${{ matrix.setup-method }}" = ghcup ]; then
62− HC=$HCDIR/bin/$HCNAME
98+ HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
63− echo "HC=$HC" >> $GITHUB_ENV
99+ echo "HC=$HC" >> "$GITHUB_ENV"
64− echo "HCPKG=$HCDIR/bin/$HCNAME-pkg" >> $GITHUB_ENV
100+ echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
65− echo "HADDOCK=$HCDIR/bin/haddock" >> $GITHUB_ENV
101+ echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
102+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
103+ else
104+ HC=$HCDIR/bin/$HCKIND
105+ echo "HC=$HC" >> "$GITHUB_ENV"
106+ echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
107+ echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
66− echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV
108+ echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
109+ fi
110+
67 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
111 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
68− echo "HCNUMVER=$HCNUMVER" >> $GITHUB_ENV
112+ echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
69− echo "ARG_TESTS=--enable-tests" >> $GITHUB_ENV
113+ echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
70− echo "ARG_BENCH=--enable-benchmarks" >> $GITHUB_ENV
114+ echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
71− echo "HEADHACKAGE=false" >> $GITHUB_ENV
115+ echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
72− echo "ARG_COMPILER=--$HCNAME --with-compiler=$HC" >> $GITHUB_ENV
116+ echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
73− echo "GHCJSARITH=0" >> $GITHUB_ENV
117+ echo "GHCJSARITH=0" >> "$GITHUB_ENV"
74 env:
118 env:
119+ HCKIND: ${{ matrix.compilerKind }}
75− CC: ${{ matrix.compiler }}
120+ HCNAME: ${{ matrix.compiler }}
121+ HCVER: ${{ matrix.compilerVersion }}
76 - name: env
122 - name: env
77 run: |
123 run: |
78 env
124 env
@@ -95,6 +141,10 @@ jobs:
95 repository hackage.haskell.org
141 repository hackage.haskell.org
96 url: http://hackage.haskell.org/
142 url: http://hackage.haskell.org/
97 EOF
143 EOF
144+ cat >> $CABAL_CONFIG <<EOF
145+ program-default-options
146+ ghc-options: $GHCJOBS +RTS -M3G -RTS
147+ EOF
98 cat $CABAL_CONFIG
148 cat $CABAL_CONFIG
99 - name: versions
149 - name: versions
100 run: |
150 run: |
@@ -133,7 +183,8 @@ jobs:
133 - name: generate cabal.project
183 - name: generate cabal.project
134 run: |
184 run: |
135 PKGDIR_openapi3="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/openapi3-[0-9.]*')"
185 PKGDIR_openapi3="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/openapi3-[0-9.]*')"
136− echo "PKGDIR_openapi3=${PKGDIR_openapi3}" >> $GITHUB_ENV
186+ echo "PKGDIR_openapi3=${PKGDIR_openapi3}" >> "$GITHUB_ENV"
187+ rm -f cabal.project cabal.project.local
137 touch cabal.project
188 touch cabal.project
138 touch cabal.project.local
189 touch cabal.project.local
139 echo "packages: ${PKGDIR_openapi3}" >> cabal.project
190 echo "packages: ${PKGDIR_openapi3}" >> cabal.project
@@ -184,7 +235,9 @@ jobs:
184 rm -f cabal.project.local
235 rm -f cabal.project.local
185 - name: constraint set aeson-2
236 - name: constraint set aeson-2
186 run: |
237 run: |
238+ $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='aeson >=2.0' --dependencies-only -j2 all
187 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='aeson >=2.0' all
239 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='aeson >=2.0' all
188 - name: constraint set aeson-1
240 - name: constraint set aeson-1
189 run: |
241 run: |
242+ $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='aeson <2.0' --dependencies-only -j2 all
190 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='aeson <2.0' all
243 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='aeson <2.0' all
openapi3.cabal+7−6
@@ -26,8 +26,9 @@ tested-with:
26 GHC ==8.4.4
26 GHC ==8.4.4
27 || ==8.6.5
27 || ==8.6.5
28 || ==8.8.4
28 || ==8.8.4
29− || ==8.10.4
29+ || ==8.10.7
30− || ==9.0.1
30+ || ==9.0.2
31+ || ==9.2.1
31
32
32custom-setup
33custom-setup
33 setup-depends:
34 setup-depends:
@@ -60,11 +61,11 @@ library
60
61
61 -- GHC boot libraries
62 -- GHC boot libraries
62 build-depends:
63 build-depends:
63− base >=4.11.1.0 && <4.16
64+ base >=4.11.1.0 && <4.17
64− , bytestring >=0.10.8.2 && <0.11
65+ , bytestring >=0.10.8.2 && <0.12
65 , containers >=0.5.11.0 && <0.7
66 , containers >=0.5.11.0 && <0.7
66− , template-haskell >=2.13.0.0 && <2.18
67+ , template-haskell >=2.13.0.0 && <2.19
67− , time >=1.8.0.2 && <1.10
68+ , time >=1.8.0.2 && <1.14
68 , transformers >=0.5.5.0 && <0.6
69 , transformers >=0.5.5.0 && <0.6
69
70
70 build-depends:
71 build-depends: