summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubenwardy <rubenwardy@gmail.com>2015-08-04 19:24:11 +0100
committerrubenwardy <rubenwardy@gmail.com>2015-08-04 20:16:50 +0100
commit9913055d6a9cdb6a1b56f65e725dc8af96d66afc (patch)
tree17bbef13ece82a5c38e5fc629fe92f75aa3e8d3f
parent3edc66302e9b6d76d5eb1e3963ed9b8ea19b8640 (diff)
Add travis checks
-rw-r--r--.travis.yml5
-rw-r--r--README.md2
-rw-r--r--requirements.txt7
-rwxr-xr-xtravis_install.sh56
4 files changed, 70 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..933bec1
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,5 @@
+language: lua
+before_install: sh travis_install.sh
+script: cd minetest && ./bin/minetestserver --gameid minetest_game --worldname world --port 31234
+notifications:
+ email: false
diff --git a/README.md b/README.md
index 2aabaaa..1d9fe29 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,8 @@
Food
====
+[![Build Status](https://travis-ci.org/rubenwardy/food.svg?branch=master)](https://travis-ci.org/rubenwardy/food)
+
This is the main mod in the food mod collection.
Version 2.3
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..b7631ee
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,7 @@
+docfarming?
+PilzAdam/farming_plus@github?
+JKMurray/JKFarming@github?
+my_mobs?
+PilzAdam/mobs@github
+sapier/animals_modpack@github?
+hawkril/mobfcooking@github?
diff --git a/travis_install.sh b/travis_install.sh
new file mode 100755
index 0000000..856e625
--- /dev/null
+++ b/travis_install.sh
@@ -0,0 +1,56 @@
+# Move the food modpack to a subfolder
+mkdir tmp1 && mv * tmp1
+mv tmp1 food
+
+# Install dependancies
+sudo apt-get update
+sudo apt-get install -y libirrlicht-dev libbz2-dev \
+ libpng12-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev \
+ libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev \
+ libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev wget \
+ lua5.1 luarocks libzzip-dev luajit
+sudo luarocks install luazip
+sudo luarocks install luafilesystem
+sudo luarocks install luajson
+
+# Get minetest
+wget https://www.dropbox.com/s/wtub256856vdclf/minetestserver.zip?dl=1 -O minetestserver.zip
+unzip minetestserver.zip -d minetest
+
+# Install the food modpack
+cp food minetest/mods -rf
+
+# Install and configure mtpm
+git clone https://github.com/rubenwardy/mtpm
+cd mtpm
+mkdir tmp
+./mtpm.lua config mod_location ../minetest/mods/
+
+# Install the food modpack's supported mods
+./mtpm.lua install -r ../food/requirements.txt -y
+
+# Configure Minetest
+echo "Configuring Minetest"
+cd ../minetest
+mkdir worlds/world
+echo "gameid = minetest" > worlds/world/world.mt
+echo "backend = sqlite3" >> worlds/world/world.mt
+echo "creative_mode = true" >> worlds/world/world.mt
+echo "enable_damage = true" >> worlds/world/world.mt
+cd mods
+for f in *
+ do
+ echo "load_mod_$f = true" >> ../worlds/world/world.mt
+done
+
+# Install test worldmod
+cd ../
+mkdir worlds/world/worldmods/
+mkdir worlds/world/worldmods/food_test/
+echo "minetest.after(0, function()" > worlds/world/worldmods/food_test/init.lua
+echo " print(\"tests complete\")" >> worlds/world/worldmods/food_test/init.lua
+echo " minetest.request_shutdown()" >> worlds/world/worldmods/food_test/init.lua
+echo "end)" >> worlds/world/worldmods/food_test/init.lua
+
+# Go pack to the right directory
+cd ../food