-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (58 loc) · 2 KB
/
ci.yaml
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
53
54
55
56
57
58
59
name: CI
on:
push:
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
matrix:
ghc-ver: ["9.2.8", "9.4.8", "9.6.6"]
cabal: ["3.10.3.0"]
# complete all jobs
fail-fast: false
name: macaw-loader - GHC v${{ matrix.ghc-ver }} - ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Copy cabal project files
run: |
cp cabal.project.dist cabal.project
- uses: haskell-actions/setup@v2
id: setup-haskell
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc-ver }}
cabal-version: ${{ matrix.cabal }}
- uses: actions/cache/restore@v3
name: Restore cabal store cache
with:
path: /home/runner/.cabal/store/ghc-${{ matrix.ghc-ver }}
# Prefer previous SHA hash if it is still cached
key: linux-${{ matrix.ghc-ver }}-${{ hashFiles('cabal.project.freeze') }}-${{ github.sha }}
# otherwise just use most recent build.
restore-keys: linux-${{ matrix.ghc-ver }}-${{ hashFiles('cabal.project.freeze') }}
- name: Cabal update
run: cabal update
# Build macaw-base dependencies and crucible separately just so later
# steps are less verbose and major dependency failures are separate.
- name: Dependencies
run: |
cabal build --only-dependencies macaw-loader macaw-loader-ppc macaw-loader-aarch32 macaw-loader-x86
- name: macaw-loader-x86
run: |
cabal build pkg:macaw-loader-x86
- name: macaw-loader-aarch32
run: |
cabal build pkg:macaw-loader-aarch32
- name: macaw-loader-ppc
run: |
cabal build pkg:macaw-loader-ppc
- uses: actions/cache/save@v3
name: Save cabal store cache
if: always()
with:
path: /home/runner/.cabal/store/ghc-${{ matrix.ghc-ver }}
# Prefer previous SHA hash if it is still cached
key: linux-${{ matrix.ghc-ver }}-${{ hashFiles('cabal.project.freeze') }}-${{ github.sha }}