forked from Aurorastation/Aurora.3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
149 lines (133 loc) · 3.9 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
---
kind: pipeline
type: docker
name: code check
clone:
depth: 50
environment:
MACRO_COUNT: 0
GENDER_COUNT: 6
TO_WORLD_COUNT: 209
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
- 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
- (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
node:
k: y
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: signature
hmac: aa5f81d300bb1f01656d04254a788970d593b10792ac97b91161ec95ce622b1a
...