2019-12-13 22:06:45 +03:00
|
|
|
name: Haskell CI
|
|
|
|
|
|
|
|
on: [pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: ghc ${{ matrix.ghc }}
|
|
|
|
runs-on: ubuntu-16.04
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
ghc: ["8.8.1"]
|
|
|
|
cabal: ["3.0"]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
if: github.event.action == 'opened' || github.event.action == 'synchronize'
|
|
|
|
|
|
|
|
- uses: actions/setup-haskell@v1
|
|
|
|
name: Setup Haskell
|
|
|
|
with:
|
|
|
|
ghc-version: ${{ matrix.ghc }}
|
|
|
|
cabal-version: ${{ matrix.cabal }}
|
|
|
|
|
2019-12-17 22:12:21 +03:00
|
|
|
- uses: actions/cache@v1
|
2019-12-13 22:06:45 +03:00
|
|
|
name: Cache ~/.cabal/packages
|
|
|
|
with:
|
|
|
|
path: ~/.cabal/packages
|
|
|
|
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-packages
|
2019-12-17 22:12:21 +03:00
|
|
|
|
|
|
|
- uses: actions/cache@v1
|
2019-12-13 22:06:45 +03:00
|
|
|
name: Cache ~/.cabal/store
|
|
|
|
with:
|
|
|
|
path: ~/.cabal/store
|
|
|
|
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-store
|
2019-12-17 22:12:21 +03:00
|
|
|
|
|
|
|
- uses: actions/cache@v1
|
2019-12-13 22:06:45 +03:00
|
|
|
name: Cache dist-newstyle
|
|
|
|
with:
|
|
|
|
path: dist-newstyle
|
2019-12-13 22:09:56 +03:00
|
|
|
key: ${{ runner.os }}-${{ matrix.ghc }}-semantic-dist
|
2019-12-13 22:06:45 +03:00
|
|
|
|
2019-12-17 22:59:16 +03:00
|
|
|
|
2019-12-13 22:06:45 +03:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
cabal v2-update
|
|
|
|
cabal v2-configure --disable-optimization --enable-benchmarks --enable-tests --write-ghc-environment-files=always -j2
|
|
|
|
cabal v2-build --only-dependencies
|
|
|
|
|
2019-12-16 20:27:01 +03:00
|
|
|
- name: hlint
|
|
|
|
run: |
|
2019-12-17 05:21:04 +03:00
|
|
|
cabal install hlint --installdir=dist-newstyle
|
|
|
|
dist-newstyle/hlint src semantic-python
|
2019-12-16 20:20:11 +03:00
|
|
|
|
2019-12-13 22:06:45 +03:00
|
|
|
- name: Build & test
|
|
|
|
run: |
|
|
|
|
cabal v2-build
|
|
|
|
cabal v2-run semantic:test
|
|
|
|
cabal v2-run semantic-core:test
|
|
|
|
cabal v2-run semantic-python:test
|
2019-12-17 19:26:13 +03:00
|
|
|
cd semantic-source; cabal v2-run semantic-source:test; cd ..
|
|
|
|
cd semantic-source; cabal v2-run semantic-source:doctest -- src; cd ..
|