fixes #414: build Travis on both Linux & OS X (including for iOS)
This commit is contained in:
0
scripts/flags.sh
Normal file → Executable file
0
scripts/flags.sh
Normal file → Executable file
@@ -1,10 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
cd build/Testing
|
||||
|
||||
for TEST in ./test_* ; do
|
||||
${TEST}
|
||||
done
|
||||
@@ -1,19 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
|
||||
|
||||
#
|
||||
# install Linux dependencies
|
||||
#
|
||||
if [[ `lsb_release -r` =~ "12.04" ]]; then
|
||||
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
|
||||
fi
|
||||
sudo apt-get update -y
|
||||
sudo apt-get -y install gcc-4.8 g++-4.8
|
||||
sudo apt-get -y install git build-essential zlib1g-dev automake libtool xutils-dev make cmake pkg-config python-pip
|
||||
sudo apt-get -y install libxi-dev libglu1-mesa-dev x11proto-randr-dev x11proto-xext-dev libxrandr-dev x11proto-xf86vidmode-dev libxxf86vm-dev libxcursor-dev
|
||||
|
||||
sudo apt-get -y install git build-essential zlib1g-dev automake \
|
||||
libtool xutils-dev make cmake pkg-config python-pip
|
||||
sudo apt-get -y install libxi-dev libglu1-mesa-dev x11proto-randr-dev \
|
||||
x11proto-xext-dev libxrandr-dev \
|
||||
x11proto-xf86vidmode-dev libxxf86vm-dev libxcursor-dev
|
||||
sudo pip install awscli
|
||||
elif [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
|
||||
#
|
||||
# install OS X dependencies
|
||||
#
|
||||
brew install autoconf automake libtool makedepend cmake pkg-config node git
|
||||
fi
|
||||
8
scripts/travis_install.sh
Executable file
8
scripts/travis_install.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
|
||||
#
|
||||
# we'll need the test suite on Linux
|
||||
#
|
||||
npm install git+https://github.com/mapbox/mapbox-gl-test-suite.git
|
||||
fi
|
||||
27
scripts/travis_script.sh
Executable file
27
scripts/travis_script.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then
|
||||
#
|
||||
# build & test Linux
|
||||
#
|
||||
make linux -j4 BUILDTYPE=${BUILDTYPE}
|
||||
make test -j4 BUILDTYPE=${BUILDTYPE}
|
||||
cd build/Testing
|
||||
for TEST in ./test_* ; do
|
||||
${TEST}
|
||||
done
|
||||
cd ../..
|
||||
(cd ./node_modules/mapbox-gl-test-suite/ && (./bin/compare_images.js; ./bin/deploy_results.sh))
|
||||
elif [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
|
||||
#
|
||||
# build OS X
|
||||
#
|
||||
make xproj-cli
|
||||
xcodebuild -project ./build/macosx/mapboxgl-app.xcodeproj
|
||||
#
|
||||
# build iOS
|
||||
#
|
||||
git clone --depth 1 https://github.com/mapbox/mapbox-gl-cocoa ios/mapbox-gl-cocoa
|
||||
make iproj-cli
|
||||
xcodebuild -project ./build/ios/mapbox-gl-cocoa/app/mapboxgl-app.xcodeproj -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
|
||||
fi
|
||||
Reference in New Issue
Block a user