2019-09-17 10:01:09 -07:00
|
|
|
name: CI tests
|
2019-09-12 23:04:58 -07:00
|
|
|
|
2019-09-22 09:01:29 -07:00
|
|
|
on:
|
|
|
|
push:
|
2019-09-25 09:22:26 -07:00
|
|
|
branches:
|
|
|
|
- '*'
|
|
|
|
- '!rc/*'
|
2020-06-23 12:33:25 +02:00
|
|
|
paths-ignore:
|
2019-09-25 09:53:44 -07:00
|
|
|
- 'doc/**'
|
|
|
|
- 'MANUAL.txt'
|
|
|
|
- '*.md'
|
|
|
|
- 'RELEASE_CHECKLIST'
|
|
|
|
- 'BUGS'
|
|
|
|
- 'changelog'
|
|
|
|
- 'README.template'
|
|
|
|
- 'appveyor.yml'
|
|
|
|
- 'tools/**'
|
|
|
|
- 'linux/**'
|
|
|
|
- 'macos/**'
|
|
|
|
- 'windows/**'
|
|
|
|
- 'man/**'
|
2019-09-22 09:01:29 -07:00
|
|
|
pull_request:
|
2020-06-23 12:33:25 +02:00
|
|
|
paths-ignore:
|
2019-09-25 09:53:44 -07:00
|
|
|
- 'doc/**'
|
|
|
|
- 'MANUAL.txt'
|
|
|
|
- '*.md'
|
|
|
|
- 'RELEASE_CHECKLIST'
|
|
|
|
- 'BUGS'
|
|
|
|
- 'changelog'
|
|
|
|
- 'README.template'
|
|
|
|
- 'appveyor.yml'
|
|
|
|
- 'tools/**'
|
|
|
|
- 'linux/**'
|
|
|
|
- 'macos/**'
|
|
|
|
- 'windows/**'
|
|
|
|
- 'man/**'
|
2019-09-12 23:04:58 -07:00
|
|
|
|
|
|
|
jobs:
|
2019-09-13 10:54:55 -07:00
|
|
|
linux:
|
2019-09-12 23:19:15 -07:00
|
|
|
|
2020-06-14 16:45:01 -07:00
|
|
|
runs-on: ubuntu-18.04
|
2019-09-16 23:15:49 -07:00
|
|
|
strategy:
|
2019-09-17 09:24:47 -07:00
|
|
|
fail-fast: true
|
2019-09-16 23:15:49 -07:00
|
|
|
matrix:
|
2019-09-17 09:13:10 -07:00
|
|
|
versions:
|
|
|
|
- ghc: '8.6.5'
|
2020-06-14 23:37:21 -07:00
|
|
|
cabal: '3.2'
|
2021-02-28 18:33:04 -08:00
|
|
|
prefix: ''
|
2021-11-09 23:43:12 -08:00
|
|
|
cabalopts: '-f-embed_data_files'
|
2021-09-08 09:01:25 -07:00
|
|
|
testopts: '--test-option=--hide-successes --test-option=--ansi-tricks=false'
|
2020-09-20 22:33:22 +02:00
|
|
|
- ghc: '8.8.4'
|
2020-06-14 16:41:12 -07:00
|
|
|
cabal: '3.2'
|
2021-02-28 18:33:04 -08:00
|
|
|
prefix: ''
|
2021-03-19 14:34:13 -07:00
|
|
|
cabalopts: ''
|
2021-09-08 09:01:25 -07:00
|
|
|
testopts: '--test-option=--hide-successes --test-option=--ansi-tricks=false'
|
2021-11-17 19:29:01 -06:00
|
|
|
- ghc: '8.10.7'
|
2020-04-17 09:51:33 -07:00
|
|
|
cabal: '3.2'
|
2021-02-28 18:33:04 -08:00
|
|
|
prefix: ''
|
2021-03-19 14:34:13 -07:00
|
|
|
cabalopts: '-ftrypandoc'
|
2021-09-08 09:01:25 -07:00
|
|
|
testopts: '--test-option=--hide-successes --test-option=--ansi-tricks=false'
|
2021-05-25 17:49:48 +02:00
|
|
|
- ghc: '9.0.1'
|
|
|
|
cabal: '3.4'
|
|
|
|
prefix: ''
|
|
|
|
cabalopts: ''
|
2021-09-08 09:01:25 -07:00
|
|
|
testopts: '--test-option=--hide-successes --test-option=--ansi-tricks=false'
|
2022-03-24 09:22:10 -07:00
|
|
|
- ghc: '9.2.2'
|
|
|
|
cabal: '3.6'
|
|
|
|
prefix: ''
|
|
|
|
cabalopts: ''
|
|
|
|
testopts: '--test-option=--hide-successes --test-option=--ansi-tricks=false'
|
2019-09-12 23:04:58 -07:00
|
|
|
steps:
|
2020-09-22 09:13:48 -07:00
|
|
|
- uses: actions/checkout@v2
|
2020-04-12 21:53:38 -07:00
|
|
|
|
2021-05-10 08:45:33 -06:00
|
|
|
# needed by memory
|
|
|
|
- name: Install numa
|
|
|
|
run: sudo apt-get install libnuma-dev
|
|
|
|
|
2022-03-13 23:23:53 -07:00
|
|
|
- name: Install cabal/ghc
|
|
|
|
run: |
|
|
|
|
ghcup install ghc --set ${{ matrix.versions.ghc }}
|
|
|
|
ghcup install cabal ${{ matrix.versions.cabal }}
|
2020-06-15 10:02:31 -07:00
|
|
|
|
2020-04-12 21:53:38 -07:00
|
|
|
# declare/restore cached things
|
|
|
|
# caching doesn't work for scheduled runs yet
|
|
|
|
# https://github.com/actions/cache/issues/63
|
|
|
|
|
2020-04-13 23:04:06 -07:00
|
|
|
- name: Cache cabal global package db
|
2020-04-12 21:53:38 -07:00
|
|
|
id: cabal-global
|
2020-08-15 11:49:43 -07:00
|
|
|
uses: actions/cache@v2
|
2020-04-12 21:53:38 -07:00
|
|
|
with:
|
2020-08-15 11:49:43 -07:00
|
|
|
path: |
|
|
|
|
~/.cabal
|
2020-04-13 23:04:06 -07: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 11:49:43 -07:00
|
|
|
uses: actions/cache@v2
|
2020-04-13 23:04:06 -07:00
|
|
|
with:
|
2020-08-15 11:49:43 -07:00
|
|
|
path: |
|
|
|
|
dist-newstyle
|
2020-04-13 23:04:06 -07:00
|
|
|
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-local
|
2020-04-12 21:53:38 -07:00
|
|
|
|
2019-09-12 23:04:58 -07:00
|
|
|
- name: Install dependencies
|
2019-09-13 09:24:14 -07:00
|
|
|
run: |
|
2021-02-28 18:33:04 -08:00
|
|
|
cabal ${{ matrix.versions.prefix }}update
|
2021-03-19 14:34:13 -07:00
|
|
|
cabal ${{ matrix.versions.prefix }}build ${{ matrix.versions.cabalopts }} --dependencies-only --enable-tests --disable-optimization
|
2021-02-07 03:09:05 +01:00
|
|
|
|
2019-09-16 23:15:49 -07:00
|
|
|
- name: Build and test
|
2019-09-13 09:24:14 -07:00
|
|
|
run: |
|
2021-03-19 14:34:13 -07:00
|
|
|
cabal ${{ matrix.versions.prefix }}build ${{ matrix.versions.cabalopts }} --enable-tests --disable-optimization 2>&1 | tee build.log
|
2019-09-16 23:15:49 -07:00
|
|
|
# fail if warnings in local build
|
2019-10-02 08:31:39 -07:00
|
|
|
! grep -q ": *[Ww]arning:" build.log || exit 1
|
2021-03-19 14:34:13 -07:00
|
|
|
cabal ${{ matrix.versions.prefix }}test ${{ matrix.versions.cabalopts }} --disable-optimization ${{ matrix.versions.testopts }}
|
2019-09-16 09:48:57 -07:00
|
|
|
|
2019-09-13 10:54:55 -07:00
|
|
|
windows:
|
|
|
|
|
2020-06-14 16:41:12 -07:00
|
|
|
runs-on: windows-2019
|
2019-09-13 10:54:55 -07:00
|
|
|
|
|
|
|
steps:
|
2020-09-22 09:13:48 -07:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2020-04-12 15:52:14 -07: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 11:49:43 -07:00
|
|
|
uses: actions/cache@v2
|
2020-04-12 15:52:14 -07:00
|
|
|
with:
|
2020-08-15 11:49:43 -07:00
|
|
|
path: |
|
|
|
|
C:\Users\runneradmin\AppData\Roaming\stack\
|
|
|
|
key: ${{ runner.os }}-appdata-roaming-stack-${{ hashFiles('stack.yaml') }}
|
2020-04-12 15:52:14 -07:00
|
|
|
|
|
|
|
# stack's local package dbs for the project and each package
|
2020-04-18 21:02:06 -07:00
|
|
|
# - name: Cache .stack-work
|
|
|
|
# uses: actions/cache@v1
|
|
|
|
# with:
|
|
|
|
# path: .stack-work
|
2020-04-20 09:06:29 -07:00
|
|
|
# key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}
|
2020-04-18 21:02:06 -07:00
|
|
|
# restore-keys: ${{ runner.os }}-stack-work
|
2020-04-12 15:52:14 -07:00
|
|
|
|
2019-09-14 10:47:29 -07:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
stack update
|
2020-10-04 08:33:16 -07:00
|
|
|
stack install happy
|
2020-05-04 14:34:56 -07:00
|
|
|
stack test --dependencies-only --fast
|
2019-09-13 10:54:55 -07:00
|
|
|
- name: Build and test
|
|
|
|
shell: cmd
|
|
|
|
run: |
|
2021-09-08 09:01:25 -07:00
|
|
|
stack test --fast --test-arguments="--hide-successes --ansi-tricks=false"
|
2019-09-16 21:44:54 -07:00
|
|
|
|
|
|
|
macos:
|
|
|
|
|
2020-06-14 16:41:12 -07:00
|
|
|
runs-on: macOS-10.15
|
2020-09-10 09:44:12 -07:00
|
|
|
strategy:
|
|
|
|
fail-fast: true
|
|
|
|
matrix:
|
|
|
|
versions:
|
2020-10-08 09:12:07 -07:00
|
|
|
- ghc: '8.8.4'
|
2020-09-10 09:44:12 -07:00
|
|
|
cabal: '3.2'
|
2019-09-16 21:44:54 -07:00
|
|
|
|
|
|
|
steps:
|
2020-09-22 09:13:48 -07:00
|
|
|
- uses: actions/checkout@v2
|
2020-09-03 09:42:28 -07:00
|
|
|
|
2022-03-24 09:26:47 -07:00
|
|
|
- name: Install cabal/ghc
|
|
|
|
run: |
|
|
|
|
ghcup install ghc --set ${{ matrix.versions.ghc }}
|
|
|
|
ghcup install cabal ${{ matrix.versions.cabal }}
|
2020-04-12 15:27:30 -07:00
|
|
|
|
|
|
|
# declare/restore cached things
|
2020-09-10 09:44:12 -07:00
|
|
|
# caching doesn't work for scheduled runs yet
|
|
|
|
# https://github.com/actions/cache/issues/63
|
2020-04-12 15:27:30 -07:00
|
|
|
|
2020-09-10 09:44:12 -07:00
|
|
|
- name: Cache cabal global package db
|
|
|
|
id: cabal-global
|
2020-08-15 11:49:43 -07:00
|
|
|
uses: actions/cache@v2
|
2020-04-12 15:27:30 -07:00
|
|
|
with:
|
2020-08-15 11:49:43 -07:00
|
|
|
path: |
|
2020-09-10 09:44:12 -07:00
|
|
|
~/.cabal
|
|
|
|
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-global-${{ hashFiles('cabal.project') }}
|
2020-04-12 15:27:30 -07:00
|
|
|
|
2020-09-10 09:44:12 -07: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-12 15:27:30 -07:00
|
|
|
|
2019-09-16 21:44:54 -07:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2020-09-10 09:44:12 -07:00
|
|
|
cabal v2-update
|
|
|
|
cabal v2-build --dependencies-only --enable-tests --disable-optimization
|
2019-09-16 21:44:54 -07:00
|
|
|
- name: Build and test
|
|
|
|
run: |
|
2020-09-10 09:44:12 -07: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
|
2021-09-08 09:01:25 -07:00
|
|
|
cabal v2-test --disable-optimization --test-option=--hide-successes --test-option=--ansi-tricks=false
|
2021-02-22 21:36:19 -08:00
|
|
|
|
2021-02-22 21:38:58 -08:00
|
|
|
benchmark:
|
2021-02-22 21:36:19 -08:00
|
|
|
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
strategy:
|
|
|
|
fail-fast: true
|
|
|
|
matrix:
|
|
|
|
versions:
|
2021-11-17 19:29:01 -06:00
|
|
|
- ghc: '8.10.7'
|
2021-02-22 21:36:19 -08:00
|
|
|
cabal: '3.2'
|
2022-03-24 09:57:29 -07:00
|
|
|
- ghc: '9.2.2'
|
|
|
|
cabal: '3.6'
|
2021-02-22 21:36:19 -08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
2022-03-24 09:26:47 -07:00
|
|
|
- name: Install cabal/ghc
|
|
|
|
run: |
|
|
|
|
ghcup install ghc --set ${{ matrix.versions.ghc }}
|
|
|
|
ghcup install cabal ${{ matrix.versions.cabal }}
|
2021-02-22 21:36:19 -08:00
|
|
|
|
|
|
|
# declare/restore cached things
|
|
|
|
# caching doesn't work for scheduled runs yet
|
|
|
|
# https://github.com/actions/cache/issues/63
|
|
|
|
|
|
|
|
- name: Cache cabal global package db
|
|
|
|
id: cabal-global
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cabal
|
2021-02-22 23:24:13 -08:00
|
|
|
key: benchmark-${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-global-${{ hashFiles('cabal.project') }}
|
2021-02-22 21:36:19 -08:00
|
|
|
|
|
|
|
- name: Cache cabal work
|
|
|
|
id: cabal-local
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
dist-newstyle
|
2021-02-22 23:24:13 -08:00
|
|
|
key: benchmark-${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-local
|
2021-02-22 21:36:19 -08:00
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
v2=$([ "${{ matrix.versions.cabal }}" = "2.2" ] && printf 'new' || printf 'v2')
|
|
|
|
cabal $v2-update
|
2021-02-22 22:09:32 -08:00
|
|
|
cabal $v2-build --dependencies-only --enable-optimization=1 --enable-benchmarks --disable-tests
|
2021-02-22 21:36:19 -08:00
|
|
|
|
|
|
|
- name: Build and test
|
|
|
|
run: |
|
|
|
|
v2=$([ "${{ matrix.versions.cabal }}" = "2.2" ] && printf 'new' || printf 'v2')
|
2021-02-22 22:09:32 -08:00
|
|
|
cabal $v2-build --enable-optimization=1 --enable-benchmarks --disable-tests 2>&1 | tee build.log
|
2021-02-22 21:36:19 -08:00
|
|
|
# fail if warnings in local build
|
|
|
|
! grep -q ": *[Ww]arning:" build.log || exit 1
|
2021-03-17 17:08:42 -07:00
|
|
|
cabal $v2-bench --enable-optimization=1 --benchmark-options='--timeout=6 +RTS -T -RTS'
|