diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..392a8d9c7 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +language: c +compiler: + - gcc + - clang +script: s/travis-build +before_install: + - sudo apt-get update -qq + - sudo apt-get install -qq libtolua-dev liblua5.1-dev libncurses5-dev libsqlite3-dev libxml2-dev diff --git a/s/travis-build b/s/travis-build new file mode 100755 index 000000000..5a942fbba --- /dev/null +++ b/s/travis-build @@ -0,0 +1,10 @@ +#!/bin/sh + +ln -sf conf/eressea.ini +[ -d build ] || mkdir build +cd build && cmake .. \ + -DCMAKE_MODULE_PATH=$PWD/../cmake/Modules \ + -DCMAKE_BUILD_TYPE=Debug .. && \ +make && cd .. && +build/eressea/test_eressea && +build/eressea/eressea -v0 scripts/run-tests.lua diff --git a/src/laws.test.c b/src/laws.test.c index 6e17c232f..48283b017 100644 --- a/src/laws.test.c +++ b/src/laws.test.c @@ -287,9 +287,8 @@ void setup_guard(guard_fixture *fix, bool armed) { if (armed) { item_type *itype; - weapon_type *wtype; itype = it_get_or_create(rt_get_or_create("sword")); - wtype = new_weapontype(itype, 0, 0.0, NULL, 0, 0, 0, SK_MELEE, 2); + new_weapontype(itype, 0, 0.0, NULL, 0, 0, 0, SK_MELEE, 2); i_change(&u->items, itype, 1); set_level(u, SK_MELEE, 2); }