forked from Qfusion/qfusion
-
Notifications
You must be signed in to change notification settings - Fork 45
/
.travis.yml
91 lines (87 loc) · 3 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
sudo: false
dist: trusty
cache:
apt: true
directories:
- $HOME/.deps
matrix:
include:
- os: osx
osx_image: xcode13.2
env:
- QF_ARCH=OSX
language: c++
compiler: clang
- os: linux
language: c++
compiler: gcc-4.9
env:
- QF_ARCH=x86
addons:
apt:
sources:
- kubuntu-backports
- ubuntu-toolchain-r-test
packages:
- gcc-4.9
- g++-4.9
- cmake
- build-essential
- gcc-4.9-multilib
- g++-4.9-multilib
- gcc-multilib
- libgnutls-dev:i386
- libidn11-dev:i386
- libkrb5-dev:i386
- librtmp-dev:i386
- libpng-dev:i386
- libgl1-mesa-dev:i386
- libglu1-mesa-dev:i386
- libpulse-dev:i386
- libsdl2-dev:i386
- libopenal-dev:i386
- libvorbis-dev:i386
- libfreetype6-dev:i386
- libcurl4-gnutls-dev:i386
- libglib2.0-dev:i386
- os: linux
language: c++
compiler: clang
env:
- QF_ARCH=x86_64
addons:
apt:
packages:
- clang
- cmake
- build-essential
- libsdl2-dev
- libopenal-dev
- libvorbis-dev
- libfreetype6-dev
- libcurl4-gnutls-dev
before_install:
- if [[ "$QF_ARCH" != "OSX" ]]; then sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B; fi
install:
- if [[ "$QF_ARCH" == "x86_64" ]]; then export CC=clang CXX=clang++; fi
- if [[ "$QF_ARCH" == "x86" ]]; then export CC=gcc-4.9 CXX=g++-4.9; fi
- cd "$TRAVIS_BUILD_DIR/source"
- if [[ "$QF_ARCH" == "x86_64" ]]; then cmake -DBUILD_STEAMLIB=1 .; fi
- if [[ "$QF_ARCH" == "x86" ]]; then cmake -DCMAKE_TOOLCHAIN_FILE=cmake/i386-linux-gnu.cmake -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32 -DBUILD_STEAMLIB=1 .; fi
- if [[ "$QF_ARCH" == "OSX" ]]; then cmake -G Xcode -DBUILD_STEAMLIB=1 .; fi
- cd "$TRAVIS_BUILD_DIR"
script:
- curl https://warfork.com/downloads/sdk/ --output "$TRAVIS_BUILD_DIR/third-party/steamworks/sdk.zip"
- unzip -o "$TRAVIS_BUILD_DIR/third-party/steamworks/sdk.zip" -d "$TRAVIS_BUILD_DIR/third-party/steamworks"
- cd source
- if [[ "$QF_ARCH" == "x86_64" ]]; then make -j8; fi
- if [[ "$QF_ARCH" == "x86" ]]; then make -j8; fi
- if [[ "$QF_ARCH" == "OSX" ]]; then xcodebuild -project qfusion.xcodeproj/ -jobs 4 -configuration Release -target ALL_BUILD CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO; fi
- cd build
- echo "${TRAVIS_COMMIT}" >commit.txt
- echo "671610" >steam_appid.txt
- if [[ "$QF_ARCH" == "OSX" ]]; then cd Release && tar -czvf ../../tmp.tar.gz *.app && cd ..; fi
- if [[ "$QF_ARCH" != "OSX" ]]; then tar -czvf ../tmp.tar.gz * --exclude *.a --exclude base*/*.a libs/*.a; fi
- cd ..
- mv tmp.tar.gz ${QF_ARCH}-Release.tar.gz
- curl -F "file=@${QF_ARCH}-Release.tar.gz" https://file.io