@@ -2,9 +2,9 @@ name: Haskell CI
2
2
3
3
on :
4
4
push :
5
- branches : [ master ]
5
+ branches : [ ' master', 'ci' ]
6
6
pull_request :
7
- branches : [ master ]
7
+ branches : [ ' master' ]
8
8
9
9
env :
10
10
autoconf_ver : 2.69
@@ -30,45 +30,52 @@ jobs:
30
30
configure
31
31
include/HsNetworkConfig.h.in
32
32
33
- build :
33
+ sdist :
34
+ runs-on : ubuntu-latest
35
+ needs : autoconf
34
36
35
- runs-on : ${{ matrix.os }}
37
+ steps :
38
+ - uses : actions/checkout@v3
39
+ - uses : haskell/actions/setup@v2
40
+ with :
41
+ cabal-version : ' 3.4'
42
+
43
+ - uses : actions/download-artifact@v3
44
+ with :
45
+ name : configure
46
+
47
+ - name : run sdist
48
+ run : |
49
+ cabal sdist
36
50
51
+ - uses : actions/upload-artifact@v3
52
+ with :
53
+ name : dist-tarball
54
+ path : dist-newstyle/sdist/network-*
55
+
56
+ - name : Release
57
+ uses : softprops/action-gh-release@v1
58
+ if : startsWith(github.ref, 'refs/tags/')
59
+ with :
60
+ files : dist-newstyle/sdist/network-*
61
+
62
+ build :
63
+ runs-on : ${{ matrix.os }}
37
64
needs : autoconf
38
65
39
66
strategy :
40
67
fail-fast : false
41
68
matrix :
42
- os : [ubuntu-latest, macOS-latest, windows-latest]
43
- ghc : ['8.0', '8.2', '8.4', '8.6', '8.8', '8.10.4']
44
- exclude :
45
- - os : windows-latest
46
- ghc : " 8.0"
47
- - os : windows-latest
48
- ghc : " 8.2"
49
- - os : windows-latest
50
- ghc : " 8.4"
51
- - os : windows-latest
52
- ghc : " 8.6"
53
- - os : windows-latest
54
- ghc : " 8.10"
55
- - os : macOS-latest
56
- ghc : " 8.0"
57
- - os : macOS-latest
58
- ghc : " 8.2"
59
- - os : macOS-latest
60
- ghc : " 8.4"
61
- - os : macOS-latest
62
- ghc : " 8.6"
63
- - os : macOS-latest
64
- ghc : " 8.8"
69
+ os : [ 'ubuntu-latest', 'macOS-latest', 'windows-latest' ]
70
+ ghc : [ '8.10', '9.0', '9.2' ]
65
71
66
72
steps :
67
73
- uses : actions/checkout@v3
74
+
68
75
- uses : haskell/actions/setup@v2
69
76
with :
70
77
ghc-version : ${{ matrix.ghc }}
71
- cabal-version : ' 3.4.1.0 '
78
+ cabal-version : ' 3.8 '
72
79
73
80
- uses : actions/download-artifact@v3
74
81
with :
@@ -86,19 +93,22 @@ jobs:
86
93
${{ runner.os }}-build-
87
94
${{ runner.os }}-
88
95
89
- - if : matrix.os != 'windows-latest'
90
- run : |
91
- sh ./enable_doctest.sh
92
-
93
96
- name : Install dependencies
94
97
run : |
95
98
cabal update
96
99
cabal build --only-dependencies --enable-tests --disable-benchmarks
100
+
97
101
- name : Build
98
- run : |
99
- cabal build --enable-tests --disable-benchmarks all
102
+ run : cabal build --enable-tests --disable-benchmarks all
103
+
100
104
- name : Run tests
101
- run : cabal test all
105
+ run : cabal test --test-show-details=streaming
106
+
107
+ - name : Run doctest
108
+ if : ${{ runner.os == 'Linux' }}
109
+ run : |
110
+ cabal install doctest --overwrite-policy=always
111
+ cabal repl --build-depends=QuickCheck --with-ghc=doctest
102
112
103
113
# check windows can generate autoconf too
104
114
- uses : msys2/setup-msys2@v2
@@ -117,33 +127,3 @@ jobs:
117
127
run : |
118
128
cabal clean
119
129
cabal build --enable-tests --disable-benchmarks all
120
-
121
- sdist :
122
- runs-on : ubuntu-latest
123
-
124
- needs : autoconf
125
-
126
- steps :
127
- - uses : actions/checkout@v3
128
- - uses : haskell/actions/setup@v2
129
- with :
130
- cabal-version : ' 3.4'
131
-
132
- - uses : actions/download-artifact@v3
133
- with :
134
- name : configure
135
-
136
- - name : run sdist
137
- run : |
138
- cabal sdist
139
-
140
- - uses : actions/upload-artifact@v3
141
- with :
142
- name : dist-tarball
143
- path : dist-newstyle/sdist/network-*
144
-
145
- - name : Release
146
- uses : softprops/action-gh-release@v1
147
- if : startsWith(github.ref, 'refs/tags/')
148
- with :
149
- files : dist-newstyle/sdist/network-*
0 commit comments