-
Notifications
You must be signed in to change notification settings - Fork 113
52 lines (48 loc) · 1.73 KB
/
On-Release-Cabal-Linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: "Release testing, Hackage, Cabal, Linux"
on:
release:
# created: a draft is saved, or a release or pre-release is published without previously being saved as a draft
types: [ created ]
env:
cabalConfig: --enable-tests --enable-benchmarks --disable-optimization --enable-deterministic
jobs:
build10:
name: "GHC"
runs-on: ubuntu-latest
strategy:
matrix:
# Since CI by default tests boundary GHCs, test middle versions of GHCs
ghc: [ "9.0" ]
steps:
- name: "Git checkout"
uses: actions/checkout@v4
with:
submodules: recursive
- name: "Haskell env setup"
id: HaskEnvSetup
uses: haskell/actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
- name: "Install additional system packages"
run: sudo apt install libsodium-dev
# 2020-08-01: NOTE: Nix instantiate still needed for HNix tests
- name: "Install Nix"
uses: cachix/install-nix-action@v25
- name: "Repository update"
run: cabal v2-update
# NOTE: Freeze is for the caching
- name: "Configuration freeze"
run: cabal v2-freeze $cabalConfig
- name: "Configuring GitHub cache"
uses: actions/cache@v3
with:
path: |
${{ steps.HaskEnvSetup.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-Cabal-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
# 2022-04-22: `v2-` added to invalidate corrupted caches, can be removed after one week
restore-keys: ${{ runner.os }}-Cabal-${{ matrix.ghc }}-v2-
- name: "Build"
run: cabal v2-build $cabalConfig
- name: "Tests"
run: cabal v2-test $cabalConfig