Skip to content

Commit 3ffe896

Browse files
committed
Merge PR #547
2 parents df11dab + 090e461 commit 3ffe896

File tree

2 files changed

+65
-24
lines changed

2 files changed

+65
-24
lines changed

.github/workflows/haskell.yml

Lines changed: 49 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -67,63 +67,92 @@ jobs:
6767
fail-fast: false
6868
matrix:
6969
os: [ 'ubuntu-latest', 'macOS-latest', 'windows-latest' ]
70-
ghc: [ '8.10', '9.0', '9.2' ]
70+
ghc: [ '8.10', '9.0', '9.2', '9.4', '9.6' ]
7171

7272
steps:
7373
- uses: actions/checkout@v3
7474

7575
- uses: haskell/actions/setup@v2
76+
id: setup
7677
with:
7778
ghc-version: ${{ matrix.ghc }}
78-
cabal-version: '3.8'
79+
cabal-version: latest
80+
cabal-update: true
7981

8082
- uses: actions/download-artifact@v3
8183
with:
8284
name: configure
8385

84-
- name: Cache
85-
uses: actions/cache@v3
86-
env:
87-
cache-name: cache-cabal
86+
- name: Haskell versions
87+
shell: bash
88+
run: |
89+
echo "GHC_VERSION=$(ghc --numeric-version)" >> "${GITHUB_ENV}"
90+
echo "CABAL_VERSION=$(cabal --numeric-version)" >> "${GITHUB_ENV}"
91+
92+
- name: Cabal configure
93+
run: |
94+
cabal configure --enable-tests --disable-benchmarks --disable-documentation
95+
96+
- name: Cache (restore)
97+
uses: actions/cache/restore@v3
98+
id: cache
8899
with:
89-
path: ~/.cabal
90-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
100+
path: ${{ steps.setup.outputs.cabal-store }}
101+
key: build-${{ runner.os }}-ghc-${{ env.GHC_VERSION }}-cabal-${{ env.CABAL_VERSION }}-sha-${{ github.sha }}
102+
# Append commit SHA so that new cache is always written.
103+
# This is fine as long as we do not hit the total cache limit of 10GB.
91104
restore-keys: |
92-
${{ runner.os }}-build-${{ env.cache-name }}-
93-
${{ runner.os }}-build-
94-
${{ runner.os }}-
105+
build-${{ runner.os }}-ghc-${{ env.GHC_VERSION }}-cabal-${{ env.CABAL_VERSION }}-
106+
build-${{ runner.os }}-ghc-${{ env.GHC_VERSION }}-
95107
96108
- name: Install dependencies
97109
run: |
98-
cabal update
99-
cabal build --only-dependencies --enable-tests --disable-benchmarks
110+
cabal build --only-dependencies
111+
112+
- name: Cache (save)
113+
uses: actions/cache/save@v3
114+
with:
115+
path: ${{ steps.setup.outputs.cabal-store }}
116+
key: ${{ steps.cache.outputs.cache-primary-key }}
100117

101118
- name: Build
102-
run: cabal build --enable-tests --disable-benchmarks all
119+
run: |
120+
cabal build all
103121
104122
- name: Run tests
105-
run: cabal test --test-show-details=streaming
123+
run: |
124+
cabal test --test-show-details=streaming
106125
107126
- name: Run doctest
108127
if: ${{ runner.os == 'Linux' }}
109128
run: |
110129
cabal install doctest --overwrite-policy=always
111130
cabal repl --build-depends=QuickCheck --with-ghc=doctest
112131
132+
- name: Cabal check
133+
run: |
134+
cabal check
135+
136+
- name: Haddock
137+
run: |
138+
cabal haddock --disable-documentation
139+
113140
# check windows can generate autoconf too
114141
- uses: msys2/setup-msys2@v2
115-
if: matrix.os == 'windows-latest'
142+
if: ${{ runner.os == 'Windows' }}
116143
with:
117144
update: true
118145
install: autoconf
119-
- if: matrix.os == 'windows-latest'
120-
name: autoreconf
146+
147+
- name: Autoreconf (Windows)
148+
if: ${{ runner.os == 'Windows' }}
121149
shell: msys2 {0}
122150
run: |
123151
rm configure include/HsNetworkConfig.h.in
124152
autoreconf -i
125-
- if: matrix.os == 'windows-latest'
126-
name: Build
153+
154+
- name: Build (Windows)
155+
if: ${{ runner.os == 'Windows' }}
127156
run: |
128157
cabal clean
129158
cabal build --enable-tests --disable-benchmarks all

network.cabal

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,18 @@ version: 3.1.2.8
44
license: BSD3
55
license-file: LICENSE
66
maintainer: Kazu Yamamoto, Evan Borden
7+
78
tested-with:
8-
ghc ==8.0.2 ghc ==8.2.2 ghc ==8.4.4 ghc ==8.6.5 ghc ==8.8.3
9-
ghc ==8.10.1
9+
GHC == 9.6.1
10+
GHC == 9.4.4
11+
GHC == 9.2.7
12+
GHC == 9.0.2
13+
GHC == 8.10.7
14+
GHC == 8.8.4
15+
GHC == 8.6.5
16+
GHC == 8.4.4
17+
GHC == 8.2.2
18+
GHC == 8.0.2
1019

1120
homepage: https://github.com/haskell/network
1221
bug-reports: https://github.com/haskell/network/issues
@@ -41,9 +50,12 @@ description:
4150

4251
category: Network
4352
build-type: Configure
44-
extra-source-files:
53+
54+
extra-doc-files:
4555
README.md
4656
CHANGELOG.md
57+
58+
extra-source-files:
4759
examples/*.hs
4860
tests/*.hs
4961
config.guess
@@ -68,7 +80,7 @@ extra-tmp-files:
6880

6981
source-repository head
7082
type: git
71-
location: git://github.com/haskell/network.git
83+
location: https://github.com/haskell/network.git
7284

7385
flag devel
7486
description: using tests for developers

0 commit comments

Comments
 (0)