-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
122 lines (107 loc) · 5.92 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
matrix:
include:
# linux gcc
- compiler: gcc
env: testenv="linux gcc"
# linux clang
- compiler: clang
env: testenv="linux clang"
# os x cocoa port
- language: objective-c
env: testenv="os x cocoa port"
os: osx
compiler: clang
before_script:
- cd ../src
# enable cmake to find x11 and xrandr
- echo 'INCLUDE_DIRECTORIES("/opt/X11/include")' > temp.txt
- echo 'LINK_DIRECTORIES("/opt/X11/lib")' >> temp.txt
- cat temp.txt CMakeLists.txt > temp2.txt
- rm CMakeLists.txt
- mv temp2.txt CMakeLists.txt
- cd ../build
script:
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make
after_success:
- cpack -G ZIP -D CPACK_PACKAGE_FILE_NAME=yabause-${GIT_HASH}-mac
#- curl --ftp-create-dirs -T yabause-${GIT_HASH}-mac.zip -u $YABUSR:$YABPAS ftp://ftp.tuxfamily.org/yabause/yabause-repository/releases/travis-ci/yabause-${GIT_HASH}-mac.zip
- curl --ftp-create-dirs -T yabause-${GIT_HASH}-mac.zip -u $YABUSR:$YABPAS ftp://ftp.tuxfamily.org/yabause/yabause-repository/releases/travis-ci/yabause-latest-mac.zip
# mingw-w64 windows cross compile, libyabause only
# needs qt and other deps built
- compiler: gcc
env: testenv="mingw-w64 windows cross compile, libyabause only"
addons:
apt:
packages:
- gcc-mingw-w64-x86-64
- g++-mingw-w64-x86-64
- binutils-mingw-w64-x86-64
- mingw-w64-dev
script:
# create toolchain file so we can cross compile
- echo 'SET(CMAKE_SYSTEM_NAME Windows)' > toolchain.cmake
- echo 'SET(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)' >> toolchain.cmake
- echo 'SET(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)' >> toolchain.cmake
- echo 'SET(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)' >> toolchain.cmake
- cmake -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake -DYAB_PORTS= ..
- make
after_success:
#- cpack -G ZIP -D CPACK_PACKAGE_FILE_NAME=yabause-${GIT_HASH}-win64
#- curl --ftp-create-dirs -T yabause-${GIT_HASH}-win64.zip -u $YABUSR:$YABPAS ftp://ftp.tuxfamily.org/yabause/yabause-repository/releases/travis-ci/yabause-${GIT_HASH}-win64.zip
# android port
- compiler: gcc
env: testenv="android port"
language: android
android:
components:
- platform-tools
- tools
script:
- wget http://dl.google.com/android/repository/android-ndk-r11c-linux-x86_64.zip
- unzip -q android-ndk-r11c-linux-x86_64.zip
- export PATH=${PATH}:$(pwd)/android-ndk-r11c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/
- export NDK=$(pwd)/android-ndk-r11c/
- export SYSROOT=$NDK/platforms/android-24/arch-arm
- echo 'SET(CMAKE_SYSTEM_NAME Linux)' > toolchain.cmake
- echo 'SET(CMAKE_SYSTEM_VERSION 1)' >> toolchain.cmake
- echo 'SET(CMAKE_C_COMPILER arm-linux-androideabi-gcc)' >> toolchain.cmake
- echo 'SET(CMAKE_CXX_COMPILER arm-linux-androideabi-g++)' >> toolchain.cmake
- echo 'SET(CMAKE_ASM-ATT_COMPILER arm-linux-androideabi-as)' >> toolchain.cmake
- echo 'set(CMAKE_C_FLAGS "--sysroot=$ENV{SYSROOT}/usr/" CACHE STRING "GCC flags" FORCE)' >> toolchain.cmake
- echo 'set(CMAKE_CXX_FLAGS "--sysroot=$ENV{SYSROOT}/usr/" CACHE STRING "G++ flags" FORCE)' >> toolchain.cmake
- echo 'SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)' >> 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(ANDROID ON)' >> toolchain.cmake
- cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_FIND_ROOT_PATH=$SYSROOT/usr/ -DNDK_BUILD=$NDK/build/ndk-build -DSDK_ANDROID=$ANDROID_HOME/tools/android -DSH2_DYNAREC=OFF -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake -DYAB_PORTS=android ..
- make
after_success:
#- curl --ftp-create-dirs -T ./src/android/bin/Yabause-debug.apk -u $YABUSR:$YABPAS ftp://ftp.tuxfamily.org/yabause/yabause-repository/releases/travis-ci/yabause-${GIT_HASH}-android.apk
#- curl --ftp-create-dirs -T ./src/android/bin/Yabause-debug.apk -u $YABUSR:$YABPAS ftp://ftp.tuxfamily.org/yabause/yabause-repository/releases/travis-ci/yabause-latest-android.apk
#addons:
# coverity_scan:
# project:
# name: "Yabause/yabause"
# description: "Build submitted via Travis CI"
# notification_email: [email protected]
# build_command_prepend: "cmake ..;"
# build_command: "make"
# branch_pattern: coverity_scan
env:
global:
# The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
# - secure: "sopS90ts/MzipWazyLIeLtDkSWZyV9HeMfR8mIglxWuo76T/mOCT0m4fFPRQeJ1OHO3hWMbpYzKt357B/gwcpbq1/MTm6l+mhkxTKGBmrLpT9bz3GfQcQG3UgtOBp5bgUFc0xB2geN5BYrNCiKExmuMqTFByMKvIjiRWzwiCJflc74iNHTzS4j3y/wfRypnhJ8HIyU9YSwB43QzvtvmwgHRNcQ8Z7Hsto4qs4anEM4fnKWD5yyD+sFFnZIaCtDLXcKAi8HY0ILf2jxO5SLxzv0R9tyBkbXLaaSVfHWR3NOFMJtT4vq1v+XzcD2p1c9PxsxmIsOK2TLpYEx7sCmddO5zSs884turwu1ZDT/1pUQODSaxVpCRlE+NVDoUl6tqa3DGW1rIxzp/NjRzo4WEP2+fAvPVQSKG8l7GuHhgY1m8D0lHesaNXFr6D6hiKDEmMc1/nVKW8ohMPQxC1/g7tfM61zCkDcwc5CEtB6lNxEr3Db1M1u7X0pOCbPTgt0mNJcpGlNNDRnjh4gb+gXmFMAsJKTSy4/i4ExhMvTQqUp9LA7Bu0SdCT74rH5wS2oPw65aiijFDdaItk1ZapASphwzVV4IoKMQ7/6ZWEHccLZQ63a4hSSFD0upn5qcAhGlZwdUc4wYRFayUo5pzxYbui9Zlv/XxYEC5K8vI4EunmcBw="
language: cpp
sudo: false
before_install:
# only build the first port if running a coverity scan. otherwise coverity will attempt to analyze all the builds
- if ([[ "${TRAVIS_JOB_NUMBER##*.}" != "1" ]] && [[ "${TRAVIS_BRANCH}" == "coverity_scan" ]]); then false ; fi
- cd yabause
- mkdir build
- cd build
- export GIT_HASH=$(git rev-parse --short HEAD)
script:
- cmake -DYAB_WERROR=ON -DYAB_FORCE_SECURE_STRINGS=ON cmake -DYAB_WANT_DYNAREC_DEVMIYAX=ON ..
- make