forked from Baystation12/Baystation12
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
77 lines (70 loc) · 3.47 KB
/
.travis.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
language: generic
sudo: false
env:
global:
BYOND_MAJOR="510"
BYOND_MINOR="1346"
NODE_VERSION="4"
ANGLE_BRACKET_COUNT=774
# ALL MAPS MUST BE PRESENT HERE
# IF THEY ARE NOT, YOUR BUILD WILL FAIL
matrix:
- MAP_PATH=example
- MAP_PATH=exodus
- MAP_PATH=torch
- MAP_PATH=overmap_example
cache:
directories:
- tgui/node_modules
- $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}
addons:
apt:
packages:
- libc6-i386
- libgcc1:i386
- libstdc++6:i386
install:
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $NODE_VERSION
- npm install --no-spin -g gulp-cli
- pip install --user PyYaml -q
- pip install --user beautifulsoup4 -q
before_script:
- cd tgui && npm install --no-spin && cd ..
- chmod +x ./install-byond.sh
- ./install-byond.sh
script:
- shopt -s globstar
- scripts/validateTravisContainsAllMaps.sh
- (! grep 'step_[xy]' maps/**/*.dmm)
- (! find nano/templates/ -type f -exec md5sum {} + | sort | uniq -D -w 32 | grep nano)
- (! grep -En "<\s*span\s+class\s*=\s*('[^'>]+|[^'>]+')\s*>" **/*.dm)
- (num=`grep -E '\\\\(red|blue|green|black|b|i[^mc])' **/*.dm | wc -l`; echo "$num escapes (expecting 0)"; [ $num -eq 0 ])
- (num=`grep -E '\WDel\(' **/*.dm | wc -l`; echo "$num Del()s (expecting 5 or less)"; [ $num -le 5 ])
- (num=`grep -E '"/atom' **/*.dm | wc -l`; echo "$num /atom text paths (expecting 2 or less)"; [ $num -le 2 ])
- (num=`grep -E '"/area' **/*.dm | wc -l`; echo "$num /area text paths (expecting 2 or less)"; [ $num -le 2 ])
- (num=`grep -E '"/datum' **/*.dm | wc -l`; echo "$num /datum text paths (expecting 2 or less)"; [ $num -le 2 ])
- (num=`grep -E '"/mob' **/*.dm | wc -l`; echo "$num /mob text paths (expecting 2 or less)"; [ $num -le 2 ])
- (num=`grep -E '"/obj' **/*.dm | wc -l`; echo "$num /obj text paths (expecting 12 or less)"; [ $num -le 12 ])
- (num=`grep -E '"/turf' **/*.dm | wc -l`; echo "$num /turf text paths (expecting 8 or less)"; [ $num -le 8 ])
- (num=`grep -E 'world<<|world[[:space:]]<<' **/*.dm | wc -l`; echo "$num world<< uses (expecting 5 or less)"; [ $num -le 5 ])
- (num=`grep -E 'world.log<<|world.log[[:space:]]<<' **/*.dm | wc -l`; echo "$num world.log<< uses (expecting 51 or less)"; [ $num -le 51 ])
- (num=`grep -P '(?<!<)<<(?!<)' **/*.dm | wc -l`; echo "$num << uses (expecting ${ANGLE_BRACKET_COUNT} or less)"; [ $num -le ${ANGLE_BRACKET_COUNT} ])
- (num=`find ./html/changelogs -not -name "*.yml" | wc -l`; echo "$num non-yml files (expecting exactly 2)"; [ $num -eq 2 ])
- awk -f tools/indentation.awk **/*.dm
- md5sum -c - <<< "88490b460c26947f5ec1ab1bb9fa9f17 *html/changelogs/example.yml"
- python tools/TagMatcher/tag-matcher.py .
- python tools/PunctuationChecker/punctuation-checker.py .
- python tools/GenerateChangelog/ss13_genchangelog.py html/changelog.html html/changelogs
- cd tgui && gulp
- cd ..
- source $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}/byond/bin/byondsetup
- cp config/example/* config/
- scripts/dm.sh -DUNIT_TEST -M$MAP_PATH baystation12.dme
- grep ", 0 warnings" build_log.txt
- DreamDaemon baystation12.dmb -invisible -trusted -core 2>&1 | tee log.txt
- grep "All Unit Tests Passed" log.txt
- grep "Caught 0 Runtimes" log.txt
- (! grep "runtime error:" log.txt)
- (! grep 'Process scheduler caught exception processing' log.txt)
- (! grep "WARNING:" log.txt)
- (! grep "ERROR:" log.txt)