Skip to content

Commit 6fec550

Browse files
committed
updating github actions
1 parent 2f95a23 commit 6fec550

File tree

1 file changed

+45
-65
lines changed

1 file changed

+45
-65
lines changed

.github/workflows/haskell.yml

Lines changed: 45 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Haskell CI
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ 'master', 'ci' ]
66
pull_request:
7-
branches: [ master ]
7+
branches: [ 'master' ]
88

99
env:
1010
autoconf_ver: 2.69
@@ -30,45 +30,52 @@ jobs:
3030
configure
3131
include/HsNetworkConfig.h.in
3232
33-
build:
33+
sdist:
34+
runs-on: ubuntu-latest
35+
needs: autoconf
3436

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
3650
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 }}
3764
needs: autoconf
3865

3966
strategy:
4067
fail-fast: false
4168
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' ]
6571

6672
steps:
6773
- uses: actions/checkout@v3
74+
6875
- uses: haskell/actions/setup@v2
6976
with:
7077
ghc-version: ${{ matrix.ghc }}
71-
cabal-version: '3.4.1.0'
78+
cabal-version: '3.8'
7279

7380
- uses: actions/download-artifact@v3
7481
with:
@@ -86,19 +93,22 @@ jobs:
8693
${{ runner.os }}-build-
8794
${{ runner.os }}-
8895
89-
- if: matrix.os != 'windows-latest'
90-
run: |
91-
sh ./enable_doctest.sh
92-
9396
- name: Install dependencies
9497
run: |
9598
cabal update
9699
cabal build --only-dependencies --enable-tests --disable-benchmarks
100+
97101
- name: Build
98-
run: |
99-
cabal build --enable-tests --disable-benchmarks all
102+
run: cabal build --enable-tests --disable-benchmarks all
103+
100104
- 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
102112
103113
# check windows can generate autoconf too
104114
- uses: msys2/setup-msys2@v2
@@ -117,33 +127,3 @@ jobs:
117127
run: |
118128
cabal clean
119129
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

Comments
 (0)