mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 01:49:19 +00:00
Travis Updates
This commit is contained in:
30
.travis.yml
30
.travis.yml
@@ -1,13 +1,13 @@
|
|||||||
language: generic
|
language: generic
|
||||||
|
os: linux
|
||||||
dist: xenial
|
dist: xenial
|
||||||
sudo: false
|
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
except:
|
except:
|
||||||
- ___TGS3TempBranch
|
- ___TGS3TempBranch
|
||||||
- ___TGSTempBranch
|
- ___TGSTempBranch
|
||||||
|
|
||||||
matrix:
|
jobs:
|
||||||
include:
|
include:
|
||||||
- name: "Run Linters"
|
- name: "Run Linters"
|
||||||
addons:
|
addons:
|
||||||
@@ -16,9 +16,15 @@ matrix:
|
|||||||
- python3
|
- python3
|
||||||
- python3-pip
|
- python3-pip
|
||||||
- python3-setuptools
|
- python3-setuptools
|
||||||
|
- pcregrep
|
||||||
|
- rustc
|
||||||
|
- cargo
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- $HOME/SpacemanDMM
|
||||||
install:
|
install:
|
||||||
- tools/travis/install_build_tools.sh
|
- tools/travis/install_build_tools.sh
|
||||||
- tools/travis/install_dreamchecker.sh
|
- tools/travis/install_spaceman_dmm.sh dreamchecker
|
||||||
script:
|
script:
|
||||||
- tools/travis/check_filedirs.sh tgstation.dme
|
- tools/travis/check_filedirs.sh tgstation.dme
|
||||||
- tools/travis/check_changelogs.sh
|
- tools/travis/check_changelogs.sh
|
||||||
@@ -76,3 +82,21 @@ matrix:
|
|||||||
script:
|
script:
|
||||||
- tools/travis/dm.sh -DTRAVISBUILDING tgstation.dme || travis_terminate 1
|
- tools/travis/dm.sh -DTRAVISBUILDING tgstation.dme || travis_terminate 1
|
||||||
- tools/travis/run_server.sh
|
- tools/travis/run_server.sh
|
||||||
|
|
||||||
|
# - name: "Generate Documentation"
|
||||||
|
# # Only run for non-PR commits to the real master branch.
|
||||||
|
# if: branch = master AND head_branch IS blank
|
||||||
|
# install:
|
||||||
|
# - tools/travis/install_spaceman_dmm.sh dmdoc
|
||||||
|
# before_script:
|
||||||
|
# # Travis checks out a hash, try to get back on a branch.
|
||||||
|
# - git checkout $TRAVIS_BRANCH || true
|
||||||
|
# script:
|
||||||
|
# - ~/dmdoc
|
||||||
|
# - touch dmdoc/.nojekyll
|
||||||
|
# deploy:
|
||||||
|
# provider: pages
|
||||||
|
# skip_cleanup: true
|
||||||
|
# local_dir: dmdoc
|
||||||
|
# token: $DMDOC_GITHUB_TOKEN
|
||||||
|
# fqdn: codedocs.tgstation13.org
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
|
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [ -n "$1" ]
|
if [ -n "$1" ]
|
||||||
then
|
then
|
||||||
dme=$1
|
dme=$1
|
||||||
else
|
else
|
||||||
echo "Specify a DME to check"
|
echo "ERROR: Specify a DME to check"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $(awk '/BEGIN_FILE_DIR/{flag=1;next}/END_FILE_DIR/{flag=0}flag' $dme | wc -l) -ne 1 ]]
|
if [[ $(awk '/BEGIN_FILE_DIR/{flag=1;next}/END_FILE_DIR/{flag=0}flag' $dme | wc -l) -ne 1 ]]
|
||||||
then
|
then
|
||||||
echo "File DIR was ticked, please untick it, see: https://tgstation13.org/phpBB/viewtopic.php?f=5&t=321 for more"
|
echo "ERROR: File DIR was ticked, please untick it, see: https://tgstation13.org/phpBB/viewtopic.php?f=5&t=321 for more"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -7,43 +7,70 @@ shopt -s globstar
|
|||||||
st=0
|
st=0
|
||||||
|
|
||||||
if grep -El '^\".+\" = \(.+\)' _maps/**/*.dmm; then
|
if grep -El '^\".+\" = \(.+\)' _maps/**/*.dmm; then
|
||||||
echo "Non-TGM formatted map detected. Please convert it using Map Merger!"
|
echo "ERROR: Non-TGM formatted map detected. Please convert it using Map Merger!"
|
||||||
st=1
|
st=1
|
||||||
fi;
|
fi;
|
||||||
if grep -P '^\ttag = \"icon' _maps/**/*.dmm; then
|
if grep -P '^\ttag = \"icon' _maps/**/*.dmm; then
|
||||||
echo "tag vars from icon state generation detected in maps, please remove them."
|
echo "ERROR: tag vars from icon state generation detected in maps, please remove them."
|
||||||
st=1
|
st=1
|
||||||
fi;
|
fi;
|
||||||
if grep 'step_[xy]' _maps/**/*.dmm; then
|
if grep -P 'step_[xy]' _maps/**/*.dmm; then
|
||||||
echo "step_x/step_y variables detected in maps, please remove them."
|
echo "ERROR: step_x/step_y variables detected in maps, please remove them."
|
||||||
st=1
|
st=1
|
||||||
fi;
|
fi;
|
||||||
if grep 'pixel_[xy] = 0' _maps/**/*.dmm; then
|
if grep -P 'pixel_[^xy]' _maps/**/*.dmm; then
|
||||||
echo "pixel_x/pixel_y = 0 variables detected in maps, please review to ensure they are not dirty varedits."
|
echo "ERROR: incorrect pixel offset variables detected in maps, please remove them."
|
||||||
|
st=1
|
||||||
fi;
|
fi;
|
||||||
if grep -P '\td[1-2] =' _maps/**/*.dmm; then
|
if grep -P '\td[1-2] =' _maps/**/*.dmm; then
|
||||||
echo "d1/d2 cable variables detected in maps, please remove them."
|
echo "ERROR: d1/d2 cable variables detected in maps, please remove them."
|
||||||
st=1
|
st=1
|
||||||
fi;
|
fi;
|
||||||
if grep '^/area/.+[\{]' _maps/**/*.dmm; then
|
if grep -P '^/area/.+[\{]' _maps/**/*.dmm; then
|
||||||
echo "Vareditted /area path use detected in maps, please replace with proper paths."
|
echo "ERROR: Vareditted /area path use detected in maps, please replace with proper paths."
|
||||||
st=1
|
st=1
|
||||||
fi;
|
fi;
|
||||||
if grep '\W\/turf\s*[,\){]' _maps/**/*.dmm; then
|
if grep -P '\W\/turf\s*[,\){]' _maps/**/*.dmm; then
|
||||||
echo "base /turf path use detected in maps, please replace with proper paths."
|
echo "ERROR: base /turf path use detected in maps, please replace with proper paths."
|
||||||
st=1
|
st=1
|
||||||
fi;
|
fi;
|
||||||
if grep '^/*var/' code/**/*.dm; then
|
if grep -P '^/*var/' code/**/*.dm; then
|
||||||
echo "Unmanaged global var use detected in code, please use the helpers."
|
echo "ERROR: Unmanaged global var use detected in code, please use the helpers."
|
||||||
st=1
|
st=1
|
||||||
fi;
|
fi;
|
||||||
|
nl='
|
||||||
|
'
|
||||||
|
nl=$'\n'
|
||||||
|
while read f; do
|
||||||
|
t=$(tail -c2 "$f"; printf x); r1="${nl}$"; r2="${nl}${r1}"
|
||||||
|
if [[ ! ${t%x} =~ $r1 ]]; then
|
||||||
|
echo "file $f is missing a trailing newline"
|
||||||
|
st=1
|
||||||
|
fi;
|
||||||
|
done < <(find . -type f -name '*.dm')
|
||||||
if grep -i 'centcomm' code/**/*.dm; then
|
if grep -i 'centcomm' code/**/*.dm; then
|
||||||
echo "Misspelling(s) of CENTCOM detected in code, please remove the extra M(s)."
|
echo "ERROR: Misspelling(s) of CENTCOM detected in code, please remove the extra M(s)."
|
||||||
st=1
|
st=1
|
||||||
fi;
|
fi;
|
||||||
if grep -i 'centcomm' _maps/**/*.dmm; then
|
if grep -i 'centcomm' _maps/**/*.dmm; then
|
||||||
echo "Misspelling(s) of CENTCOM detected in maps, please remove the extra M(s)."
|
echo "ERROR: Misspelling(s) of CENTCOM detected in maps, please remove the extra M(s)."
|
||||||
st=1
|
st=1
|
||||||
fi;
|
fi;
|
||||||
|
if ls _maps/*.json | grep -P "[A-Z]"; then
|
||||||
|
echo "Uppercase in a map json detected, these must be all lowercase."
|
||||||
|
st=1
|
||||||
|
fi;
|
||||||
|
for json in _maps/*.json
|
||||||
|
do
|
||||||
|
map_path=$(jq -r '.map_path' $json)
|
||||||
|
while read map_file; do
|
||||||
|
filename="_maps/$map_path/$map_file"
|
||||||
|
if [ ! -f $filename ]
|
||||||
|
then
|
||||||
|
echo "found invalid file reference to $filename in _maps/$json"
|
||||||
|
st=1
|
||||||
|
fi
|
||||||
|
done < <(jq -r '[.map_file] | flatten | .[]' $json)
|
||||||
|
done
|
||||||
|
|
||||||
exit $st
|
exit $st
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
source dependencies.sh
|
|
||||||
|
|
||||||
wget -O ~/dreamchecker "https://github.com/SpaceManiac/SpacemanDMM/releases/download/$SPACEMAN_DMM_VERSION/dreamchecker"
|
|
||||||
chmod +x ~/dreamchecker
|
|
||||||
~/dreamchecker --version
|
|
||||||
8
tools/travis/install_spaceman_dmm.sh
Normal file
8
tools/travis/install_spaceman_dmm.sh
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
source dependencies.sh
|
||||||
|
|
||||||
|
wget -O ~/$1 "https://github.com/SpaceManiac/SpacemanDMM/releases/download/$SPACEMAN_DMM_VERSION/$1"
|
||||||
|
chmod +x ~/$1
|
||||||
|
~/$1 --version
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
tools/deploy.sh travis_test
|
tools/deploy.sh travis_test
|
||||||
|
rm travis_test/*.dll
|
||||||
mkdir travis_test/config
|
mkdir travis_test/config
|
||||||
|
|
||||||
#test config
|
#test config
|
||||||
|
|||||||
Reference in New Issue
Block a user