OpenRCT2/.travis.yml

40 lines
1.8 KiB
YAML
Raw Normal View History

2014-05-24 01:20:15 +09:00
language: c
2014-05-24 02:16:51 +09:00
before_install:
- sudo apt-get install -y --force-yes binutils-mingw-w64-i686 gcc-mingw-w64-i686 g++-mingw-w64-i686
# fetch precompiled SDL2 + headers for MinGW and push it into the expected directory
- mkdir -p cache
- export SDL2_PV=2.0.3
- if [[ ! -f cache/SDL2-devel-${SDL2_PV}-mingw.tar.gz ]]; then wget http://libsdl.org/release/SDL2-devel-${SDL2_PV}-mingw.tar.gz --output-document cache/SDL2-devel-${SDL2_PV}-mingw.tar.gz; fi
- pushd cache && tar -xzf SDL2-devel-${SDL2_PV}-mingw.tar.gz && popd
# but first fix SDL2 bug
- if [[ ! -f cache/libsdl2-mingw-2.0.3-fix-platform-detection-for-mingw.patch ]]; then wget "https://github.com/anyc/anyc-overlay/raw/master/media-libs/libsdl2-mingw/files/libsdl2-mingw-2.0.3-fix-platform-detection-for-mingw.patch" --output-document cache/libsdl2-mingw-2.0.3-fix-platform-detection-for-mingw.patch; fi
- pushd cache/SDL2-${SDL2_PV}/i686-w64-mingw32/include/SDL2/ && patch -p2 < ../../../../libsdl2-mingw-2.0.3-fix-platform-detection-for-mingw.patch && popd
- sudo mkdir -p /usr/local/cross-tools/
- sudo cp -r cache/SDL2-${SDL2_PV}/i686-w64-mingw32 /usr/local/cross-tools/
# build a wrapper that looks for the sdl2.pc file in the new directory
- echo -e "#! /bin/sh\\nexport PKG_CONFIG_LIBDIR=/usr/local/cross-tools/i686-w64-mingw32/lib/pkgconfig\\npkg-config \$@" > i686-w64-mingw32-pkg-config
- chmod +x i686-w64-mingw32-pkg-config
- sudo mv i686-w64-mingw32-pkg-config /usr/local/bin/
script:
2014-05-24 11:09:22 +09:00
- mkdir build
- pushd build
- cmake -DCMAKE_TOOLCHAIN_FILE=../CMakeLists_mingw.txt -DCMAKE_BUILD_TYPE=Debug ..
- make
- popd
notifications:
irc: "irc.freenode.net#openrct2-dev"
on_failure: always
on_success: change
cache:
directories:
- cache
apt: true