Skip to content

Commit d4f6ce1

Browse files
authored
Merge pull request #2 from distrap/srk/ci
Update CI
2 parents 11f5cf6 + eb4ae24 commit d4f6ce1

File tree

3 files changed

+47
-54
lines changed

3 files changed

+47
-54
lines changed

.github/workflows/ci.yaml

Lines changed: 43 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,51 @@
1+
# Code generated by dhall-to-yaml. DO NOT EDIT.
12
jobs:
23
build:
3-
runs-on: ubuntu-latest
4+
name: "GHC ${{ matrix.ghc }}, Cabal ${{ matrix.cabal }}, OS ${{ matrix.os }}"
5+
"runs-on": "${{ matrix.os }}"
46
steps:
5-
- uses: "actions/checkout@v3"
6-
- id: setup-haskell-cabal
7-
uses: "haskell/actions/setup@v2"
8-
with:
9-
cabal-version: "${{ matrix.cabal }}"
10-
enable-stack: false
11-
ghc-version: "${{ matrix.ghc }}"
12-
- name: Update Hackage repository
13-
run: cabal update
14-
- name: cabal.project.local.ci
15-
run: |
16-
if [ -e cabal.project.local.ci ]; then
17-
cp cabal.project.local.ci cabal.project.local
18-
fi
19-
- name: freeze
20-
run: cabal freeze
21-
- uses: "actions/cache@v3"
22-
with:
23-
key: "${{ runner.os }}-${{ matrix.ghc }}-cabal-${{ hashFiles('cabal.project.freeze') }}"
24-
path: |
25-
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
26-
dist-newstyle
27-
- name: Install dependencies
28-
run: cabal build all --enable-tests --enable-benchmarks --only-dependencies
29-
- name: build all
30-
run: cabal build all --enable-tests --enable-benchmarks
31-
- name: test all
32-
run: cabal test all --enable-tests
33-
- name: haddock all
34-
run: cabal haddock all
7+
- uses: "actions/checkout@v4"
8+
with:
9+
submodules: recursive
10+
- id: "setup-haskell-cabal"
11+
uses: "haskell-actions/setup@v2"
12+
with:
13+
"cabal-version": "${{ matrix.cabal }}"
14+
"ghc-version": "${{ matrix.ghc }}"
15+
- name: Update Hackage repository
16+
run: cabal update
17+
- name: cabal.project.local.ci
18+
run: |
19+
if [ -e cabal.project.local.ci ]; then
20+
cp cabal.project.local.ci cabal.project.local
21+
fi
22+
- name: freeze
23+
run: "cabal freeze --enable-tests --enable-benchmarks"
24+
- uses: "actions/cache@v3"
25+
with:
26+
key: "${{ matrix.os }}-${{ matrix.ghc }}-${{ matrix.cabal}}-${{ hashFiles('cabal.project.freeze') }}"
27+
path: |
28+
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
29+
dist-newstyle
30+
- name: Install dependencies
31+
run: "cabal build all --enable-tests --enable-benchmarks --only-dependencies"
32+
- name: build all
33+
run: "cabal build all --enable-tests --enable-benchmarks"
34+
- name: test all
35+
run: "cabal test all --enable-tests"
36+
- name: haddock all
37+
run: cabal haddock all
3538
strategy:
3639
matrix:
3740
cabal:
38-
- '3.6'
41+
- '3.10'
3942
ghc:
40-
- '8.10.7'
41-
- '9.0.2'
42-
- '9.2.4'
43+
- '9.6.3'
44+
os:
45+
- "ubuntu-latest"
4346
name: Haskell CI
44-
on:
45-
- push
46-
- pull_request
47+
'on':
48+
pull_request: {}
49+
push: {}
50+
schedule:
51+
- cron: "4 20 10 * *"

ci.dhall

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
11
let haskellCi =
2-
https://raw.githubusercontent.com/sorki/github-actions-dhall/pending/haskell-ci.dhall
2+
https://raw.githubusercontent.com/sorki/github-actions-dhall/main/haskell-ci.dhall
33

4-
in haskellCi.generalCi
5-
haskellCi.matrixSteps
6-
( Some
7-
{ ghc =
8-
[ haskellCi.GHC.GHC8107
9-
, haskellCi.GHC.GHC902
10-
, haskellCi.GHC.GHC924
11-
]
12-
, cabal = [ haskellCi.Cabal.Cabal36 ]
13-
}
14-
)
15-
: haskellCi.CI.Type
4+
in haskellCi.defaultCi : haskellCi.CI.Type

ci.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
set -eo pipefail
55
cd "$( dirname "${BASH_SOURCE[0]}" )"
66

7-
echo "regenerating .github/workflows/ci.yaml..."
7+
echo "regenerating .github/workflows/ci.yaml"
88

99
mkdir -p .github/workflows
1010

11-
# based on https://github.com/vmchale/github-actions-dhall
1211
which dhall-to-yaml || cabal install dhall-yaml
13-
dhall-to-yaml --file ci.dhall > .github/workflows/ci.yaml
12+
dhall-to-yaml-ng --generated-comment --file ci.dhall > .github/workflows/ci.yaml

0 commit comments

Comments
 (0)