-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
175 lines (156 loc) · 4.79 KB
/
.drone.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
---
kind: pipeline
type: docker
name: code check
clone:
depth: 50
environment:
MACRO_COUNT: 0
GENDER_COUNT: 6
TO_WORLD_COUNT: 206
trigger:
branch:
- master #avoid double builds on PRs
steps:
- name: "Runtime - Compile and Run Unit Tests"
image: python:3.6-slim-buster
commands:
- pip install --user -r ./tools/requirements.txt
- pip install --user PyYaml -q # Why is that shit not in the requirements
- pip install --user beautifulsoup4 -q # Same here
- chmod +x ./scripts/code_check.sh && ./scripts/code_check.sh $PWD
- awk -f tools/indentation.awk **/*.dm
- python3 tools/TagMatcher/tag-matcher.py ../..
- python3 tools/GenerateChangelog/ss13_genchangelog.py html/changelog.html html/changelogs --dry-run
- python3 tools/mapmerge2/travis_mapcheck.py
- echo "6a5ae087fe5bfa66e52e508655e57120 *html/changelogs/example.yml" | md5sum -c -
- echo "Completed Code Checks"
- name: "Run DreamChecker"
image: aurorastation/dm-buildimage:latest
commands:
- /opt/dreamchecker
- name: "Restore NPM Cache"
image: appleboy/drone-sftp-cache
settings:
server:
from_secret: sftp_server
port:
from_secret: sftp_port
username:
from_secret: sftp_user
password:
from_secret: sftp_pass
path: /upload/nodecache
mount:
- vueui/node_modules
restore: true
- name: "Vue - Lint and Compile"
image: node:10-buster
commands:
- cd vueui
- npm install # TODO: Cache that shit
- (npm run lint | tee lint.log)
- grep "No lint errors found!" lint.log
- npm run build
- name: "Rebuild NPM Cache"
image: appleboy/drone-sftp-cache
settings:
server:
from_secret: sftp_server
port:
from_secret: sftp_port
username:
from_secret: sftp_user
password:
from_secret: sftp_pass
path: /upload/nodecache
mount:
- vueui/node_modules
rebuild: true
---
kind: pipeline
type: docker
name: dm-runtime
clone:
depth: 50
environment:
USE_MAP: runtime
services:
- name: mariadb
image: mariadb:10.3
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: game
MYSQL_USER: build
MYSQL_PASSWORD: build
trigger:
branch:
- master #avoid double builds on PRs
steps:
- name: "Migrate DB - Wing it without flyway"
image: mariadb:10.3
commands:
- sleep 20
- for f in SQL/migrate/*.sql; do mysql -h mariadb -uroot -proot game < $f && echo "Migrated $f"; done
- mysql -h mariadb -uroot -proot game -e "SHOW TABLES;"
- name: "Runtime - Compile and Run Unit Tests"
image: aurorastation/dm-buildimage:latest
commands:
- export LD_LIBRARY_PATH=./:$PWD:$HOME/.byond/bin:/usr/local/lib:$LD_LIBRARY_PATH
- cp config/example/* config/ && cp config/ut/config-db.txt config/config.txt && cp config/ut/dbconfig.txt config/dbconfig.txt
- scripts/dm.sh -DUNIT_TEST -M$USE_MAP aurorastation.dme
- grep "0 warnings" build_log.txt
- DreamDaemon aurorastation.dmb -invisible -trusted -core 2>&1 | tee log.txt
- grep "All Unit Tests Passed" log.txt
- (! grep "runtime error:" log.txt)
- echo "Unit Tests Completed"
---
kind: pipeline
type: docker
name: dm-aurora
clone:
depth: 50
environment:
USE_MAP: aurora
trigger:
branch:
- master #avoid double builds on PRs
steps:
- name: "Aurora - Compile and Run Unit Tests"
image: aurorastation/dm-buildimage:latest
commands:
- export LD_LIBRARY_PATH=./:$PWD:$HOME/.byond/bin:/usr/local/lib:$LD_LIBRARY_PATH
- cp config/example/* config/ && cp config/ut/config-nodb.txt config/config.txt
- scripts/dm.sh -DUNIT_TEST -M$USE_MAP aurorastation.dme
- grep "0 warnings" build_log.txt
- DreamDaemon aurorastation.dmb -invisible -trusted -core 2>&1 | tee log.txt
- grep "All Unit Tests Passed" log.txt
- (! grep "runtime error:" log.txt)
- echo "Unit Tests Completed"
---
kind: pipeline
type: docker
name: dm-exodus
clone:
depth: 50
environment:
USE_MAP: exodus
trigger:
branch:
- master #avoid double builds on PRs
steps:
- name: "Exodus - Compile and Run Unit Tests"
image: aurorastation/dm-buildimage:latest
commands:
- export LD_LIBRARY_PATH=./:$PWD:$HOME/.byond/bin:/usr/local/lib:$LD_LIBRARY_PATH
- cp config/example/* config/ && cp config/ut/config-nodb.txt config/config.txt
- scripts/dm.sh -DUNIT_TEST -M$USE_MAP aurorastation.dme
- grep "0 warnings" build_log.txt
- DreamDaemon aurorastation.dmb -invisible -trusted -core 2>&1 | tee log.txt
- grep "All Unit Tests Passed" log.txt
- (! grep "runtime error:" log.txt)
- echo "Unit Tests Completed"
---
kind: signature
hmac: 786139dfd954616bf68bb0f31c69be9b93b2440468056be8a4a7c36704733890
...