Use Data.Data to get constructor names #206
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI tests | |
# Trigger the workflow on push or pull request, but only for the master branch | |
on: | |
pull_request: | |
branches: | |
- 'main' | |
paths-ignore: | |
- '.gitignore' | |
- 'LICENSE' | |
- 'README.md' | |
push: | |
branches: | |
- '*' | |
paths-ignore: | |
- '.gitignore' | |
- 'LICENSE' | |
- 'README.md' | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: >- | |
ghc ${{ matrix.version.ghc }}; cabal ${{ matrix.version.cabal }}; | |
lua ${{ matrix.version.lua }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: | |
- ghc: '8.6.5' | |
cabal: '3.2' | |
lua: '-allow-unsafe-gc' | |
- ghc: '8.8.4' | |
cabal: '3.2' | |
lua: '+pkg-config' | |
- ghc: '8.10.7' | |
cabal: '3.2' | |
lua: '+apicheck' | |
- ghc: '9.0.2' | |
cabal: '3.4' | |
lua: '-export-dynamic' | |
- ghc: '9.2.5' | |
cabal: '3.6' | |
lua: '+apicheck' | |
- ghc: '9.4.4' | |
cabal: '3.8' | |
lua: '-apicheck' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install recent cabal/ghc | |
uses: haskell/actions/setup@v2 | |
with: | |
ghc-version: ${{ matrix.version.ghc }} | |
cabal-version: ${{ matrix.version.cabal }} | |
- name: Install system Lua | |
run: | | |
sudo apt update | |
sudo apt install lua5.4 liblua5.4-dev | |
- uses: actions/cache@v3 | |
name: Cache ~/.cabal/store | |
with: | |
path: ~/.cabal/store | |
key: ${{ runner.os }}-${{ matrix.version.ghc }}-cabal | |
- name: Build | |
run: | | |
cabal update | |
cabal build \ | |
--enable-tests \ | |
--constraint 'lua ${{ matrix.version.lua }}' | |
- name: Test | |
run: | | |
cabal test --enable-tests \ | |
--constraint 'lua ${{ matrix.version.lua }}' | |
windows: | |
name: Windows (stack) | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- 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 }}-stack-${{ hashFiles('stack.yaml') }} | |
- name: Install dependencies | |
run: | | |
stack update | |
stack test --dependencies-only --fast | |
- name: Build | |
shell: cmd | |
run: | | |
stack test --no-run-tests --fast | |
- name: Test | |
shell: cmd | |
run: | | |
stack test --fast --test-arguments="--ansi-tricks=false" |