Skip to content

Commit

Permalink
Merge PR #516
Browse files Browse the repository at this point in the history
  • Loading branch information
kazu-yamamoto committed Oct 15, 2021
2 parents f2254a1 + b73f6fc commit 1886b05
Showing 1 changed file with 79 additions and 16 deletions.
95 changes: 79 additions & 16 deletions .github/workflows/haskell.yml
Expand Up @@ -6,11 +6,36 @@ on:
pull_request:
branches: [ master ]

env:
autoconf_ver: 2.69

jobs:
autoconf:
runs-on: ubuntu-latest
container: ubuntu:21.04

steps:
- uses: actions/checkout@v2
- name: install autoconf
run: |
apt-get update -y -qq
apt-get install -y -qq build-essential autoconf${{ env.autoconf_ver }}
- name: run autoreconf
run: |
autoreconf${{ env.autoconf_ver }} -fi
- uses: actions/upload-artifact@v2
with:
name: configure
path: |
configure
include/HsNetworkConfig.h.in
build:

runs-on: ${{ matrix.os }}
timeout-minutes: 10
timeout-minutes: 15

needs: autoconf

strategy:
fail-fast: false
Expand Down Expand Up @@ -44,7 +69,11 @@ jobs:
- uses: haskell/actions/setup@v1
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: '3.4'
cabal-version: '3.4.1.0'

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

- name: Cache
uses: actions/cache@v1
Expand All @@ -58,22 +87,8 @@ jobs:
${{ runner.os }}-build-
${{ runner.os }}-
- uses: msys2/setup-msys2@v2
if: matrix.os == 'windows-latest'
with:
update: true
install: autoconf
# Temporary hack to get around #502 while cabal is fixed.
# remove when cabal fixed.
- if: matrix.os == 'windows-latest'
shell: msys2 {0}
run: echo 'PATH_SEPARATOR=";"' >> $GITHUB_ENV
- if: matrix.os == 'windows-latest'
shell: msys2 {0}
run: autoreconf -i
- if: matrix.os != 'windows-latest'
run: |
autoreconf -i
sh ./enable_doctest.sh
- name: Install dependencies
Expand All @@ -85,3 +100,51 @@ jobs:
cabal build --enable-tests --disable-benchmarks all
- name: Run tests
run: cabal test all

# check windows can generate autoconf too
- uses: msys2/setup-msys2@v2
if: matrix.os == 'windows-latest'
with:
update: true
install: autoconf
- if: matrix.os == 'windows-latest'
name: autoreconf
shell: msys2 {0}
run: |
rm configure include/HsNetworkConfig.h.in
autoreconf -i
- if: matrix.os == 'windows-latest'
name: Build
run: |
cabal clean
cabal build --enable-tests --disable-benchmarks all
sdist:
runs-on: ubuntu-latest

needs: autoconf

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

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

- name: run sdist
run: |
cabal sdist
- uses: actions/upload-artifact@v2
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-*

0 comments on commit 1886b05

Please sign in to comment.