image: jojoz/stack-build-llvm:lts-14.1
# https://docs.gitlab.com/ee/ci/yaml/#stages
# jobs of the same stage are executed in parallel
stages:
- build
- test
# https://docs.gitlab.com/ee/ci/variables/#using-the-ci-variables-in-your-job-scripts
variables:
STACK_ROOT: "${CI_PROJECT_DIR}/.stack-root"
build:
# https://docs.gitlab.com/ee/ci/yaml/#cache
cache:
key: "$CI_JOB_NAME"
paths:
- .stack-work/
- .stack-root/
script:
- stack --no-terminal build
test:
cache:
key: "$CI_JOB_NAME"
paths:
- .stack-work/
- .stack-root/
script:
- stack --no-terminal test