Tweak make targets and CI steps

This commit is contained in:
patrick brisbin 2018-10-24 09:15:45 -04:00
parent d93594bf97
commit e20891c072
No known key found for this signature in database
GPG Key ID: 4243EA839B9CC425
2 changed files with 21 additions and 15 deletions

View File

@ -26,14 +26,16 @@ references:
- v2-{{ .Branch }}-
- v2-master-
- run:
name: Dependencies
name: Setup
command: |
make setup
if [ "${LINT:-1}" = 1 ]; then
stack install $STACK_ARGUMENTS \
--copy-compiler-tool hlint weeder
make setup setup.lint
else
make setup
fi
- run:
name: Dependencies
command: make dependencies
- run:
name: Build
command: make build
@ -45,15 +47,16 @@ references:
- ./.stack-work
- run:
name: Test
command: make test
- run:
name: Lint
command: |
if [ "${LINT:-1}" = 1 ]; then
make lint
make test lint
else
make test
fi
jobs:
build:
<<: *stack_build
build_8.2.2:
<<: *stack_build
environment:
@ -64,8 +67,6 @@ jobs:
environment:
STACK_ARGUMENTS: --no-terminal
STACK_YAML: stack-lts-12.2.yaml
build:
<<: *stack_build
build_nightly:
<<: *stack_build
environment:
@ -79,9 +80,9 @@ workflows:
version: 2
commit:
jobs:
- build
- build_8.2.2
- build_8.4.3
- build
- build_nightly
nightly:
triggers:

View File

@ -1,14 +1,19 @@
all: setup build test lint
all: setup setup.lint dependencies build test lint
.PHONY: setup
setup:
stack setup $(STACK_ARGUMENTS)
# Avoid ExitFailure (-9) (THIS MAY INDICATE OUT OF MEMORY)
.PHONY: setup.lint
setup.lint:
stack install $(STACK_ARGUMENTS) --copy-compiler-tool hlint weeder
.PHONY: dependencies
dependencies:
stack build $(STACK_ARGUMENTS) -j 1 haskell-src-exts
stack build $(STACK_ARGUMENTS) \
--flag yesod-auth-oauth2:example \
--dependencies-only --test --no-run-tests
#stack install $(STACK_ARGUMENTS) --copy-compiler-tool hlint weeder
.PHONY: build
build: