Merge pull request #161 from sbc100/update_travis
Use separate build and install scripts in travis
diff --git a/.gitignore b/.gitignore
index f11a5ba..e8f47d0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,6 @@
-lib
-tmp
-bin
+/lib
+/tmp
+/bin
depends
built
build
@@ -19,6 +19,7 @@
*.vcxproj.*
*.sdf
*.swp
+*.opensdf
j
j0
j1
@@ -32,12 +33,15 @@
testing/*/*.so.1
testing/*/*.dylib
testing/*/gold
-examples/nacl/lib64
-examples/nacl/lib32
-examples/nacl/*.nexe
-examples/nacl/*.nmf
-build/ppapi/vs2010/Regal/win
-build/win32/vs2010/Regal/Debug
-build/win32/vs2010/Regal/Release
-build/win32/vs2010/Regal/ipch
-*.opensdf
+/examples/nacl/lib64
+/examples/nacl/lib32
+/examples/nacl/*.nexe
+/examples/nacl/*.nmf
+/build/ppapi/vs2010/Regal/win
+/build/win32/vs2010/Regal/Debug
+/build/win32/vs2010/Regal/Release
+/build/win32/vs2010/Regal/ipch
+
+# Downloaded by scripts/travis-install.sh
+/nacl_sdk
+/nacl_sdk.zip
diff --git a/.travis.yml b/.travis.yml
index 59e20fd..386e3a2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,22 +1,24 @@
language: cpp
+
+sudo: false
+
+addons:
+ apt:
+ packages:
+ # install i386 base libraries for the NaCl toolchain (parts of which are
+ # 32-bit) as well as the regal linux build deps.
+ - libc6:i386
+ - libstdc++6:i386
+ - libglib2.0-0:i386
+ - libxmu-dev
+ - libxi-dev
+
script:
- - export NACL_SDK_ROOT=$PWD/nacl_sdk/pepper_canary
- - export PATH=$PATH:$NACL_SDK_ROOT/toolchain/linux_x86_newlib/bin
- - export PATH=$PATH:$NACL_SDK_ROOT/toolchain/linux_arm_newlib/bin
- - make -j4
- # Tests don't currently run under nacl on the travis VMs
- # Some kind of OOM issue. TODO(sbc): find out why and fix.
- - "if [ \"$SYSTEM\" = linux ]; then make test; fi"
+ - scripts/travis-build.sh
+
install:
- - "if [ \"$SYSTEM\" != linux ]; then sudo apt-get update; fi"
- # install i686 base libraries so the the NaCl compiler (which is 32-bit) can run
- - "if [ \"$SYSTEM\" != linux ]; then sudo apt-get install libc6:i386 libstdc++6:i386; fi"
- # install NaCl SDK
- - "if [ \"$SYSTEM\" != linux ]; then wget http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip; fi"
- - "if [ \"$SYSTEM\" != linux ]; then unzip nacl_sdk.zip; fi"
- - "if [ \"$SYSTEM\" != linux ]; then nacl_sdk/naclsdk update --force pepper_canary; fi"
- # Install regal linux build deps
- - "if [ \"$SYSTEM\" = linux ]; then sudo apt-get install libxmu-dev libxi-dev; fi"
+ - scripts/travis-install.sh
+
env:
- SYSTEM=linux
- SYSTEM=nacl-i686
diff --git a/Makefile.regaltest b/Makefile.regaltest
index a4e7304..46fe739 100644
--- a/Makefile.regaltest
+++ b/Makefile.regaltest
@@ -69,7 +69,6 @@
$(LOG_STRIP)$(STRIP) -x $@
endif
-ifneq ($(NACL_ARCH),arm)
test: bin/$(SYSTEM)/regaltest$(BIN_EXTENSION)
@echo Running tests: $^
ifeq ($(filter nacl%,$(SYSTEM)),)
@@ -77,7 +76,6 @@
else
"$(NACL_SDK_ROOT)/tools/sel_ldr.py" $^
endif
-endif
endif
endif
diff --git a/README.rst b/README.rst
index 600c336..e4715bd 100644
--- a/README.rst
+++ b/README.rst
@@ -420,6 +420,7 @@
Copyright (c) 2012 Scott Nations
Copyright (c) 2012 Mathias Schott
Copyright (c) 2012 Nigel Stewart
+ Copyright (c) 2015 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
diff --git a/config/Makefile.nacl-arm b/config/Makefile.nacl-arm
index ca76ec8..58d1783 100644
--- a/config/Makefile.nacl-arm
+++ b/config/Makefile.nacl-arm
@@ -20,6 +20,7 @@
LDFLAGS.GLU = -lRegalGLU
LDFLAGS.GLUT = -lRegalGLUT
LDFLAGS.STATIC =
+CFLAGS.EXTRA += -mfpu=vfp
BIN.SUFFIX =
LIB.SONAME = lib$(NAME).so.$(SO_MAJOR)
LIB.DEVLNK = lib$(NAME).so
diff --git a/scripts/travis-build.sh b/scripts/travis-build.sh
new file mode 100755
index 0000000..4aec5c1
--- /dev/null
+++ b/scripts/travis-build.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+set -x
+set -e
+
+if [[ $SYSTEM =~ nacl* ]]; then
+ export NACL_SDK_ROOT=$PWD/nacl_sdk/pepper_45
+fi
+
+make -j4
+
+make test
diff --git a/scripts/travis-install.sh b/scripts/travis-install.sh
new file mode 100755
index 0000000..5926c5b
--- /dev/null
+++ b/scripts/travis-install.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+set -x
+set -e
+
+if [[ $SYSTEM =~ nacl* ]]; then
+ wget http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip
+ unzip nacl_sdk.zip
+ nacl_sdk/naclsdk update --force pepper_45
+fi