Skip to content

Commit

Permalink
Merge branch 'ci'
Browse files Browse the repository at this point in the history
  • Loading branch information
kazu-yamamoto committed Mar 15, 2023
2 parents 8446665 + 6fec550 commit 09f30fa
Show file tree
Hide file tree
Showing 4 changed files with 217 additions and 288 deletions.
110 changes: 45 additions & 65 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Haskell CI

on:
push:
branches: [ master ]
branches: [ 'master', 'ci' ]
pull_request:
branches: [ master ]
branches: [ 'master' ]

env:
autoconf_ver: 2.69
Expand All @@ -30,45 +30,52 @@ jobs:
configure
include/HsNetworkConfig.h.in
build:
sdist:
runs-on: ubuntu-latest
needs: autoconf

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: haskell/actions/setup@v2
with:
cabal-version: '3.4'

- uses: actions/download-artifact@v3
with:
name: configure

- name: run sdist
run: |
cabal sdist
- uses: actions/upload-artifact@v3
with:
name: dist-tarball
path: dist-newstyle/sdist/network-*

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist-newstyle/sdist/network-*

build:
runs-on: ${{ matrix.os }}
needs: autoconf

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
ghc: ['8.0', '8.2', '8.4', '8.6', '8.8', '8.10.4']
exclude:
- os: windows-latest
ghc: "8.0"
- os: windows-latest
ghc: "8.2"
- os: windows-latest
ghc: "8.4"
- os: windows-latest
ghc: "8.6"
- os: windows-latest
ghc: "8.10"
- os: macOS-latest
ghc: "8.0"
- os: macOS-latest
ghc: "8.2"
- os: macOS-latest
ghc: "8.4"
- os: macOS-latest
ghc: "8.6"
- os: macOS-latest
ghc: "8.8"
os: [ 'ubuntu-latest', 'macOS-latest', 'windows-latest' ]
ghc: [ '8.10', '9.0', '9.2' ]

steps:
- uses: actions/checkout@v3

- uses: haskell/actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: '3.4.1.0'
cabal-version: '3.8'

- uses: actions/download-artifact@v3
with:
Expand All @@ -86,19 +93,22 @@ jobs:
${{ runner.os }}-build-
${{ runner.os }}-
- if: matrix.os != 'windows-latest'
run: |
sh ./enable_doctest.sh
- name: Install dependencies
run: |
cabal update
cabal build --only-dependencies --enable-tests --disable-benchmarks
- name: Build
run: |
cabal build --enable-tests --disable-benchmarks all
run: cabal build --enable-tests --disable-benchmarks all

- name: Run tests
run: cabal test all
run: cabal test --test-show-details=streaming

- name: Run doctest
if: ${{ runner.os == 'Linux' }}
run: |
cabal install doctest --overwrite-policy=always
cabal repl --build-depends=QuickCheck --with-ghc=doctest
# check windows can generate autoconf too
- uses: msys2/setup-msys2@v2
Expand All @@ -117,33 +127,3 @@ jobs:
run: |
cabal clean
cabal build --enable-tests --disable-benchmarks all
sdist:
runs-on: ubuntu-latest

needs: autoconf

steps:
- uses: actions/checkout@v3
- uses: haskell/actions/setup@v2
with:
cabal-version: '3.4'

- uses: actions/download-artifact@v3
with:
name: configure

- name: run sdist
run: |
cabal sdist
- uses: actions/upload-artifact@v3
with:
name: dist-tarball
path: dist-newstyle/sdist/network-*

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist-newstyle/sdist/network-*
44 changes: 0 additions & 44 deletions enable_doctest.sh

This file was deleted.

Loading

0 comments on commit 09f30fa

Please sign in to comment.