2024-10-18 07:11:13 +03:00
|
|
|
name: Haskell CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
types: [synchronize, opened, reopened]
|
2024-11-03 18:07:26 +03:00
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * 0"
|
2024-10-18 07:11:13 +03:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2024-11-03 17:12:41 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-11-03 18:07:26 +03:00
|
|
|
ghc: ["9.4.1", "9.6.6", "9.8.2"]
|
2024-10-18 07:11:13 +03:00
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2024-11-03 17:12:41 +03:00
|
|
|
- uses: actions/checkout@v4
|
2024-11-03 17:33:49 +03:00
|
|
|
- uses: haskell-actions/setup@v2.7.6
|
2024-11-03 17:12:41 +03:00
|
|
|
with:
|
|
|
|
ghc-version: ${{ matrix.ghc }}
|
|
|
|
cabal-version: "3.10"
|
2024-10-18 07:11:13 +03:00
|
|
|
|
2024-11-03 17:12:41 +03:00
|
|
|
- name: Cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
env:
|
|
|
|
cache-name: cache-cabal
|
|
|
|
with:
|
|
|
|
path: ~/.cabal
|
|
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
|
|
|
${{ runner.os }}-build-
|
|
|
|
${{ runner.os }}-
|
2024-10-18 07:11:13 +03:00
|
|
|
|
2024-11-03 17:12:41 +03:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
cabal update
|
2024-11-03 18:36:32 +03:00
|
|
|
cabal build --only-dependencies --enable-tests --disable-benchmarks all
|
2024-11-03 17:12:41 +03:00
|
|
|
- name: Build
|
2024-11-03 18:36:32 +03:00
|
|
|
run: cabal build --enable-tests --disable-benchmarks all
|
2024-11-03 17:12:41 +03:00
|
|
|
- name: Run tests
|
2024-11-03 18:26:33 +03:00
|
|
|
run: cabal test --test-show-details=direct all
|