mirror of
https://github.com/typeable/haskell-stack-trace-plugin.git
synced 2024-09-19 07:58:11 +03:00
Add GitHub action
This commit is contained in:
parent
d948d8b081
commit
686adf609e
56
.github/workflows/cabal.yml
vendored
Normal file
56
.github/workflows/cabal.yml
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
name: cabal
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags-ignore:
|
||||
- '*'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
schedule:
|
||||
- cron: "00 15 * * *"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
matrix:
|
||||
ghc: ["8.6.5"]
|
||||
cabal: ["3.0"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-haskell@v1
|
||||
with:
|
||||
ghc-version: ${{ matrix.ghc }}
|
||||
cabal-version: ${{ matrix.cabal }}
|
||||
|
||||
- name: Display ghc & cabal version
|
||||
run: |
|
||||
ghc -V
|
||||
cabal -V
|
||||
|
||||
- name: Cache ~/.cabal/store
|
||||
uses: actions/cache@v1.1.0
|
||||
with:
|
||||
path: ~/.cabal/store
|
||||
key: ${{ matrix.ghc }}-v0-cabal-store-${{ hashFiles('*.cabal') }}
|
||||
|
||||
- name: Cache dist-newstyle
|
||||
uses: actions/cache@v1.1.0
|
||||
with:
|
||||
path: dist-newstyle
|
||||
key: ${{ matrix.ghc }}-v0-cabal-dist-${{ hashFiles('*.cabal') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cabal v2-update
|
||||
cabal v2-configure --disable-optimization --enable-tests --write-ghc-environment-files=always -j2
|
||||
cabal v2-build --only-dependencies
|
||||
|
||||
- name: Build & Test
|
||||
run: |
|
||||
cabal v2-build --flag dev
|
||||
cabal v2-test --flag dev
|
Loading…
Reference in New Issue
Block a user