Skip to content

Commit 785a110

Browse files
committed
update github workflows
1 parent ba180ca commit 785a110

File tree

2 files changed

+44
-15
lines changed

2 files changed

+44
-15
lines changed

.github/workflows/cabal-ci.yaml

+40-10
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: Build with Cabal
33
on:
44
push:
55
workflow_dispatch:
6-
schedule:
7-
- cron: '0 9 * * *'
86

97
jobs:
108

@@ -14,20 +12,22 @@ jobs:
1412
strategy:
1513
fail-fast: false
1614
matrix:
17-
ghc: ['8.10', '9.0', '9.2', '9.4', '9.6']
18-
cabal: ['3.10']
19-
os: ['ubuntu-20.04', 'ubuntu-22.04', 'macOS-latest']
15+
ghc: ['9.6', '9.8', '9.10', '9.12']
16+
cabal: ['latest']
17+
os: ['ubuntu-22.04', 'ubuntu-24.04', 'macOS-latest']
2018

2119
steps:
2220

2321
# Setup
2422
- name: Checkout repository
25-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
24+
2625
- name: Install GHC and Cabal
27-
uses: haskell/actions/setup@v2
26+
uses: haskell-actions/setup@v2
2827
with:
2928
ghc-version: ${{ matrix.ghc }}
3029
cabal-version: ${{ matrix.cabal }}
30+
3131
- name: Configure project
3232
run: |
3333
cat > cabal.project.local <<EOF
@@ -38,24 +38,54 @@ jobs:
3838
EOF
3939
4040
# Restore Packages from Caches
41-
- uses: actions/cache@v3
42-
name: Cache dist-newstyle
41+
- name: Restore cache ~/.cabal/packages and ~/.cabal/store
42+
id: deps-cache-restore
43+
uses: actions/cache/restore@v4
4344
with:
4445
path: |
4546
~/.cabal/packages
4647
~/.cabal/store
48+
key: deps-${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal', '**/cabal.project', '**/cabal.project.local') }}
49+
restore-keys: |
50+
deps-${{ matrix.os }}-${{ matrix.ghc }}-
51+
52+
# Restore dist-newstyle
53+
- name: Cache dist-newstyle
54+
uses: actions/cache@v4
55+
with:
56+
path: |
4757
dist-newstyle
48-
key: ${{ matrix.os }}-${{ matrix.ghc }}-0-cabal
58+
key: dist-${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal', '**/cabal.project', '**/cabal.project.local') }}
59+
restore-keys: |
60+
dist-${{ matrix.os }}-${{ matrix.ghc }}-
61+
save-always: true
4962

5063
# Build
5164
- name: Update package database
5265
run: cabal update
66+
5367
- name: Configure build
5468
run: |
5569
cabal build all --dry-run
5670
cabal freeze
71+
cat cabal.project.freeze
72+
73+
- name: Show outdated packages
74+
run: cabal outdated
75+
5776
- name: Install build dependencies
5877
run: cabal build --only-dependencies
78+
79+
# Save packages
80+
- name: Save cache for ~/.cabal/packages and ~/.cabal/store
81+
uses: actions/cache/save@v4
82+
if: always()
83+
with:
84+
path: |
85+
~/.cabal/packages
86+
~/.cabal/store
87+
key: ${{ steps.deps-cache-restore.outputs.cache-primary-key }}
88+
5989
- name: Build library
6090
run: cabal build
6191

digraph.cabal

+4-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ maintainer: [email protected]
1212
copyright: Copyright (c) 2019 - 2023, Kadena LLC
1313
category: Data, Mathematics
1414
tested-with:
15-
GHC==9.6.1
16-
GHC==9.4.4
17-
GHC==9.2.4
18-
GHC==9.0.2
19-
GHC==8.10.7
15+
GHC==9.12
16+
GHC==9.10
17+
GHC==9.8
18+
GHC==9.6
2019
extra-source-files:
2120
README.md
2221
CHANGELOG.md

0 commit comments

Comments
 (0)