diff --git a/.travis.yml b/.travis.yml index ebf5ffefbb..4874a973b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,24 +1,31 @@ #pretending we're C because otherwise ruby will initialize, even with "language: dm". language: c +sudo: false env: BYOND_MAJOR="508" BYOND_MINOR="1287" - -before_install: - - sudo apt-get update -qq - - sudo apt-get install libc6:i386 libgcc1:i386 libstdc++6:i386 -qq - - sudo apt-get install python -qq - - sudo apt-get install python-pip -qq - - sudo pip install PyYaml -q - - sudo pip install beautifulsoup4 -q - + +cache: + directories: + - $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR} + +addons: + apt: + packages: + - libc6-i386 + - libgcc1:i386 + - libstdc++6:i386 + - python + - python-pip + install: - - curl "http://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip" -o byond.zip - - unzip byond.zip - - cd byond - - sudo make install - - cd .. + - pip install --user PyYaml -q + - pip install --user beautifulsoup4 -q + +before_script: + - chmod +x ./install-byond.sh + - ./install-byond.sh script: - shopt -s globstar @@ -27,4 +34,6 @@ script: - md5sum -c - <<< "0af969f671fba6cf9696c78cd175a14a *baystation12.int" - md5sum -c - <<< "88490b460c26947f5ec1ab1bb9fa9f17 *html/changelogs/example.yml" - python tools/GenerateChangelog/ss13_genchangelog.py html/changelog.html html/changelogs + - source $HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}/byond/bin/byondsetup - DreamMaker baystation12.dme + diff --git a/install-byond.sh b/install-byond.sh new file mode 100644 index 0000000000..cca44342c6 --- /dev/null +++ b/install-byond.sh @@ -0,0 +1,14 @@ +#!/bin/sh +set -e +if [ -d "$HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}/byond/bin" ]; +then + echo "Using cached directory." +else + echo "Setting up BYOND." + mkdir -p "$HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}" + cd "$HOME/BYOND-${BYOND_MAJOR}.${BYOND_MINOR}" + curl "http://www.byond.com/download/build/${BYOND_MAJOR}/${BYOND_MAJOR}.${BYOND_MINOR}_byond_linux.zip" -o byond.zip + unzip byond.zip + cd byond + make here +fi