Merge branch 'travis-ci' into 'master'

Travis ci

Ok, now SRB2 on travis-ci is tested to be compiled against 17 buildsets

Now, what am I doing wrong?

See merge request !74
This commit is contained in:
Alam Ed Arias 2016-05-31 11:02:51 -04:00
commit 9122c3e5ea
7 changed files with 199 additions and 23 deletions

View file

@ -2,19 +2,194 @@ language: c
sudo: required sudo: required
dist: trusty dist: trusty
env: matrix:
- CFLAGS=-Wall -W -Werror include:
- os: linux
os: addons:
- linux apt:
- osx packages:
- libsdl2-mixer-dev
compiler: - libpng-dev
- gcc - libgl1-mesa-dev
- clang - libgme-dev
- p7zip-full
- gcc-4.4
compiler: gcc-4.4
#gcc-4.4 (Ubuntu/Linaro 4.4.7-8ubuntu1) 4.4.7
- os: linux
addons:
apt:
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- p7zip-full
- gcc-4.6
compiler: gcc-4.6
#gcc-4.6 (Ubuntu/Linaro 4.6.4-6ubuntu2) 4.6.4
- os: linux
addons:
apt:
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- p7zip-full
- gcc-4.7
compiler: gcc-4.7
#gcc-4.7
- os: linux
compiler: gcc
#gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- p7zip-full
- gcc-4.8
compiler: gcc-4.8
#gcc-4.8 (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- p7zip-full
- gcc-4.9
compiler: gcc-4.9
#gcc-4.9 (Ubuntu 4.9.3-8ubuntu2~14.04) 4.9.3
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- p7zip-full
- gcc-5
compiler: gcc-5
#gcc-5 (Ubuntu 5.3.0-3ubuntu1~14.04) 5.3.0 20151204
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- p7zip-full
- gcc-6
compiler: gcc-6
env: WFLAGS="-Wno-error=tautological-compare"
#gcc-6 (Ubuntu 6.1.1-3ubuntu11~14.04.1) 6.1.1 20160511
- os: linux
compiler: clang
#clang version 3.5.0 (tags/RELEASE_350/final)
- os: linux
addons:
apt:
sources:
- llvm-toolchain-precise-3.5
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- p7zip-full
- clang-3.5
compiler: clang-3.5
#Ubuntu clang version 3.5.0-4ubuntu2~trusty2 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
- os: linux
addons:
apt:
sources:
- llvm-toolchain-precise-3.6
- ubuntu-toolchain-r-test
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- p7zip-full
- clang-3.6
compiler: clang-3.6
#
- os: linux
addons:
apt:
sources:
- llvm-toolchain-precise-3.7
- ubuntu-toolchain-r-test
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- p7zip-full
- clang-3.7
compiler: clang-3.7
#
- os: linux
addons:
apt:
sources:
- llvm-toolchain-precise-3.8
- ubuntu-toolchain-r-test
packages:
- libsdl2-mixer-dev
- libpng-dev
- libgl1-mesa-dev
- libgme-dev
- p7zip-full
- clang-3.8
compiler: clang-3.8
#
- os: osx
osx_image: beta-xcode6.1
#Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
- os: osx
osx_image: beta-xcode6.2
compiler: gcc
#Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
# - os: osx
# osx_image: beta-xcode6.3
# #I think xcode.6.3 VM is broken, it does not boot
# - os: osx
osx_image: xcode6.4
#Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
- os: osx
osx_image: xcode7
#Apple LLVM version 7.0.0 (clang-700.0.72)
- os: osx
osx_image: xcode7.1
#Apple LLVM version 7.0.0 (clang-700.1.76)
- os: osx
osx_image: xcode7.2
#Apple LLVM version 7.0.2 (clang-700.1.81)
- os: osx
osx_image: xcode7.3
#Apple LLVM version 7.3.0 (clang-703.0.31)
cache: cache:
apt: true apt: true
ccache: true ccache: true
directories: directories:
- $HOME/srb2_cache - $HOME/srb2_cache
@ -33,11 +208,13 @@ before_script:
- 7z x $HOME/srb2_cache/SRB2-v2115-assets-2.7z -oassets - 7z x $HOME/srb2_cache/SRB2-v2115-assets-2.7z -oassets
- mkdir build - mkdir build
- cd build - cd build
- cmake .. - export CFLAGS="-Wall -W $WFLAGS"
- cmake .. -DCMAKE_BUILD_TYPE=Release
before_install: before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sdl2_mixer game-music-emu p7zip ; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sdl2_mixer game-music-emu p7zip; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install cmake||true; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -O -L https://www.libsdl.org/release/SDL2-2.0.4.dmg; hdiutil attach SDL2-2.0.4.dmg; sudo cp -a /Volumes/SDL2/SDL2.framework /Library/Frameworks/; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -O -L https://www.libsdl.org/release/SDL2-2.0.4.dmg; hdiutil attach SDL2-2.0.4.dmg; sudo cp -a /Volumes/SDL2/SDL2.framework /Library/Frameworks/; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -O -L https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.1.dmg; hdiutil attach SDL2_mixer-2.0.1.dmg; sudo cp -a /Volumes/SDL2_mixer/SDL2_mixer.framework /Library/Frameworks/; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -O -L https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.1.dmg; hdiutil attach SDL2_mixer-2.0.1.dmg; sudo cp -a /Volumes/SDL2_mixer/SDL2_mixer.framework /Library/Frameworks/; fi
- mkdir -p $HOME/srb2_cache - mkdir -p $HOME/srb2_cache

