Skip to content

Commit db27c5a

Browse files
Test with lots of ghc versions
1 parent 252826f commit db27c5a

File tree

2 files changed

+63
-87
lines changed

2 files changed

+63
-87
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 87 deletions
This file was deleted.

.github/workflows/haskell-ci.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Haskell-CI
2+
permissions:
3+
contents: read
4+
5+
on:
6+
push:
7+
branches:
8+
- 'main'
9+
pull_request:
10+
branches:
11+
- 'main'
12+
schedule:
13+
- cron: 0 0 * * *
14+
workflow_dispatch:
15+
inputs:
16+
nightly:
17+
description: Run with the same settings as a nightly build
18+
type: boolean
19+
default: false
20+
21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
23+
cancel-in-progress: true
24+
25+
jobs:
26+
test-with-cabal:
27+
name: Haskell-CI - Linux - ${{ matrix.ghc-version }}
28+
29+
strategy:
30+
matrix:
31+
ghc-version: [latest, 9.12, "9.10", 9.8, 9.6, 9.4, 9.2, 9.0, 8.10]
32+
os: [ubuntu-latest]
33+
fail-fast: false
34+
35+
runs-on: ${{ matrix.os }}
36+
37+
steps:
38+
- name: Set NIGHTLY environment variable if the job was triggered by the scheduler
39+
if: "${{ github.event_name == 'schedule'
40+
|| contains(github.event.pull_request.title, 'nightly')
41+
|| contains(github.event.pull_request.title, 'NIGHTLY')
42+
|| github.event_name == 'workflow_dispatch' && github.event.inputs.nightly }}"
43+
run: |
44+
echo "NIGHTLY=true" >> $GITHUB_ENV
45+
46+
- uses: actions/checkout@v4
47+
- uses: haskell-actions/setup@v2
48+
with:
49+
ghc-version: ${{matrix.ghc-version}}
50+
- uses: actions/cache/restore@v4
51+
with:
52+
key: ${{ matrix.os }}-${{ matrix.ghc-version }}-${{ github.sha }}
53+
path: ~/.cabal/store
54+
restore-keys: ${{ matrix.os }}-${{ matrix.ghc-version }}-
55+
- run: cabal install fourmolu-0.19.0.1
56+
- run: fourmolu -c .
57+
- run: cabal build all
58+
- run: cabal test all
59+
- run: cabal haddock all
60+
- uses: actions/cache/save@v4
61+
with:
62+
key: ${{ matrix.os }}-${{ matrix.ghc-version }}-${{ github.sha }}
63+
path: ~/.cabal/store

0 commit comments

Comments
 (0)