Skip to content

Commit 6f20066

Browse files
committed
fix build with remote config and update ci
1 parent 60ccfeb commit 6f20066

File tree

2 files changed

+41
-14
lines changed

2 files changed

+41
-14
lines changed

.github/workflows/cabal-ci.yaml

+40-13
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,23 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
ghc: ['8.10.7', '9.0.1', '9.2', '9.4', '9.6']
14-
cabal: ['3.10']
15-
os: ['ubuntu-22.04', 'ubuntu-20.04', 'macOS-latest']
13+
ghc: ['9.4', '9.6', '9.8', '9.10', '9.12']
14+
cabal: ['latest']
15+
os: ['ubuntu-22.04', 'ubuntu-24.04', 'macOS-latest']
1616
remoteConfigs: ['-remote-configs', '+remote-configs']
17-
include:
18-
- ghc: '9.2'
19-
cabal: '3.6'
20-
os: 'ubuntu-22.04'
21-
remoteConfigs: '+remote-configs'
2217

2318
steps:
2419

2520
# Setup
2621
- name: Checkout repository
27-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
23+
2824
- name: Install GHC and Cabal
29-
uses: haskell/actions/setup@v2
25+
uses: haskell-actions/setup@v2
3026
with:
3127
ghc-version: ${{ matrix.ghc }}
3228
cabal-version: ${{ matrix.cabal }}
29+
3330
- name: Configure project
3431
run: |
3532
cat > cabal.project.local <<EOF
@@ -41,24 +38,54 @@ jobs:
4138
EOF
4239
4340
# Restore Packages from Caches
44-
- uses: actions/cache@v3
45-
name: Cache cabal packages
41+
- name: Restore cache ~/.cabal/packages and ~/.cabal/store
42+
id: deps-cache-restore
43+
uses: actions/cache/restore@v4
4644
with:
4745
path: |
4846
~/.cabal/packages
4947
~/.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: |
5057
dist-newstyle
51-
key: ${{ matrix.os }}-${{ matrix.ghc }}-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
5262

5363
# Build
5464
- name: Update package database
5565
run: cabal update
66+
5667
- name: Configure build
5768
run: |
5869
cabal build all --dry-run
5970
cabal freeze
71+
cat cabal.project.freeze
72+
73+
- name: Show outdated packages
74+
run: cabal outdated
75+
6076
- name: Install build dependencies
6177
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+
6289
- name: Build library
6390
run: cabal build
6491

src/Configuration/Utils/Internal/HttpsCertPolicy.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ handleTlsException
189189
Maybe (TLS.SignedExact TLS.Certificate)
190190
TLS.TLSException
191191
IO a
192-
handleTlsException request cert e@(TLS.HandshakeFailed (TLS.Error_Protocol (msg, _b, _alert)))
192+
handleTlsException request cert e@(TLS.HandshakeFailed (TLS.Error_Protocol msg _))
193193
| "certificate rejected: [SelfSigned]" `L.isPrefixOf` msg = throwIO VerboseTlsException
194194
$ "The server uses a self-signed certificate. If you are sure that no-one"
195195
" is intercepting the connection and this is the correct certificate you"

0 commit comments

Comments
 (0)