View file

@ -270,6 +270,7 @@ static int boolK (FuncState *fs, int b) {
static int nilK (FuncState *fs) { static int nilK (FuncState *fs) {
TValue k, v; TValue k, v;
setbvalue(&v, 0);
setnilvalue(&v); setnilvalue(&v);
/* cannot use nil as key; instead use table itself to represent nil */ /* cannot use nil as key; instead use table itself to represent nil */
sethvalue(fs->L, &k, fs->h); sethvalue(fs->L, &k, fs->h);

View file

@ -137,7 +137,7 @@ static void addfield (lua_State *L, luaL_Buffer *b, int i) {
if (!lua_isstring(L, -1)) if (!lua_isstring(L, -1))
luaL_error(L, "invalid value (%s) at index %d in table for " luaL_error(L, "invalid value (%s) at index %d in table for "
LUA_QL("concat"), luaL_typename(L, -1), i); LUA_QL("concat"), luaL_typename(L, -1), i);
luaL_addvalue(b); luaL_addvalue(b);
} }

View file

@ -2598,11 +2598,13 @@ static void D_MD5PasswordPass(const UINT8 *buffer, size_t len, const char *salt,
memset(dest, 0, 16); memset(dest, 0, 16);
#else #else
XBOXSTATIC char tmpbuf[256]; XBOXSTATIC char tmpbuf[256];
const size_t sl = strlen(salt);
if (len > 256-strlen(salt)) if (len > 256-sl)
len = 256-strlen(salt); len = 256-sl;
memcpy(tmpbuf, buffer, len); memcpy(tmpbuf, buffer, len);
strcpy(&tmpbuf[len], salt); memmove(&tmpbuf[len], salt, sl);
//strcpy(&tmpbuf[len], salt);
len += strlen(salt); len += strlen(salt);
if (len < 256) if (len < 256)
memset(&tmpbuf[len],0,256-len); memset(&tmpbuf[len],0,256-len);

View file

@ -466,7 +466,7 @@ static boolean SOCK_cmpaddr(mysockaddr_t *a, mysockaddr_t *b, UINT8 mask)
UINT32 bitmask = INADDR_NONE; UINT32 bitmask = INADDR_NONE;
if (mask && mask < 32) if (mask && mask < 32)
bitmask = htonl(-1 << (32 - mask)); bitmask = htonl((UINT32)(-1) << (32 - mask));
if (b->any.sa_family == AF_INET) if (b->any.sa_family == AF_INET)
return (a->ip4.sin_addr.s_addr & bitmask) == (b->ip4.sin_addr.s_addr & bitmask) return (a->ip4.sin_addr.s_addr & bitmask) == (b->ip4.sin_addr.s_addr & bitmask)

View file

@ -7430,7 +7430,7 @@ static void M_HandleFogColor(INT32 choice)
l = strlen(temp); l = strlen(temp);
for (i = 0; i < l; i++) for (i = 0; i < l; i++)
cv_grfogcolor.zstring[5 - i] = temp[l - i]; cv_grfogcolor.zstring[5 - i] = temp[l - i];
cv_grfogcolor.zstring[5] = (char)choice; cv_grfogcolor.zstring[5] = (char)choice;
} }
break; break;
} }

View file

@ -144,10 +144,8 @@ void XBoxStartup()
myargv = NULL; myargv = NULL;
#else #else
#ifdef FORCESDLMAIN #ifdef FORCESDLMAIN
FUNCNORETURN
int SDL_main(int argc, char **argv) int SDL_main(int argc, char **argv)
#else #else
FUNCNORETURN
int main(int argc, char **argv) int main(int argc, char **argv)
#endif #endif
{ {
@ -245,8 +243,6 @@ int main(int argc, char **argv)
#endif #endif
// return to OS // return to OS
#ifndef __GNUC__
return 0; return 0;
#endif
} }
#endif #endif