Skip to content

Commit 0ead6fe

Browse files
authored
Use tested-with for CI (#1725)
1 parent 740bca7 commit 0ead6fe

File tree

13 files changed

+41
-79
lines changed

13 files changed

+41
-79
lines changed

.github/workflows/master.yml

Lines changed: 28 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,25 @@ on:
77
- master
88

99
jobs:
10-
cabal:
11-
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }}
10+
generate-matrix:
11+
name: "Generate matrix from cabal"
12+
outputs:
13+
matrix: ${{ steps.set-matrix.outputs.matrix }}
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Extract the tested GHC versions
17+
id: set-matrix
18+
uses: kleidukos/[email protected]
19+
with:
20+
cabal-file: servant/servant.cabal
21+
ubuntu: true
22+
version: 0.1.6.0
23+
tests:
24+
name: ${{ matrix.ghc }} on ${{ matrix.os }}
25+
needs: generate-matrix
1226
runs-on: ${{ matrix.os }}
1327
strategy:
14-
matrix:
15-
os: [ubuntu-latest]
16-
cabal: ["3.10"]
17-
ghc:
18-
- "8.8.4"
19-
- "8.10.7"
20-
- "9.0.2"
21-
- "9.2.8"
22-
- "9.4.8"
23-
- "9.6.3"
24-
- "9.8.1"
25-
fail-fast: false
26-
28+
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
2729
steps:
2830
- uses: actions/checkout@v2
2931

@@ -32,22 +34,21 @@ jobs:
3234
name: Setup Haskell
3335
with:
3436
ghc-version: ${{ matrix.ghc }}
35-
cabal-version: ${{ matrix.cabal }}
37+
cabal-version: 'latest'
3638

3739
- name: Freeze
3840
run: |
3941
cabal configure --enable-tests --enable-benchmarks --test-show-details=direct
4042
cabal freeze
4143
42-
- uses: actions/cache/restore@v3
43-
name: Cache ~/.cabal/store and dist-newstyle
44+
- name: Cache
45+
uses: actions/[email protected]
4446
with:
4547
path: |
46-
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
48+
${{ steps.setup-haskell.outputs.cabal-store }}
4749
dist-newstyle
48-
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
49-
restore-keys: |
50-
${{ runner.os }}-${{ matrix.ghc }}-
50+
key: ${{ runner.os }}-ghc-${{ matrix.ghc }}-cabal-${{ hashFiles('**/plan.json') }}
51+
restore-keys: ${{ runner.os }}-ghc-${{ matrix.ghc }}-
5152

5253
- name: Install doctest
5354
run: |
@@ -85,42 +86,7 @@ jobs:
8586
path: |
8687
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
8788
dist-newstyle
88-
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
89-
90-
# stack:
91-
# name: stack / ghc ${{ matrix.ghc }}
92-
# runs-on: ubuntu-latest
93-
# strategy:
94-
# matrix:
95-
# stack: ["2.7.5"]
96-
# ghc: ["8.10.7"]
97-
98-
# steps:
99-
# - uses: actions/checkout@v2
100-
101-
# - uses: haskell/actions/setup@v1
102-
# name: Setup Haskell Stack
103-
# with:
104-
# ghc-version: ${{ matrix.ghc }}
105-
# stack-version: ${{ matrix.stack }}
106-
107-
# - uses: actions/[email protected]
108-
# name: Cache ~/.stack
109-
# with:
110-
# path: ~/.stack
111-
# key: ${{ runner.os }}-${{ matrix.ghc }}-stack
112-
113-
# - name: Install dependencies
114-
# run: |
115-
# stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks --only-dependencies
116-
117-
# - name: Build
118-
# run: |
119-
# stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks
120-
121-
# - name: Test
122-
# run: |
123-
# stack test --system-ghc
89+
key: ${{ runner.os }}-ghc-${{ matrix.ghc }}-cabal-${{ hashFiles('./.plan.json') }}
12490

12591
ghcjs:
12692
name: ubuntu-latest / ghcjs 8.6
@@ -141,16 +107,14 @@ jobs:
141107
cp cabal.ghcjs.project cabal.project
142108
cat cabal.project
143109
nix-shell ghcjs.nix --run "cabal v2-update && cabal v2-freeze"
144-
145-
- uses: actions/cache/restore@v3
146-
name: Cache ~/.cabal/store and dist-newstyle
110+
- name: Cache
111+
uses: actions/[email protected]
147112
with:
148113
path: |
149114
~/.cabal/store
150115
dist-newstyle
151-
key: ${{ runner.os }}-ghcjs8.6-${{ hashFiles('cabal.project.freeze') }}
152-
restore-keys: |
153-
${{ runner.os }}-ghcjs8.6-
116+
key: ${{ runner.os }}-ghcjs8.6-cabal-${{ hashFiles('./.plan.json') }}
117+
restore-keys: ${{ runner.os }}-ghc-${{ matrix.ghc }}-
154118

155119
- name: Build
156120
run: |

servant-client-core/servant-client-core.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ author: Servant Contributors
1616
maintainer: [email protected]
1717
copyright: 2014-2016 Zalora South East Asia Pte Ltd, 2016-2019 Servant Contributors
1818
build-type: Simple
19-
tested-with: GHC==8.6.5, GHC==8.8.4, GHC ==8.10.7, GHC ==9.0.2, GHC ==9.2.7, GHC ==9.4.4
19+
tested-with: GHC ==8.10.7, GHC ==9.0.2, GHC ==9.2.8, GHC ==9.4.8, GHC ==9.6.4, GHC ==9.8.2
2020
, GHCJS ==8.6.0.1
2121

