Skip to content

Commit

Permalink
Merge pull request #62 from haskell-works/PR-ugly-fix-jumps
Browse files Browse the repository at this point in the history
Pr ugly fix jumps
  • Loading branch information
AlexeyRaga authored Apr 14, 2018
2 parents cf7cbc1 + adf091f commit cff1ee6
Show file tree
Hide file tree
Showing 13 changed files with 249 additions and 513 deletions.
166 changes: 95 additions & 71 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,86 +1,110 @@
version: 2.0
jobs:
build:
working_directory: ~/hw-kafka-client
docker:
- image: fpco/stack-build:latest
defaults: &defaults
working_directory: ~/build
docker:
- image: quay.io/haskell_works/stack-build-python

- image: confluentinc/cp-zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
- image: confluentinc/cp-zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181

- image: confluentinc/cp-kafka
environment:
KAFKA_ZOOKEEPER_CONNECT: "localhost:2181"
KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://localhost:9092"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
- image: confluentinc/cp-kafka
environment:
KAFKA_ZOOKEEPER_CONNECT: "localhost:2181"
KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://localhost:9092"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1

steps:
- checkout
steps:
- checkout

- run:
name: Copying scripts
command: |
mkdir -p ~/.local/bin
cp ./scripts/* ~/.local/bin
- restore_cache:
keys:
- dot-stack-{{ checksum "stack.yaml" }}-{{ checksum "hw-kafka-client.cabal" }}
- dot-stack
- restore_cache:
key: stack-work-{{ checksum "stack.yaml" }}
- restore_cache:
key: librdkafka-{{ checksum "scripts/build-librdkafka" }}
- restore_cache:
keys:
- dot-stack-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package.yaml" }}
- dot-stack-{{ arch }}-{{ .Environment.CIRCLE_JOB }}

- run:
name: Build librdkafka
command: build-librdkafka
- restore_cache:
key: stack-work-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package.yaml" }}

- run: stack setup
- run: stack build --test --no-run-tests --haddock --no-haddock-deps
- restore_cache:
key: librdkafka--{{ arch }}-{{ checksum "scripts/build-librdkafka" }}

- run:
name: Copying documentation
command: copy-docs
- run:
name: Build librdkafka
command: ./scripts/build-librdkafka

- run:
name: Running unit tests
command: stack test
- save_cache:
key: librdkafka--{{ arch }}-{{ checksum "scripts/build-librdkafka" }}
paths: ~/build/.librdkafka

- save_cache:
key: dot-stack-base
paths:
- ~/.stack
- run: stack setup --resolver ${LTS}
- run: stack build --test --no-run-tests --haddock --no-haddock-deps --resolver ${LTS}

- save_cache:
key: dot-stack-{{ checksum "stack.yaml" }}-{{ checksum "hw-kafka-client.cabal" }}
paths:
- ~/.stack
- save_cache:
key: dot-stack-{{ arch }}-{{ .Environment.CIRCLE_JOB }}
paths:
- ~/.stack

- save_cache:
key: stack-work-{{ checksum "stack.yaml" }}
paths: ~/hw-kafka-client/.stack-work
- run:
name: Running unit tests
command: stack test --resolver ${LTS}

- save_cache:
key: librdkafka-{{ checksum "scripts/build-librdkafka" }}
paths: ~/hw-kafka-client/.librdkafka
- save_cache:
key: dot-stack-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package.yaml" }}
paths:
- ~/.stack

- store_artifacts:
path: /tmp/doc
- save_cache:
key: stack-work-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package.yaml" }}
paths: ~/build/.stack-work

version: 2.0
jobs:
lts-7:
environment:
- LTS: "lts-7"
<<: *defaults

lts-9:
environment:
- LTS: "lts-9"
<<: *defaults

lts-11:
environment:
- LTS: "lts-11"
<<: *defaults

nightly:
environment:
- LTS: "nightly"
<<: *defaults

release:
working_directory: ~/build
docker:
- image: quay.io/haskell_works/stack-build-python

steps:
- checkout

- run:
name: Making a release
command: ./scripts/release


workflows:
version: 2
multiple-ghcs:
jobs:
- lts-7
- lts-9
- lts-11
# - nightly
- deploy:
command: |
if [ "$CIRCLE_PROJECT_USERNAME" == "haskell-works" ]; then
if [[ "$CIRCLE_BRANCH" == master ]]; then
when tag autotag
elif [[ "$CIRCLE_TAG" =~ v.* ]]; then
setup-cred && publish && publish-docs
fi
fi
deployment:
tagged_builds:
tag: /v.*/
commands:
- echo "Make tags run in 2.0"
requires:
- lts-7
- lts-9
- lts-11
filters:
branches:
only: master

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ cabal-dev
cabal.sandbox.config
cabal.config
.stack-work/
*.cabal

### Emacs ###
# -*- mode: gitignore; -*-
Expand Down
128 changes: 0 additions & 128 deletions hw-kafka-client.cabal

This file was deleted.

Loading

0 comments on commit cff1ee6

Please sign in to comment.