/
.gitlab-ci.yml
78 lines (75 loc) · 2.59 KB
/
.gitlab-ci.yml
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
release:
only:
- master
script:
- if [ -d build ]; then echo "Build directory already exists"; else mkdir -p build; fi
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- nice -n 12 cmake --build .
- nice -n 12 cmake --build . --target checks
- mv circle ..
- iconv -c -f utf8 -t koi8-r changelog > ../changelog
cache:
key: "$CI_BUILD_REF_NAME/Release"
untracked: true
paths:
- build/
artifacts:
name: "circle-release"
paths:
- circle
- changelog
expire_in: 1 week
tags:
- builder
debug:
script:
- if [ -d build ]; then echo "Build directory already exists"; else mkdir -p build; fi
- cd build
- cmake -DCMAKE_BUILD_TYPE=Debug ..
- nice -n 12 cmake --build .
- nice -n 12 cmake --build . --target checks
- mv circle ..
- iconv -c -f utf8 -t koi8-r changelog > ../changelog
cache:
key: "$CI_BUILD_REF_NAME/Debug"
untracked: true
paths:
- build/
when: manual
artifacts:
name: "circle-debug"
paths:
- circle
- changelog
expire_in: 1 week
tags:
- builder
deploy-debug:
stage: deploy
dependencies:
- debug
script:
- rm -rf ${BYLINS_DEBUG_HOME}/circle || true
- cp -af circle ${BYLINS_DEBUG_HOME}
- rm -rf ${BYLINS_DEBUG_HOME}/changelog || true
- cp -af changelog ${BYLINS_DEBUG_HOME}
- touch ${BYLINS_DEBUG_HOME}/lib/external.triggers/touch.me.for.reboot
when: manual
tags:
- mirror
deploy-release:
only:
- master
stage: deploy
dependencies:
- release
script:
- rm -rf ${BYLINS_RELEASE_HOME}/circle || true
- cp -af circle ${BYLINS_RELEASE_HOME}
- rm -rf ${BYLINS_RELEASE_HOME}/changelog || true
- cp -af changelog ${BYLINS_RELEASE_HOME}
- touch ${BYLINS_RELEASE_HOME}/lib/external.triggers/touch.me.for.reboot
when: manual
tags:
- mirror