c34340aaaf
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
252 lines
7.5 KiB
YAML
252 lines
7.5 KiB
YAML
name: CI tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '*'
|
|
- '!rc/*'
|
|
paths-ignore:
|
|
- 'doc/**'
|
|
- 'MANUAL.txt'
|
|
- '*.md'
|
|
- 'RELEASE_CHECKLIST'
|
|
- 'BUGS'
|
|
- 'changelog'
|
|
- 'README.template'
|
|
- 'appveyor.yml'
|
|
- 'tools/**'
|
|
- 'linux/**'
|
|
- 'macos/**'
|
|
- 'windows/**'
|
|
- 'man/**'
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'doc/**'
|
|
- 'MANUAL.txt'
|
|
- '*.md'
|
|
- 'RELEASE_CHECKLIST'
|
|
- 'BUGS'
|
|
- 'changelog'
|
|
- 'README.template'
|
|
- 'appveyor.yml'
|
|
- 'tools/**'
|
|
- 'linux/**'
|
|
- 'macos/**'
|
|
- 'windows/**'
|
|
- 'man/**'
|
|
|
|
jobs:
|
|
linux:
|
|
|
|
runs-on: ubuntu-18.04
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
versions:
|
|
- ghc: '8.6.5'
|
|
cabal: '3.2'
|
|
prefix: ''
|
|
cabalopts: '-f-embed_data_files'
|
|
testopts: '--test-option=--hide-successes --test-option=--ansi-tricks=false'
|
|
- ghc: '8.8.4'
|
|
cabal: '3.2'
|
|
prefix: ''
|
|
cabalopts: ''
|
|
testopts: '--test-option=--hide-successes --test-option=--ansi-tricks=false'
|
|
- ghc: '8.10.7'
|
|
cabal: '3.2'
|
|
prefix: ''
|
|
cabalopts: '-ftrypandoc'
|
|
testopts: '--test-option=--hide-successes --test-option=--ansi-tricks=false'
|
|
- ghc: '9.0.1'
|
|
cabal: '3.4'
|
|
prefix: ''
|
|
cabalopts: ''
|
|
testopts: '--test-option=--hide-successes --test-option=--ansi-tricks=false'
|
|
- ghc: '9.2.2'
|
|
cabal: '3.6'
|
|
prefix: ''
|
|
cabalopts: ''
|
|
testopts: '--test-option=--hide-successes --test-option=--ansi-tricks=false'
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
# needed by memory
|
|
- name: Install numa
|
|
run: sudo apt-get install libnuma-dev
|
|
|
|
- name: Install cabal/ghc
|
|
run: |
|
|
ghcup install ghc --set ${{ matrix.versions.ghc }}
|
|
ghcup install cabal ${{ matrix.versions.cabal }}
|
|
|
|
# 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@v3
|
|
with:
|
|
path: |
|
|
~/.cabal
|
|
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-global-${{ hashFiles('cabal.project') }}
|
|
|
|
- name: Cache cabal work
|
|
id: cabal-local
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
dist-newstyle
|
|
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-local
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
cabal ${{ matrix.versions.prefix }}update
|
|
cabal ${{ matrix.versions.prefix }}build ${{ matrix.versions.cabalopts }} --dependencies-only --enable-tests --disable-optimization
|
|
|
|
- name: Build and test
|
|
run: |
|
|
cabal ${{ matrix.versions.prefix }}build ${{ matrix.versions.cabalopts }} --enable-tests --disable-optimization 2>&1 | tee build.log
|
|
# fail if warnings in local build
|
|
! grep -q ": *[Ww]arning:" build.log || exit 1
|
|
cabal ${{ matrix.versions.prefix }}test ${{ matrix.versions.cabalopts }} --disable-optimization ${{ matrix.versions.testopts }}
|
|
|
|
windows:
|
|
|
|
runs-on: windows-2019
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
# 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
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
C:\Users\runneradmin\AppData\Roaming\stack\
|
|
key: ${{ runner.os }}-appdata-roaming-stack-${{ hashFiles('stack.yaml') }}
|
|
|
|
# stack's local package dbs for the project and each package
|
|
# - name: Cache .stack-work
|
|
# uses: actions/cache@v1
|
|
# with:
|
|
# path: .stack-work
|
|
# key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}
|
|
# restore-keys: ${{ runner.os }}-stack-work
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
stack update
|
|
stack install happy
|
|
stack test --dependencies-only --fast
|
|
- name: Build and test
|
|
shell: cmd
|
|
run: |
|
|
stack test --fast --test-arguments="--hide-successes --ansi-tricks=false"
|
|
|
|
macos:
|
|
|
|
runs-on: macOS-10.15
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
versions:
|
|
- ghc: '8.8.4'
|
|
cabal: '3.2'
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install cabal/ghc
|
|
run: |
|
|
ghcup install ghc --set ${{ matrix.versions.ghc }}
|
|
ghcup install cabal ${{ matrix.versions.cabal }}
|
|
|
|
# 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@v3
|
|
with:
|
|
path: |
|
|
~/.cabal
|
|
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-global-${{ hashFiles('cabal.project') }}
|
|
|
|
- name: Cache cabal work
|
|
id: cabal-local
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
dist-newstyle
|
|
key: ${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-local
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
cabal v2-update
|
|
cabal v2-build --dependencies-only --enable-tests --disable-optimization
|
|
- name: Build and test
|
|
run: |
|
|
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 --test-option=--hide-successes --test-option=--ansi-tricks=false
|
|
|
|
benchmark:
|
|
|
|
runs-on: ubuntu-18.04
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
versions:
|
|
- ghc: '8.10.7'
|
|
cabal: '3.2'
|
|
- ghc: '9.2.2'
|
|
cabal: '3.6'
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install cabal/ghc
|
|
run: |
|
|
ghcup install ghc --set ${{ matrix.versions.ghc }}
|
|
ghcup install cabal ${{ matrix.versions.cabal }}
|
|
|
|
# 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@v3
|
|
with:
|
|
path: |
|
|
~/.cabal
|
|
key: benchmark-${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-global-${{ hashFiles('cabal.project') }}
|
|
|
|
- name: Cache cabal work
|
|
id: cabal-local
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
dist-newstyle
|
|
key: benchmark-${{ runner.os }}-${{ matrix.versions.ghc }}-${{ matrix.versions.cabal }}-cabal-local
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
v2=$([ "${{ matrix.versions.cabal }}" = "2.2" ] && printf 'new' || printf 'v2')
|
|
cabal $v2-update
|
|
cabal $v2-build --dependencies-only --enable-optimization=1 --enable-benchmarks --disable-tests
|
|
|
|
- name: Build and test
|
|
run: |
|
|
v2=$([ "${{ matrix.versions.cabal }}" = "2.2" ] && printf 'new' || printf 'v2')
|
|
cabal $v2-build --enable-optimization=1 --enable-benchmarks --disable-tests 2>&1 | tee build.log
|
|
# fail if warnings in local build
|
|
! grep -q ": *[Ww]arning:" build.log || exit 1
|
|
cabal $v2-bench --enable-optimization=1 --benchmark-options='--timeout=6 +RTS -T -RTS'
|