mirror of
https://github.com/haskell/haskell-ide-engine.git
synced 2024-10-26 19:29:32 +03:00
159 lines
4.1 KiB
YAML
159 lines
4.1 KiB
YAML
defaults: &defaults
|
|
working_directory: ~/build
|
|
docker:
|
|
- image: quay.io/haskell_works/stack-build-icu
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
command: git submodule sync --recursive
|
|
- run:
|
|
command: git submodule update --recursive --init
|
|
- run:
|
|
name: Write provided stack.yaml with predictable name
|
|
command: cp ${STACK_FILE} stack-build.txt
|
|
|
|
- run:
|
|
name: Figure out resolver for better caching
|
|
command: grep '^resolver:' stack-build.txt > resolver.txt
|
|
|
|
- run:
|
|
name: Create a composite cabal file for changes detection
|
|
command: find . -name "*.cabal" | grep -v "stack-work" | xargs cat > all-cabal.txt
|
|
|
|
- restore_cache:
|
|
keys:
|
|
- stack-cache-04-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }}
|
|
- stack-cache-04-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}
|
|
- stack-cache-04-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }}
|
|
|
|
- run:
|
|
name: Stack setup
|
|
command: stack -j 2 --stack-yaml=${STACK_FILE} setup
|
|
|
|
- run:
|
|
name: Install happy
|
|
command: stack --stack-yaml=${STACK_FILE} install happy
|
|
|
|
- run:
|
|
name: Install Hoogle
|
|
command: stack --stack-yaml=${STACK_FILE} install hoogle
|
|
|
|
- run:
|
|
name: Build
|
|
command: stack -j 2 --stack-yaml=${STACK_FILE} build
|
|
|
|
- run:
|
|
name: Generate Hoogle database
|
|
command: stack --stack-yaml=${STACK_FILE} exec hoogle generate
|
|
|
|
- save_cache:
|
|
key: stack-cache-04-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }}
|
|
paths:
|
|
- ~/.stack
|
|
- ~/.cache
|
|
|
|
- restore_cache:
|
|
key: stack-work-dirs-04-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}
|
|
|
|
- run:
|
|
name: Test
|
|
command: stack -j 2 --stack-yaml=${STACK_FILE} test --dump-logs
|
|
no_output_timeout: 120m
|
|
|
|
- store_artifacts:
|
|
path: test-logs
|
|
|
|
- save_cache:
|
|
key: stack-cache-04-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}
|
|
paths:
|
|
- ~/.stack
|
|
- ~/.cache
|
|
|
|
- save_cache:
|
|
key: stack-cache-04-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}-{{ checksum "all-cabal.txt" }}
|
|
paths:
|
|
- ~/.stack
|
|
- ~/.cache
|
|
|
|
- save_cache:
|
|
key: stack-work-dirs-04-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}
|
|
paths:
|
|
- ~/build/.stack-work
|
|
- ~/build/hie-plugin-api/.stack-work
|
|
|
|
version: 2
|
|
jobs:
|
|
ghc-8.0.2:
|
|
environment:
|
|
- STACK_FILE: "stack-8.0.2.yaml"
|
|
<<: *defaults
|
|
|
|
ghc-8.2.1:
|
|
environment:
|
|
- STACK_FILE: "stack-8.2.1.yaml"
|
|
<<: *defaults
|
|
|
|
ghc-8.2.2:
|
|
environment:
|
|
- STACK_FILE: "stack-8.2.2.yaml"
|
|
<<: *defaults
|
|
|
|
ghc-8.4.2:
|
|
environment:
|
|
- STACK_FILE: "stack-8.4.2.yaml"
|
|
<<: *defaults
|
|
|
|
ghc-8.4.3:
|
|
environment:
|
|
- STACK_FILE: "stack-8.4.3.yaml"
|
|
<<: *defaults
|
|
|
|
ghc-nightly:
|
|
environment:
|
|
- STACK_FILE: "stack.yaml"
|
|
<<: *defaults
|
|
|
|
cabal:
|
|
working_directory: ~/build
|
|
docker:
|
|
- image: quay.io/haskell_works/ghc-8.4.3
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: Install zlib
|
|
command: apt-get update && apt-get install -y zlib1g-dev
|
|
- run:
|
|
name: Sync submodules
|
|
command: git submodule sync --recursive
|
|
- run:
|
|
name: Update submodules
|
|
command: git submodule update --recursive --init
|
|
- restore-cache:
|
|
keys:
|
|
- cabal-01
|
|
- run:
|
|
name: Update
|
|
command: cabal new-update
|
|
- run:
|
|
name: Configure
|
|
command: cabal new-configure --enable-tests
|
|
- run:
|
|
name: Build
|
|
command: cabal new-build -j2
|
|
- save_cache:
|
|
key: cabal-01
|
|
paths:
|
|
- ~/.cabal
|
|
|
|
|
|
workflows:
|
|
version: 2
|
|
multiple-ghcs:
|
|
jobs:
|
|
- ghc-8.2.1
|
|
- ghc-8.2.2
|
|
- ghc-8.4.2
|
|
- ghc-8.4.3
|
|
- ghc-nightly
|
|
- cabal
|