-
Notifications
You must be signed in to change notification settings - Fork 1
88 lines (75 loc) · 2.69 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: copilot-verifier
on:
push:
branches: [master]
pull_request:
env:
SOLVER_PKG_VERSION: "snapshot-20221212"
# The CACHE_VERSION can be updated to force the use of a new cache if
# the current cache contents become corrupted/invalid. This can
# sometimes happen when (for example) the OS version is changed but
# older .so files are cached, which can have various effects
# (e.g. cabal complains it can't find a valid version of the "happy"
# tool).
CACHE_VERSION: 1
LLVM_VERSION: 12
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
ghc-version: ["8.10.7", "9.2.8", "9.4.8"]
cabal: [ '3.10.2.0' ]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: ${{ matrix.ghc-version }}
cabal-version: ${{ matrix.cabal }}
- uses: actions/cache/restore@v3
name: Restore cabal store cache
with:
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
dist-newstyle
key: ${{ env.CACHE_VERSION }}-cabal-${{ matrix.os }}-${{ matrix.ghc-version }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc-version)) }}-${{ github.sha }}
restore-keys: |
${{ env.CACHE_VERSION }}-cabal-${{ matrix.os }}-${{ matrix.ghc-version }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc-version)) }}-
- shell: bash
name: Install system dependencies
run: .github/ci.sh install_system_deps
env:
BIN_ZIP_FILE: ${{ matrix.os }}-bin.zip
BUILD_TARGET_OS: ${{ matrix.os }}
- shell: bash
name: Update
run: cabal update
- shell: bash
name: Configure
run: cabal configure --enable-tests -j2 all
- shell: bash
name: Build copilot-verifier
run: cabal build pkg:copilot-verifier
- shell: bash
name: Build copilot-verifier-demo
run: cabal build pkg:copilot-verifier-demo
- shell: bash
name: Test copilot-verifier
run: cabal test pkg:copilot-verifier
- shell: bash
name: Check copilot-verifier.cabal
run: cabal check
working-directory: copilot-verifier
- uses: actions/cache/save@v3
name: Save cabal store cache
if: always()
with:
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
dist-newstyle
key: ${{ env.CACHE_VERSION }}-cabal-${{ matrix.os }}-${{ matrix.ghc-version }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc-version)) }}-${{ github.sha }}