Skip to content

Commit 47ec343

Browse files
committed
add x86 Linux build to travis
1 parent cd1463b commit 47ec343

File tree

1 file changed

+43
-23
lines changed

1 file changed

+43
-23
lines changed

.travis.yml

Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,54 @@
1-
language: cpp
2-
cache: ccache
3-
sudo: required
41
dist: xenial
5-
compiler:
6-
- g++
7-
install: export CXX="g++-7"
2+
sudo: required
3+
cache: ccache
4+
language: cpp
5+
6+
#branches:
7+
# only:
8+
# - linux
9+
# - xd_dev
10+
# - "/^v\\d+\\./"
11+
812
os:
913
- linux
10-
before_script:
11-
- g++ --version
12-
- sudo apt-get install libegl1-mesa-dev libgles2-mesa-dev libpugixml-dev libopenal-dev libtbb-dev libcrypto++-dev liblockfile-dev libfreeimage-dev
13-
- sudo apt-get install cmake lua5.1-dev libssl-dev libogg-dev libtheora-dev libvorbis-dev libsdl2-dev liblzo2-dev libjpeg-dev libncurses5-dev
14-
- mkdir bin
15-
- cd bin
16-
- cmake ..
17-
script:
18-
- if [ $TRAVIS_OS_NAME == linux ]; then make && file src/xrCore/xrCore.so; fi
14+
compiler:
15+
- g++
16+
env:
17+
global:
18+
- LANG="en_US.UTF-8"
19+
matrix:
20+
- TARGET_CPU=x64 BUILD_CONFIGURATION=Release
21+
- TARGET_CPU=x86 BUILD_CONFIGURATION=Release
22+
1923
addons:
2024
apt:
2125
sources:
2226
- sourceline: 'ppa:ubuntu-toolchain-r/test'
2327
packages:
2428
- g++-7
25-
#branches:
26-
# only:
27-
# - linux
28-
# - xd_dev
29-
# - "/^v\\d+\\./"
29+
30+
install: export CXX="g++-7"
31+
32+
before_script:
33+
- g++ --version
34+
- export core_count=$(nproc || echo 4) && echo core_count = $core_count
35+
- mkdir bin
36+
- cd bin
37+
- if [ $TARGET_CPU == x64 ]; then
38+
sudo apt-get install -y libegl1-mesa-dev libgles2-mesa-dev libpugixml-dev libopenal-dev libtbb-dev libcrypto++-dev liblockfile-dev libfreeimage-dev;
39+
sudo apt-get install -y cmake liblua5.1-0-dev libssl-dev libogg-dev libtheora-dev libvorbis-dev libsdl2-dev liblzo2-dev libjpeg-dev libncurses5-dev;
40+
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_CONFIGURATION;
41+
fi
42+
43+
- if [ $TARGET_CPU == x86 ]; then
44+
sudo dpkg --add-architecture i386 && sudo apt-get -qq update && sudo apt-get install -y gcc-multilib g++-7-multilib libpulse-dev:i386 libglib2.0-dev:i386;
45+
sudo apt-get install -y libegl1-mesa-dev:i386 libgles2-mesa-dev:i386 libpugixml-dev:i386 libopenal-dev:i386 libtbb-dev:i386 libcrypto++-dev:i386 liblockfile-dev:i386 libfreeimage-dev:i386;
46+
sudo apt-get install -y cmake liblua5.1-0-dev:i386 libssl-dev:i386 libogg-dev:i386 libtheora-dev:i386 libvorbis-dev:i386 libsdl2-dev:i386 liblzo2-dev:i386 libjpeg-dev:i386 libncurses5-dev:i386;
47+
CFLAGS="-m32 -march=native" CXXFLAGS="-m32 -march=native" cmake .. -DCMAKE_BUILD_TYPE=$BUILD_CONFIGURATION -DCMAKE_ASM_FLAGS=-m32;
48+
fi
49+
50+
script:
51+
- if [ $TRAVIS_OS_NAME == linux ]; then make -j $core_count && file src/xrCore/xrCore.so; fi
52+
3053
notifications:
3154
email: false
32-
env:
33-
global:
34-
- LANG="en_US.UTF-8"

0 commit comments

Comments
 (0)