2222
extra-source-files:

servant-client-ghcjs/servant-client-ghcjs.cabal

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@ license: BSD-3-Clause
1919
license-file: LICENSE
2020
author: Servant Contributors
2121
maintainer: [email protected]
22-
copyright:
23-
2014-2016 Zalora South East Asia Pte Ltd, 2016-2018 Servant Contributors
24-
22+
copyright: 2014-2016 Zalora South East Asia Pte Ltd, 2016-2018 Servant Contributors
2523
build-type: Simple
2624
tested-with: ghc >=7.8
2725
extra-source-files:
2826
CHANGELOG.md
2927
README.md
28+
tested-with: GHCJS ==8.6.0.1
3029

3130
source-repository head
3231
type: git

servant-client/servant-client.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ author: Servant Contributors
2020
maintainer: [email protected]
2121
copyright: 2014-2016 Zalora South East Asia Pte Ltd, 2016-2019 Servant Contributors
2222
build-type: Simple
23-
tested-with: GHC==8.6.5, GHC==8.8.4, GHC ==8.10.7, GHC ==9.0.2, GHC ==9.2.7, GHC ==9.4.4
23+
tested-with: GHC ==8.10.7, GHC ==9.0.2, GHC ==9.2.8, GHC ==9.4.8, GHC ==9.6.4, GHC ==9.8.2
2424
, GHCJS ==8.6.0.1
2525

2626
extra-source-files:

servant-conduit/servant-conduit.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ author: Servant Contributors
1616
maintainer: [email protected]
1717
copyright: 2018-2019 Servant Contributors
1818
build-type: Simple
19-
tested-with: GHC==8.6.5, GHC==8.8.4, GHC ==8.10.7, GHC ==9.0.2, GHC ==9.2.7, GHC ==9.4.4
19+
tested-with: GHC ==8.10.7, GHC ==9.0.2, GHC ==9.2.8, GHC ==9.4.8, GHC ==9.6.4, GHC ==9.8.2
2020

2121
extra-source-files:
2222
CHANGELOG.md

servant-docs/servant-docs.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ author: Servant Contributors
1919
maintainer: [email protected]
2020
copyright: 2014-2016 Zalora South East Asia Pte Ltd, 2016-2019 Servant Contributors
2121
build-type: Simple
22-
tested-with: GHC==8.6.5, GHC==8.8.4, GHC ==8.10.7, GHC ==9.0.2, GHC ==9.2.7, GHC ==9.4.4
22+
tested-with: GHC ==8.10.7, GHC ==9.0.2, GHC ==9.2.8, GHC ==9.4.8, GHC ==9.6.4, GHC ==9.8.2
2323

2424
extra-source-files:
2525
CHANGELOG.md

servant-foreign/servant-foreign.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ author: Servant Contributors
2121
maintainer: [email protected]
2222
copyright: 2015-2019 Servant Contributors
2323
build-type: Simple
24-
tested-with: GHC==8.6.5, GHC==8.8.4, GHC ==8.10.7, GHC ==9.0.2, GHC ==9.2.7, GHC ==9.4.4
24+
tested-with: GHC ==8.10.7, GHC ==9.0.2, GHC ==9.2.8, GHC ==9.4.8, GHC ==9.6.4, GHC ==9.8.2
2525

2626
extra-source-files:
2727
CHANGELOG.md

servant-http-streams/servant-http-streams.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ author: Servant Contributors
2020
maintainer: [email protected]
2121
copyright: 2019 Servant Contributors
2222
build-type: Simple
23-
tested-with: GHC==8.6.5, GHC==8.8.4, GHC ==8.10.7, GHC ==9.0.2, GHC ==9.2.7, GHC ==9.4.4
23+
tested-with: GHC ==8.10.7, GHC ==9.0.2, GHC ==9.2.8, GHC ==9.4.8, GHC ==9.6.4, GHC ==9.8.2
2424

2525
extra-source-files:
2626
CHANGELOG.md

servant-machines/servant-machines.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ author: Servant Contributors
1616
maintainer: [email protected]
1717
copyright: 2018-2019 Servant Contributors
1818
build-type: Simple
19-
tested-with: GHC ==8.6.5 || ==8.8.4 || ==8.10.2
19+
tested-with: GHC ==8.10.7, GHC ==9.0.2, GHC ==9.2.8, GHC ==9.4.8, GHC ==9.6.4, GHC ==9.8.2
2020

2121
extra-source-files:
2222
CHANGELOG.md

servant-pipes/servant-pipes.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ author: Servant Contributors
1616
maintainer: [email protected]
1717
copyright: 2018-2019 Servant Contributors
1818
build-type: Simple
19-
tested-with: GHC ==8.6.5 || ==8.8.4 || ==8.10.2
19+
tested-with: GHC ==8.10.7, GHC ==9.0.2, GHC ==9.2.8, GHC ==9.4.8, GHC ==9.6.4, GHC ==9.8.2
2020

2121
extra-source-files:
2222
CHANGELOG.md

0 commit comments

Comments
 (0)