.gitlab-ci.yml 1.49 KB
Newer Older
Bastian Kauschke's avatar
Bastian Kauschke committed
1
image: haskell:8.6.5
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
2

3 4 5 6 7 8 9 10 11
# Change stacks global directory to be inside the project directory,
# since we can only cache local dependencies.
variables:
  STACK_ROOT: "$CI_PROJECT_DIR/.stack-root"

cache:
  paths:
    - .stack-root/

Bastian Kauschke's avatar
Bastian Kauschke committed
12
before_script:
Bastian Kauschke's avatar
Bastian Kauschke committed
13 14 15
  - export LC_ALL=C.UTF-8
  - stack upgrade

Bastian Kauschke's avatar
Bastian Kauschke committed
16

Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
17

18 19
test_branch:
  script:
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
20 21 22 23 24 25 26
    - stack --no-terminal --system-ghc --no-install-ghc build --test --haddock --no-haddock-deps --bench --no-run-benchmarks --flag copar:benchmark-generators
  except:
    - master

test_branch_release:
  script:
    - stack --no-terminal --system-ghc --no-install-ghc build --copy-bins --test --haddock --no-haddock-deps --bench --no-run-benchmarks --flag copar:benchmark-generators --flag copar:release
27
    - cp -r ~/.local/bin/ copar-linux-binaries
28 29
  except:
    - master
30 31 32 33 34
  artifacts:
    name: "${CI_PROJECT_NAME}-linux-binaries"
    expire_in: 2 weeks
    paths:
        - copar-linux-binaries/
35

Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
36
test:
37
  script:
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
38 39 40 41 42 43 44 45
    - stack --no-terminal --system-ghc --no-install-ghc build --test --haddock --no-haddock-deps --bench --no-run-benchmarks --flag copar:benchmark-generators
  only:
    - master


test_release:
  script:
    - stack --no-terminal --system-ghc --no-install-ghc build --copy-bins --test --haddock --no-haddock-deps --bench --no-run-benchmarks --flag copar:benchmark-generators --flag copar:release
46
    - cp -r ~/.local/bin/ copar-linux-binaries
47 48
  only:
    - master
49 50 51 52
  artifacts:
    name: "${CI_PROJECT_NAME}-linux-binaries"
    expire_in: 10 yrs
    paths:
53
        - copar-linux-binaries/