forked from PolarisSS13/Polaris
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
50 lines (43 loc) · 1.65 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
#pretending we're C because otherwise ruby will initialize, even with "language: dm".
language: c
sudo: false
env:
global:
- BYOND_MAJOR="512"
- BYOND_MINOR="1414"
- MACRO_COUNT=4
matrix:
- TEST_DEFINE="MAP_TEST" TEST_FILE="code/_map_tests.dm" RUN="0"
- TEST_DEFINE="AWAY_MISSION_TEST" TEST_FILE="code/_away_mission_tests.dm" RUN="0"
- TEST_DEFINE="UNIT_TEST" TEST_FILE="code/_unit_tests.dm" RUN="1"
cache:
directories:
- $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}
addons:
apt:
packages:
- libc6-i386
- libgcc1:i386
- libstdc++6:i386
before_script:
- chmod +x ./install-byond.sh
- ./install-byond.sh
install:
- pip install --user PyYaml -q
- pip install --user beautifulsoup4 -q
script:
- shopt -s globstar
- (! 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)
- awk -f tools/indentation.awk **/*.dm
- md5sum -c - <<< "88490b460c26947f5ec1ab1bb9fa9f17 *html/changelogs/example.yml"
- (num=`grep -E '\\\\(red|blue|green|black|b|i[^mc])' **/*.dm | wc -l`; echo "$num escapes (expecting ${MACRO_COUNT} or less)"; [ $num -le ${MACRO_COUNT} ])
- source $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}/byond/bin/byondsetup
- python tools/TagMatcher/tag-matcher.py ../..
# Run our test
- cp config/example/* config/
- echo "#define ${TEST_DEFINE} 1" > ${TEST_FILE}
- DreamMaker polaris.dme
- if [ $RUN -eq 1 ]; then DreamDaemon polaris.dmb -invisible -trusted -core 2>&1 | tee log.txt; fi
- if [ $RUN -eq 1 ]; then grep "All Unit Tests Passed" log.txt; fi