wip #715
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: ["8.8.4", "8.10.7", "9.0.2", "9.2.2"] | |
cabal: [ '3.6.2.0' ] | |
os: [self-hosted] | |
# complete all jobs | |
fail-fast: false | |
name: Macaw - GHC v${{ matrix.ghc-ver }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- uses: haskell/actions/setup@v1 | |
id: setup-haskell | |
name: Setup Haskell | |
with: | |
ghc-version: ${{ matrix.ghc-ver }} | |
cabal-version: ${{ matrix.cabal }} | |
- name: Cache | |
uses: actions/cache@v1 | |
with: | |
path: /home/runner/.cabal/store/ghc-${{ matrix.ghc-ver }} | |
# 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: 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 | |
- 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-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 |