Update .gitlab-ci.yml

This commit is contained in:
Gregor Kleen 2019-11-08 09:27:36 +01:00
parent 496e1e5a32
commit 1082cea8bd

View File

@ -1,22 +1,51 @@
default:
image: fpco/stack-build:lts-13.21
before_script:
- apt-get install -y --no-install-recommends build-essential
- ln -s $(which g++-7) $(dirname $(which g++-7))/g++
cache:
key: "${CI_COMMIT_REF_SLUG}"
paths:
- .stack
- .stack-work
variables:
STACK_ROOT: "${CI_PROJECT_DIR}/.stack"
cache:
key: "${CI_COMMIT_REF_SLUG}"
paths:
- .stack
- .stack-work
build:
stage: build
stages:
- setup
- frontend:build
- yesod:build
- test
container setup:
stage: .pre
script:
- stack build --copy-bins --local-bin-path $(pwd) --flag uniworx:-library-only --flag uniworx:-dev --flag uniworx:pedantic
artifacts:
paths:
- uniworx
- apt-get install -y --no-install-recommends build-essential nodejs chromium
- ln -s $(which g++-7) $(dirname $(which g++-7))/g++
npm install:
stage: setup
script:
- npm install
needs:
- container setup
frontend:build:
stage: frontend:build
script:
- npm run frontend:build
needs:
- npm install
yesod:build:dev:
stage: yesod:build
script:
- stack build --copy-bins --local-bin-path $(pwd)/bin --fast --flag uniworx:-library-only --flag uniworx:dev --flag uniworx:pedantic
needs:
- frontend:build
frontend:test:
stage: test
script:
- npm run frontend:test
needs:
- frontend:build