Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI fixes #1884

Merged
merged 7 commits into from
Oct 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 21 additions & 32 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ commands:
setup_project:
description: "Setup the machine, clone the repo, checkout the submodules."
steps:
- run: apt-get update && apt-get install -y git ssh unzip
- run: apt-get update && apt-get install -y git ssh unzip wget libtinfo-dev
- run:
name: Install z3
command: |
Expand Down Expand Up @@ -52,17 +52,20 @@ commands:
- run: git ls-tree HEAD liquid-fixpoint > liquid-fixpoint-commit
- restore_cache:
keys:
- cabal-{{ checksum "liquidhaskell.cabal" }}-{{ checksum "<< parameters.project_file >>" }}-{{ checksum "liquid-fixpoint-commit" }}
- cabal-{{ checksum "liquidhaskell.cabal" }}-{{ checksum "<< parameters.project_file >>" }}
- cabal-{{ checksum "liquidhaskell.cabal" }}
- cabal-cache-{{ checksum "liquidhaskell.cabal" }}-{{ checksum "<< parameters.project_file >>" }}-{{ checksum "liquid-fixpoint-commit" }}
- cabal-cache-{{ checksum "liquidhaskell.cabal" }}-{{ checksum "<< parameters.project_file >>" }}
- cabal-cache-{{ checksum "liquidhaskell.cabal" }}
- run:
name: Dependencies
command: |
wget -qO- https://downloads.haskell.org/~cabal/cabal-install-3.6.0.0/cabal-install-3.6.0.0-x86_64-linux.tar.xz | tar xJ
mkdir -p /root/.cabal/bin/
cp cabal /root/.cabal/bin/
<< parameters.cabal_update_command >>
cabal v2-clean
cabal v2-build --project-file << parameters.project_file >> --flag include --flag devel -j1 --enable-tests all
- save_cache:
key: cabal-{{ checksum "liquidhaskell.cabal" }}-{{ checksum "<< parameters.project_file >>" }}-{{ checksum "liquid-fixpoint-commit" }}
key: cabal-cache-{{ checksum "liquidhaskell.cabal" }}-{{ checksum "<< parameters.project_file >>" }}-{{ checksum "liquid-fixpoint-commit" }}
paths:
- ~/.cabal/store
- ./dist-newstyle
Expand Down Expand Up @@ -98,21 +101,22 @@ commands:
type: string
default: ""
steps:
- run: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 8B1DA6120C2BF624
- run: apt-key adv --keyserver keyserver.ubuntu.com --recv 8B1DA6120C2BF624
- setup_project
- run: git ls-tree HEAD liquid-fixpoint > liquid-fixpoint-commit
- restore_cache:
keys:
- stack-{{ checksum "<< parameters.stack_yaml_file >>" }}-{{ checksum "liquidhaskell.cabal" }}-{{ checksum "liquid-fixpoint-commit" }}
- stack-{{ checksum "<< parameters.stack_yaml_file >>" }}-{{ checksum "liquidhaskell.cabal" }}
- stack-{{ checksum "<< parameters.stack_yaml_file >>" }}
- stack-cache-{{ checksum "<< parameters.stack_yaml_file >>" }}-{{ checksum "liquidhaskell.cabal" }}-{{ checksum "liquid-fixpoint-commit" }}
- stack-cache-{{ checksum "<< parameters.stack_yaml_file >>" }}-{{ checksum "liquidhaskell.cabal" }}
- stack-cache-{{ checksum "<< parameters.stack_yaml_file >>" }}
- run:
name: Dependencies
command: |
wget -qO- https://get.haskellstack.org/ | sh
stack --no-terminal --stack-yaml << parameters.stack_yaml_file >> setup
stack --no-terminal --stack-yaml << parameters.stack_yaml_file >> build -j2 --only-dependencies --test --no-run-tests << parameters.extra_build_flags >>
- save_cache:
key: stack-{{ checksum "<< parameters.stack_yaml_file >>" }}-{{ checksum "liquidhaskell.cabal" }}-{{ checksum "liquid-fixpoint-commit" }}
key: stack-cache-{{ checksum "<< parameters.stack_yaml_file >>" }}-{{ checksum "liquidhaskell.cabal" }}-{{ checksum "liquid-fixpoint-commit" }}
paths:
- ~/.stack
- ./.stack-work
Expand All @@ -126,6 +130,7 @@ commands:
stack --no-terminal --stack-yaml << parameters.stack_yaml_file >> sdist
# stack haddock liquidhaskell --flag liquidhaskell:-devel --no-haddock-deps --haddock-arguments="--no-print-missing-docs --odir=$CIRCLE_ARTIFACTS"
stack --no-terminal --stack-yaml << parameters.stack_yaml_file >> haddock << parameters.extra_build_flags >> liquidhaskell --no-haddock-deps --haddock-arguments="--no-print-missing-docs"
no_output_timeout: 30m
- store_test_results:
path: /tmp/junit/stack
- store_artifacts:
Expand All @@ -136,27 +141,11 @@ commands:

