Cleanup build warnings by removing unused imports, unused variables, etc #763
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
# This CI configuration is inspired by | |
# | |
# https://kodimensional.dev/github-actions | |
# | |
# It builds with a majority of the latest compiler releases from each major GHC | |
# revision on Linux and builds macOS and Windows against the latest GHC. | |
name: CI Matrix | |
# Trigger the workflow on push or pull request, but only for the master branch | |
on: | |
pull_request: | |
push: | |
branches: [master] | |
jobs: | |
docker: | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'false' | |
- name: Setup subrepos | |
run: | | |
git config --global url."https://github.com/".insteadOf "[email protected]:" | |
git config --global url."https://".insteadOf "git://" | |
git submodule update --init | |
- name: Build Docker Image | |
run: | | |
docker build . -t pate | |
- name: Test Docker Image | |
run: | | |
docker run --rm --entrypoint cabal pate run pate-test-aarch32 -- -p args-equal > out.log | |
cat out.log | |
grep -e "All .* tests passed" out.log || exit 1 | |
build: | |
runs-on: ${{ matrix.os }} | |
env: | |
LANG: en_US.UTF-8 | |
LANGUAGE: en_US:en | |
LC_ALL: en_US.UTF-8 | |
TZ: America/Los_Angeles | |
CACHE_VERSION: 3 | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [ 'ppc' ] | |
ghc: ['9.6.2'] | |
cabal: ['3.10.2.0'] | |
os: [self-hosted] | |
name: GHC ${{ matrix.ghc }} on ${{ matrix.os }} pate-${{ matrix.arch }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'false' | |
- name: Setup subrepos and cabal.project | |
run: | | |
git config --global url."https://github.com/".insteadOf "[email protected]:" | |
git config --global url."https://".insteadOf "git://" | |
git submodule update --init | |
cp cabal.project.dist cabal.project | |
- name: Installing the freeze file | |
run: mv cabal.GHC-${{ matrix.ghc }}.freeze cabal.project.freeze | |
- uses: actions/cache@v2 | |
name: Cache cabal store | |
with: | |
path: | | |
~/.cabal/store | |
~/.cabal/packages | |
~/.ghcup | |
dist-newstyle | |
# Our key is the freeze file and also the (constructed) | |
# cabal.project. This captures the normal package dependencies *and* the | |
# submodule hashes (without capturing anything undesirable) | |
key: ${{ env.CACHE_VERSION }}-pate-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze', 'cabal.project') }} | |
restore-keys: | | |
${{ env.CACHE_VERSION }}-pate-${{ runner.os }}-${{ matrix.ghc }}- | |
- uses: haskell/actions/setup@v1 | |
id: setup-haskell-cabal | |
name: Setup Haskell | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
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 bsdiff 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 | |
sudo locale-gen en_US.UTF-8 | |
sudo pip3 install toml | |
- name: Checkout Challenge Problems | |
env: | |
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} | |
GITLAB_USER: ${{ env.GITLAB_USER }} | |
run: | | |
export CHALLENGE_DIR=${HOME}/programtargets | |
git clone --depth=1 https://${GITLAB_USER}:${GITLAB_TOKEN}@gitlab-ext.galois.com/pate/programtargets.git ${CHALLENGE_DIR} | |
cd tests | |
make extras | |
- name: Build pate | |
run: | | |
cabal configure pkg:pate --write-ghc-environment-files=always --enable-tests -j --allow-newer=base | |
cabal build pkg:pate --only-dependencies | |
cabal build pkg:pate | |
- name: Install Solvers | |
run: .github/ci.sh install_system_deps | |
env: | |
Z3_VERSION: "4.8.8" | |
YICES_VERSION: "2.6.2" | |
CVC4_VERSION: "4.1.8" | |
- name: Test | |
if: runner.os == 'Linux' | |
run: | | |
cabal test pkg:pate | |
- name: Docs | |
run: cabal haddock pkg:pate |