forked from daemondn/WalCommander
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
63 lines (57 loc) · 2.16 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
language: cpp
branches:
except:
- wcm-upstream
compiler:
- gcc
- clang
env:
- BUILDMODE=custom
- BUILDMODE=cmake
- BUILDMODE=cmake-mingw32
matrix:
exclude:
- compiler: clang
env: BUILDMODE=cmake-mingw32
before_script:
- sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
- sudo add-apt-repository --yes ppa:tobydox/mingw-x-precise
- sudo apt-get -qq update
- sudo apt-get -qq install libsmbclient-dev libssh2-1-dev
- sudo apt-get -qq install gcc-4.8 g++-4.8
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20
- sudo update-alternatives --config gcc
- sudo update-alternatives --config g++
- if [ "$BUILDMODE" = "cmake-mingw32" ]; then sudo apt-get -qq install mingw64-x-gcc; fi
script:
- if [ "$BUILDMODE" = "custom" ]; then
echo "===> Building with custom buildsystem..." &&
cd "$TRAVIS_BUILD_DIR" &&
make all -B;
fi
- if [ "$BUILDMODE" = "cmake" ]; then
echo "===> Building with cmake..." &&
cd "$TRAVIS_BUILD_DIR" &&
mkdir build &&
cd build &&
cmake -DCMAKE_INSTALL_PREFIX=prefix .. &&
make &&
make install;
fi
- if [ "$BUILDMODE" = "cmake-mingw32" ]; then echo "===> Building with cmake+mingw32..." &&
cd "$TRAVIS_BUILD_DIR" &&
mkdir build &&
cd build &&
echo "SET(CMAKE_SYSTEM_NAME Windows)" > toolchain.cmake &&
echo "SET(CMAKE_C_COMPILER /opt/mingw64/bin/x86_64-w64-mingw32-gcc)" >> toolchain.cmake &&
echo "SET(CMAKE_CXX_COMPILER /opt/mingw64/bin/x86_64-w64-mingw32-g++)" >> toolchain.cmake &&
echo "SET(CMAKE_RC_COMPILER /opt/mingw64/bin/x86_64-w64-mingw32-windres)" >> toolchain.cmake &&
echo "SET(CMAKE_FIND_ROOT_PATH /opt/mingw64)" >> toolchain.cmake &&
echo "SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)" >> toolchain.cmake &&
echo "SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> toolchain.cmake &&
echo "SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)" >> toolchain.cmake &&
cmake -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake -DCMAKE_INSTALL_PREFIX=prefix .. &&
make &&
make install;
fi