Install missing CI pipeline dependency.
[open-adventure.git] / .gitlab-ci.yml
1 image: opensuse/tumbleweed
2
3 stages:
4   - build
5   - test
6   - deploy
7
8 # build advent itself
9 binary:debug:
10   stage: build
11   before_script:
12     - zypper install -y make gcc libedit-devel libasan5 libubsan1 python python2-PyYAML lcov
13   script:
14     - make debug
15   artifacts:
16     paths:
17       - advent
18       - cheat
19       - "*.o"
20       - dungeon.c
21       - dungeon.h
22
23 binary:release:
24   stage: build
25   before_script:
26     - zypper install -y make gcc libedit-devel python python2-PyYAML
27   script:
28     - make advent cheat
29   artifacts:
30     paths:
31       - advent
32       - cheat
33       - "*.o"
34       - dungeon.c
35       - dungeon.h
36
37 manpage:
38   stage: build
39   before_script:
40     - zypper install -y make asciidoc
41   script:
42     - make advent.6
43   artifacts:
44     paths:
45       - advent.6
46
47 html:
48   stage: build
49   before_script:
50     - zypper install -y make asciidoc libxslt
51   script:
52     - make html
53   artifacts:
54     paths:
55       - "*.html"
56
57 dist:
58   stage: build
59   before_script:
60     - zypper install -y make asciidoc tar gzip
61   script:
62     - export VERS=${CI_COMMIT_REF_NAME}
63     - make dist -e
64   artifacts:
65     paths:
66       - "*.tar.gz"
67
68 # run tests using the binary built before
69 test:debug:
70   stage: test
71   before_script:
72     - zypper install -y make gcc libedit-devel libasan5 libubsan1 python python2-PyYAML lcov
73   script:
74     - make coverage
75   artifacts:
76     paths:
77       - coverage
78   dependencies:
79     - binary:debug
80
81 test:release:
82   stage: test
83   before_script:
84     - zypper install -y make libedit
85   script:
86     - cd tests
87     - make
88     - cd ..
89   dependencies:
90     - binary:release
91
92 pages:
93   stage: deploy
94   script:
95     - mkdir public
96     - mv coverage public
97   artifacts:
98     paths:
99       - public
100   only:
101     - master
102   dependencies:
103     - test:debug