-
Notifications
You must be signed in to change notification settings - Fork 21
156 lines (132 loc) · 5.12 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# Note: We build everything on all architectures, but we only test things
# requiring SMT solvers on Linux
name: CI
on:
push:
# 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).
env:
CACHE_VERSION: 3
jobs:
build-linux:
env:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
TZ: America/Los_Angeles
CI_TEST_LEVEL: "2"
runs-on: ${{ matrix.os }}
strategy:
matrix:
ghc-ver: ["9.2.8", "9.4.5", "9.6.2"]
cabal: [ '3.10.1.0' ]
os: [self-hosted]
# complete all jobs
fail-fast: false
name: Macaw - GHC v${{ matrix.ghc-ver }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- uses: haskell/actions/setup@v2
id: setup-haskell
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc-ver }}
cabal-version: ${{ matrix.cabal }}
- name: System Dependencies
run: |
sudo apt update
sudo apt install -y software-properties-common apt-transport-https ca-certificates wget
sudo apt install -y curl zlibc zlib1g zlib1g-dev git zip \
libgmp3-dev build-essential libtinfo-dev autoconf automake gperf cmake locales \
python3-distutils python-setuptools antlr3 libantlr3c-dev libtool libtool-bin libboost-all-dev python3-pip libfftw3-dev \
language-pack-en-base language-pack-en
sudo locale-gen en_US.UTF-8
sudo update-locale LANG=$LANG LANGUAGE=$LANGUAGE
# Softfloat repo needs to be recursively cloned
cd deps/softfloat-hs
git submodule update --init --recursive
cd ../..
- name: Copy cabal project files
run: |
cp cabal.project.dist cabal.project
cp cabal.project.werror cabal.project.local
cp cabal.project.freeze.ghc-${{ matrix.ghc-ver }} cabal.project.freeze
# WARNING: Make sure this step remains after the step that creates
# cabal.project.freeze, or the cache key will be incorrect!
- uses: actions/cache/restore@v3
name: Restore cabal store cache
with:
path: |
/home/runner/.cabal/store/ghc-${{ matrix.ghc-ver }}
dist-newstyle
# Prefer previous SHA hash if it is still cached
key: ${{ env.CACHE_VERSION }}-linux-${{ matrix.ghc-ver }}-${{ hashFiles('cabal.project.freeze') }}-${{ github.sha }}
# otherwise just use most recent build.
restore-keys: ${{ env.CACHE_VERSION }}-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: Cabal dependencies
run: |
cabal configure --enable-tests all
cabal build -j --only-dependencies pkg:macaw-base
cabal build -j pkg:crucible-llvm pkg:dismantle-ppc pkg:dismantle-arm-xml
- name: Install Solvers
if: runner.os == 'Linux'
run: .github/ci.sh install_system_deps
env:
Z3_VERSION: "4.8.8"
YICES_VERSION: "2.6.2"
CVC4_VERSION: "4.1.8"
- name: Build macaw-symbolic-syntax
run: cabal build pkg:macaw-symbolic-syntax
- name: Test macaw-symbolic-syntax
run: cabal test pkg:macaw-symbolic-syntax
- name: Build macaw-x86
run: cabal build pkg:macaw-x86 pkg:macaw-x86-symbolic
- name: Test macaw-x86
run: cabal test pkg:macaw-x86
- name: Test macaw-x86-symbolic
if: runner.os == 'Linux'
run: cabal test pkg:macaw-x86-symbolic
- name: Build macaw-aarch32
run: cabal build pkg:macaw-aarch32 pkg:macaw-aarch32-symbolic
- name: Test macaw-aarch32
run: cabal test pkg:macaw-aarch32
- name: Test macaw-aarch32-symbolic
if: runner.os == 'Linux'
run: cabal test pkg:macaw-aarch32-symbolic
- name: Build macaw-ppc
run: cabal build pkg:macaw-ppc pkg:macaw-ppc-symbolic
- name: Test macaw-ppc
run: cabal test pkg:macaw-ppc
- name: Test macaw-ppc-symbolic
if: runner.os == 'Linux'
run: cabal test pkg:macaw-ppc-symbolic
- name: Build macaw-riscv
run: cabal build pkg:macaw-riscv
- name: Test macaw-riscv
run: cabal test pkg:macaw-riscv
- name: Build macaw-refinement
run: cabal build pkg:macaw-refinement
- name: Test macaw-refinement
if: runner.os == 'Linux'
run: cabal test pkg:macaw-refinement
- name: Build compare-dwarfdump
run: cabal build compare-dwarfdump
- uses: actions/cache/save@v3
name: Save cabal store cache
if: always()
with:
path: |
/home/runner/.cabal/store/ghc-${{ matrix.ghc-ver }}
dist-newstyle
# Prefer previous SHA hash if it is still cached
key: ${{ env.CACHE_VERSION }}-linux-${{ matrix.ghc-ver }}-${{ hashFiles('cabal.project.freeze') }}-${{ github.sha }}