capnp-0.4.0.0: .gitlab-ci.yml
before_script:
# Report the versions of varioius software, to make diagnosing problems
# easier:
- ghc --version
- cabal --version
- capnp --version
- stylish-haskell --version
- hlint --version
# Update the hackage databse:
- cabal update
test:alltests:
image: zenhack/haskell-capnp-ci
variables:
CXX_CALCULATOR_CLIENT: /usr/local/bin/c++-calculator-client
CXX_CALCULATOR_SERVER: /usr/local/bin/c++-calculator-server
script:
# First build the code generator plugin.
- cabal new-build capnpc-haskell
# Then, regenerate the schema modules, and make sure they're in-sync
# with what was committed. This is also necessary to generate the
# Schema modules used by the test suite, which are not committed.
- ./scripts/regen.sh
- git diff --exit-code
# Now build everything else (incl. examples):
- cabal new-build all
# ...run the tests. We use new-run so we can pass rts options
# to the test binary -- these tell it to parallelize the tests.
- cabal new-run test:tests -- +RTS -N
# Linting:
- ./scripts/hlint.sh
# Run stylish-haskell, and fail if it changes anything:
- ./scripts/format.sh
- git diff --exit-code