2019-09-17 19:01:09 +02:00
|
|
|
name: CI tests
|
2019-09-13 08:04:58 +02:00
|
|
|
|
2019-09-22 18:01:29 +02:00
|
|
|
on:
|
|
|
|
push:
|
2019-09-25 18:22:26 +02:00
|
|
|
branches:
|
|
|
|
- '*'
|
|
|
|
- '!rc/*'
|
2020-06-23 12:33:25 +02:00
|
|
|
paths-ignore:
|
2019-09-25 18:53:44 +02:00
|
|
|
- 'doc/**'
|
|
|
|
- 'MANUAL.txt'
|
|
|
|
- '*.md'
|
|
|
|
- 'RELEASE_CHECKLIST'
|
|
|
|
- 'BUGS'
|
|
|
|
- 'changelog'
|
|
|
|
- 'README.template'
|
|
|
|
- 'appveyor.yml'
|
|
|
|
- 'tools/**'
|
|
|
|
- 'linux/**'
|
|
|
|
- 'macos/**'
|
|
|
|
- 'windows/**'
|
|
|
|
- 'man/**'
|
2019-09-22 18:01:29 +02:00
|
|
|
pull_request:
|
2020-06-23 12:33:25 +02:00
|
|
|
paths-ignore:
|
2019-09-25 18:53:44 +02:00
|
|
|
- 'doc/**'
|
|
|
|
- 'MANUAL.txt'
|
|
|
|
- '*.md'
|
|
|
|
- 'RELEASE_CHECKLIST'
|
|
|
|
- 'BUGS'
|
|
|
|
- 'changelog'
|
|
|
|
- 'README.template'
|
|
|
|
- 'appveyor.yml'
|
|
|
|
- 'tools/**'
|
|
|
|
- 'linux/**'
|
|
|
|
- 'macos/**'
|
|
|
|
- 'windows/**'
|
|
|
|
- 'man/**'
|
2019-09-13 08:04:58 +02:00
|
|
|
|
|
|
|
jobs:
|
2019-09-13 19:54:55 +02:00
|
|
|
linux:
|
2019-09-13 08:19:15 +02:00
|
|
|
|
2020-06-15 01:45:01 +02:00
|
|
|
runs-on: ubuntu-18.04
|
2019-09-17 08:15:49 +02:00
|
|
|
strategy:
|
2019-09-17 18:24:47 +02:00
|
|
|
fail-fast: true
|
2019-09-17 08:15:49 +02:00
|
|
|
matrix:
|
2019-09-17 18:13:10 +02:00
|
|
|
versions:
|
2020-07-24 06:36:06 +02:00
|
|
|
- ghc: '8.0.2'
|
|
|
|
cabal: '2.4'
|
2019-09-17 18:13:10 +02:00
|
|
|
- ghc: '8.2.2'
|
2020-06-15 19:02:31 +02:00
|
|
|
cabal: '2.4'
|
2019-09-17 18:13:10 +02:00
|
|
|
- ghc: '8.4.4'
|
2020-06-15 19:02:31 +02:00
|
|
|
cabal: '2.4'
|
2019-09-17 18:13:10 +02:00
|
|
|
- ghc: '8.6.5'
|
2020-06-15 08:37:21 +02:00
|
|
|
cabal: '3.2'
|
2020-09-20 22:33:22 +02:00
|
|
|
- ghc: '8.8.4'
|
2020-06-15 01:41:12 +02:00
|
|
|
cabal: '3.2'
|
2020-09-20 22:33:22 +02:00
|
|
|
- ghc: '8.10.2'
|
2020-04-17 18:51:33 +02:00
|
|
|
cabal: '3.2'
|
2019-09-13 08:04:58 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-04-13 06:53:38 +02:00
|
|
|
|
2020-06-15 19:02:31 +02:00
|
|
|
# need to install older cabal/ghc versions from ppa repository
|
|
|
|
|
|
|
|
- name: Install recent cabal/ghc
|
2020-07-13 18:28:19 +02:00
|
|
|
uses: actions/setup-haskell@v1.1
|
|
|
|
with:
|
|
|
|
ghc-version: ${{ matrix.versions.ghc }}
|
|
|
|
cabal-version: ${{ matrix.versions.cabal }}
|
2020-06-15 19:02:31 +02:00
|
|
|
|
2020-04-13 06:53:38 +02:00
|
|
|
# declare/restore cached things
|
|
|
|
# caching doesn't work for scheduled runs yet
|
|
|
|
# https://github.com/actions/cache/issues/63
|
|
|
|
|
2020-04-14 08:04:06 +02:00
|
|
|
- name: Cache cabal global package db
|
2020-04-13 06:53:38 +02:00
|
|
|
id: cabal-global
|
2020-08-15 20:49:43 +02:00
|
|
|
uses: actions/cache@v2
|
2020-04-13 06:53:38 +02:00
|
|
|
with:
|
2020-08-15 20:49:43 +02:00
|
|
|
path: |
|
|
|
|
~/.cabal
|
2020-04-14 08:04:06 +02:00
|
|
|
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-global-${{ hashFiles('cabal.project') }}
|
|
|
|
|
|
|
|
- name: Cache cabal work
|
|
|
|
id: cabal-local
|
2020-08-15 20:49:43 +02:00
|
|
|
uses: actions/cache@v2
|
2020-04-14 08:04:06 +02:00
|
|
|
with:
|
2020-08-15 20:49:43 +02:00
|
|
|
path: |
|
|
|
|
dist-newstyle
|
2020-04-14 08:04:06 +02:00
|
|
|
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-local
|
2020-04-13 06:53:38 +02:00
|
|
|
|
2019-09-13 08:04:58 +02:00
|
|
|
- name: Install dependencies
|
2019-09-13 18:24:14 +02:00
|
|
|
run: |
|
|
|
|
cabal v2-update
|
2019-09-17 19:01:09 +02:00
|
|
|
cabal v2-build --dependencies-only --enable-tests --disable-optimization
|
2019-09-17 08:15:49 +02:00
|
|
|
- name: Build and test
|
2019-09-13 18:24:14 +02:00
|
|
|
run: |
|
2019-11-28 06:32:17 +01:00
|
|
|
cabal v2-build --enable-tests --disable-optimization 2>&1 | tee build.log
|
2019-09-17 08:15:49 +02:00
|
|
|
# fail if warnings in local build
|
2019-10-02 17:31:39 +02:00
|
|
|
! grep -q ": *[Ww]arning:" build.log || exit 1
|
2020-04-19 06:04:24 +02:00
|
|
|
cabal v2-test --disable-optimization
|
2019-09-16 18:48:57 +02:00
|
|
|
|
2019-09-13 19:54:55 +02:00
|
|
|
windows:
|
|
|
|
|
2020-06-15 01:41:12 +02:00
|
|
|
runs-on: windows-2019
|
2019-09-13 19:54:55 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Install stack
|
|
|
|
shell: cmd
|
|
|
|
run: |
|
|
|
|
choco install haskell-stack
|
2020-04-13 00:52:14 +02:00
|
|
|
|
|
|
|
# declare/restore cached things
|
|
|
|
# caching doesn't work for scheduled runs yet
|
|
|
|
# https://github.com/actions/cache/issues/63
|
|
|
|
|
|
|
|
- name: Cache stack global package db
|
|
|
|
id: stack-global-package-db
|
2020-08-15 20:49:43 +02:00
|
|
|
uses: actions/cache@v2
|
2020-04-13 00:52:14 +02:00
|
|
|
with:
|
2020-08-15 20:49:43 +02:00
|
|
|
path: |
|
|
|
|
C:\Users\runneradmin\AppData\Roaming\stack\
|
|
|
|
key: ${{ runner.os }}-appdata-roaming-stack-${{ hashFiles('stack.yaml') }}
|
2020-04-13 00:52:14 +02:00
|
|
|
|
|
|
|
# stack's local package dbs for the project and each package
|
2020-04-19 06:02:06 +02:00
|
|
|
# - name: Cache .stack-work
|
|
|
|
# uses: actions/cache@v1
|
|
|
|
# with:
|
|
|
|
# path: .stack-work
|
2020-04-20 18:06:29 +02:00
|
|
|
# key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}
|
2020-04-19 06:02:06 +02:00
|
|
|
# restore-keys: ${{ runner.os }}-stack-work
|
2020-04-13 00:52:14 +02:00
|
|
|
|
2019-09-14 19:47:29 +02:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
stack update
|
2020-05-04 23:34:56 +02:00
|
|
|
stack test --dependencies-only --fast
|
2019-09-13 19:54:55 +02:00
|
|
|
- name: Build and test
|
|
|
|
shell: cmd
|
|
|
|
run: |
|
2020-05-04 23:34:56 +02:00
|
|
|
stack test --fast --test-arguments=--hide-successes
|
2019-09-17 06:44:54 +02:00
|
|
|
|
|
|
|
macos:
|
|
|
|
|
2020-06-15 01:41:12 +02:00
|
|
|
runs-on: macOS-10.15
|
2020-09-10 18:44:12 +02:00
|
|
|
strategy:
|
|
|
|
fail-fast: true
|
|
|
|
matrix:
|
|
|
|
versions:
|
2020-09-20 22:33:22 +02:00
|
|
|
- ghc: '8.10.2'
|
2020-09-10 18:44:12 +02:00
|
|
|
cabal: '3.2'
|
2019-09-17 06:44:54 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-09-03 18:42:28 +02:00
|
|
|
|
2020-09-10 18:44:12 +02:00
|
|
|
- name: Install recent cabal/ghc
|
|
|
|
uses: actions/setup-haskell@v1.1
|
|
|
|
with:
|
|
|
|
ghc-version: ${{ matrix.versions.ghc }}
|
|
|
|
cabal-version: ${{ matrix.versions.cabal }}
|
2020-04-13 00:27:30 +02:00
|
|
|
|
|
|
|
# declare/restore cached things
|
2020-09-10 18:44:12 +02:00
|
|
|
# caching doesn't work for scheduled runs yet
|
|
|
|
# https://github.com/actions/cache/issues/63
|
2020-04-13 00:27:30 +02:00
|
|
|
|
2020-09-10 18:44:12 +02:00
|
|
|
- name: Cache cabal global package db
|
|
|
|
id: cabal-global
|
2020-08-15 20:49:43 +02:00
|
|
|
uses: actions/cache@v2
|
2020-04-13 00:27:30 +02:00
|
|
|
with:
|
2020-08-15 20:49:43 +02:00
|
|
|
path: |
|
2020-09-10 18:44:12 +02:00
|
|
|
~/.cabal
|
|
|
|
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-global-${{ hashFiles('cabal.project') }}
|
2020-04-13 00:27:30 +02:00
|
|
|
|
2020-09-10 18:44:12 +02:00
|
|
|
- name: Cache cabal work
|
|
|
|
id: cabal-local
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
dist-newstyle
|
|
|
|
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-local
|
2020-04-13 00:27:30 +02:00
|
|
|
|
2019-09-17 06:44:54 +02:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2020-09-10 18:44:12 +02:00
|
|
|
cabal v2-update
|
|
|
|
cabal v2-build --dependencies-only --enable-tests --disable-optimization
|
2019-09-17 06:44:54 +02:00
|
|
|
- name: Build and test
|
|
|
|
run: |
|
2020-09-10 18:44:12 +02:00
|
|
|
cabal v2-build --enable-tests --disable-optimization 2>&1 | tee build.log
|
|
|
|
# fail if warnings in local build
|
|
|
|
! grep -q ": *[Ww]arning:" build.log || exit 1
|
|
|
|
cabal v2-test --disable-optimization
|