jobs:

stack_865_legacy_executable:
docker:
- image: fpco/stack-build:lts-14.12
steps:
- stack_build_and_test:
stack_yaml_file: "stack-8.6.5.yaml"
liquid_runner: "stack --stack-yaml=/root/project/stack-8.6.5.yaml --silent exec -- liquid"
extra_build_flags: "--flag liquidhaskell:include --flag liquid-platform:devel --flag liquidhaskell:no-plugin"

stack_884_legacy_executable:
docker:
- image: fpco/stack-build:lts-16.8
steps:
- stack_build_and_test:
stack_yaml_file: "stack-8.8.4.yaml"
liquid_runner: "stack --stack-yaml=/root/project/stack-8.8.4.yaml --silent exec -- liquid"
extra_build_flags: "--flag liquidhaskell:include --flag liquid-platform:devel --flag liquidhaskell:no-plugin"

stack_810_legacy_executable:
docker:
- image: fpco/stack-build:lts-16.8
- image: ubuntu:16.04
environment:
LANG: C.UTF-8
steps:
- stack_build_and_test:
stack_yaml_file: "stack.yaml"
Expand All @@ -165,7 +154,9 @@ jobs:

stack_810:
docker:
- image: fpco/stack-build:lts-16.8
- image: ubuntu:16.04
environment:
LANG: C.UTF-8
steps:
- stack_build_and_test:
stack_yaml_file: "stack.yaml"
Expand Down Expand Up @@ -195,8 +186,6 @@ workflows:
version: 2
build_stack_and_cabal:
jobs:
- stack_865_legacy_executable
- stack_884_legacy_executable
- stack_810_legacy_executable
- stack_810
- cabal_810
Expand Down
2 changes: 1 addition & 1 deletion src/Language/Haskell/Liquid/UX/Annotate.hs
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ dropErrorLoc msg
instance (Show k, ToJSON a) => ToJSON (Assoc k a) where
toJSON (Asc kas) = object [ tshow k .= toJSON a | (k, a) <- M.toList kas ]
where
tshow = T.pack . show
tshow = fromString . show

instance ToJSON ACSS.AnnMap where
toJSON a = object [ "types" .= toJSON (annTypes a)
Expand Down
5 changes: 4 additions & 1 deletion tests/test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ textOrder = Just . mkOrder $

proverTests :: IO TestTree
proverTests = group "Prover"
[ testGroup "foundations" <$> dirTests "benchmarks/sf" [] ExitSuccess (Just " SAFE ") (Just " UNSAFE ")
[ testGroup "foundations" <$> dirTests "benchmarks/sf" ignoreLists ExitSuccess (Just " SAFE ") (Just " UNSAFE ")
, testGroup "prover_ple_lib" <$> odirTests "benchmarks/popl18/lib" [] proverOrder ExitSuccess (Just " SAFE ") (Just " UNSAFE ")
, testGroup "without_ple_pos" <$> odirTests "benchmarks/popl18/nople/pos" noPleIgnored proverOrder ExitSuccess (Just " SAFE ") (Just " UNSAFE ")
, testGroup "without_ple_neg" <$> odirTests "benchmarks/popl18/nople/neg" noPleIgnored proverOrder (ExitFailure 1) (Just " UNSAFE ") Nothing
Expand Down Expand Up @@ -669,6 +669,9 @@ testCmd bin dir file smt (ExtraOptions (GhcSuitableOpts (LO ghcOpts)) (LiquidOnl
= printf "cd %s && %s -i . --smtsolver %s %s %s" dir bin (show smt) file (ghcOpts <> " " <> liquidOnlyOpts)
#endif

ignoreLists :: [FilePath]
ignoreLists = ["Lists.hs"] -- TODO: Flaky. Sometimes timeouts in CI after 20 minutes. See #1884

noPleIgnored :: [FilePath]
noPleIgnored
= "ApplicativeList.hs" -- TODO-REBARE: TODO BLOWUP but ple version ok
Expand Down