~vonfry/yiyd

yiyd/.gitlab-ci.yml -rw-r--r-- 1.5 KiB
18456d0cVonfry Merge branch 'develop' 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
image: haskell:8

cache:
  paths:
    - .cabal/

before_script:
  - export CABAL_DIR=$(pwd)/.cabal
  - export PATH=$CABAL_DIR/bin:$PATH
  - export CABAL_CONFIG=$CABAL_DIR/config
  - mkdir -p $CABAL_DIR
  - |
    cat > $CABAL_CONFIG << EOF
    remote-build-reporting: anonymous
    repository hackage.haskell.org
      url: http://hackage.haskell.org/
    remote-repo-cache: $CABAL_DIR/.cabal/packages
    logs-dir:          $CABAL_DIR/.cabal/logs
    world-file:        $CABAL_DIR/.cabal/world
    extra-prog-path:   $CABAL_DIR/.cabal/bin
    symlink-bindir:    $CABAL_DIR/.cabal/bin
    build-summary:     $CABAL_DIR/.cabal/logs/build.log
    store-dir:         $CABAL_DIR/.cabal/store
    install-dirs user
      prefix: $CABAL_DIR/.cabal
    EOF

stages:
  - pre
  - build
  - test
  - dist
  - upload

pre:
  stage: pre
  script:
    - cabal new-update
    - cabal new-install --only-dependencies --upgrade-dependencies
  only:
    refs:
      - master
      - develop

build:
  stage: build
  script: cabal new-build
  only:
    refs:
      - master
      - develop

test:
  stage: test
  script: cabal new-test
  only:
    refs:
      - master
      - develop

dist:
  stage: dist
  script: cabal new-sdist
  artifacts:
    paths:
      - dist-newstyle/sdist/yiyd-*.tar.gz
  only:
    - master

upload:
  when: manual
  stage: upload
  script: cabal upload --publish ./dist/
  only:
    - master
  environment:
    name: hackage
    url: https://hackage.haskell.org/package/yiyd