summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile7
-rwxr-xr-xscripts/travis-build.sh20
-rw-r--r--scripts/travis-common.sh31
-rwxr-xr-xscripts/travis-test.sh40
4 files changed, 70 insertions, 28 deletions
diff --git a/Makefile b/Makefile
index 4c5b6ae7..8cff7fa0 100644
--- a/Makefile
+++ b/Makefile
@@ -19,22 +19,27 @@
DEFAULT_COMPILER = CLANG
DEFAULT_BUILD_TYPE = DEBUG
-COMPILERS := GCC CLANG
+COMPILERS := GCC GCC_I686 CLANG
BUILD_TYPES := DEBUG RELEASE
SANITIZERS := NO ASAN MSAN LSAN
GCC_DEBUG_DIR := out/gcc/Debug
GCC_RELEASE_DIR := out/gcc/Release
+GCC_I686_DEBUG_DIR := out/gcc-i686/Debug
+GCC_I686_RELEASE_DIR := out/gcc-i686/Release
CLANG_DEBUG_DIR := out/clang/Debug
CLANG_RELEASE_DIR := out/clang/Release
DEBUG_FLAG := -DCMAKE_BUILD_TYPE=Debug
RELEASE_FLAG := -DCMAKE_BUILD_TYPE=Release
GCC_FLAG := -DCMAKE_C_COMPILER=gcc
+GCC_I686_FLAG := -DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS=-m32
CLANG_FLAG := -DCMAKE_C_COMPILER=clang
GCC_DEBUG_PREFIX := gcc-debug
GCC_RELEASE_PREFIX := gcc-release
+GCC_I686_DEBUG_PREFIX := gcc-i686-debug
+GCC_I686_RELEASE_PREFIX := gcc-i686-release
CLANG_DEBUG_PREFIX := clang-debug
CLANG_RELEASE_PREFIX := clang-release
diff --git a/scripts/travis-build.sh b/scripts/travis-build.sh
index 1b1a941b..30f9da5b 100755
--- a/scripts/travis-build.sh
+++ b/scripts/travis-build.sh
@@ -18,14 +18,16 @@
set -o nounset
set -o errexit
-BUILD_TYPES="debug release"
-SANITIZERS="-asan -lsan -msan"
+SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
+source ${SCRIPT_DIR}/travis-common.sh
-for BUILD_TYPE in ${BUILD_TYPES}; do
- make ${CC}-${BUILD_TYPE}-sexpr-wasm
- if [ ${CC} = "clang" ]; then
- for SANITIZER in ${SANITIZERS}; do
- make ${CC}-${BUILD_TYPE}-sexpr-wasm${SANITIZER}
- done
- fi
+for COMPILER in ${COMPILERS}; do
+ for BUILD_TYPE in ${BUILD_TYPES}; do
+ make ${COMPILER}-${BUILD_TYPE}-sexpr-wasm
+ if [ ${COMPILER} = "clang" ]; then
+ for SANITIZER in ${SANITIZERS}; do
+ make ${CC}-${BUILD_TYPE}-sexpr-wasm${SANITIZER}
+ done
+ fi
+ done
done
diff --git a/scripts/travis-common.sh b/scripts/travis-common.sh
new file mode 100644
index 00000000..c5db436e
--- /dev/null
+++ b/scripts/travis-common.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+#
+# Copyright 2016 WebAssembly Community Group participants
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
+ROOT_DIR="$(dirname "${SCRIPT_DIR}")"
+BUILD_TYPES="debug release"
+BUILD_TYPES_UPPER="Debug Release"
+SANITIZERS="-asan -lsan -msan"
+
+if [ ${CC} = "gcc" ]; then
+ COMPILERS="gcc gcc-i686"
+elif [ ${CC} = "clang" ]; then
+ COMPILERS="clang"
+else
+ echo "unknown compiler: ${CC}"
+ exit 1
+fi
diff --git a/scripts/travis-test.sh b/scripts/travis-test.sh
index 17763f9d..4dc3279b 100755
--- a/scripts/travis-test.sh
+++ b/scripts/travis-test.sh
@@ -19,9 +19,7 @@ set -o nounset
set -o errexit
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
-ROOT_DIR="$(dirname "${SCRIPT_DIR}")"
-BUILD_TYPES="Debug Release"
-SANITIZERS="-asan -lsan -msan"
+source ${SCRIPT_DIR}/travis-common.sh
log_and_run() {
echo $*
@@ -36,20 +34,26 @@ run_tests() {
(cd ${ROOT_DIR} && log_and_run test/run-tests.py -e ${EXE} ${ARG_FLAG-} --timeout=10)
}
-for BUILD_TYPE in ${BUILD_TYPES}; do
- EXE=out/${CC}/${BUILD_TYPE}/sexpr-wasm
- if [ -e ${EXE} ]; then
- run_tests ${EXE}
- run_tests ${EXE} --use-libc-allocator
- fi
+for COMPILER in ${COMPILERS}; do
+ for BUILD_TYPE in ${BUILD_TYPES_UPPER}; do
+ EXE=out/${COMPILER}/${BUILD_TYPE}/sexpr-wasm
+ if [ -e ${EXE} ]; then
+ run_tests ${EXE}
+ run_tests ${EXE} --use-libc-allocator
+ else
+ echo "${EXE} doesn't exist; skipping."
+ fi
- if [ ${CC} = "clang" ]; then
- for SANITIZER in ${SANITIZERS}; do
- EXE=out/${CC}/${BUILD_TYPE}/sexpr-wasm${SANITIZER}
- if [ -e ${EXE} ]; then
- run_tests ${EXE}
- run_tests ${EXE} --use-libc-allocator
- fi
- done
- fi
+ if [ ${COMPILER} = "clang" ]; then
+ for SANITIZER in ${SANITIZERS}; do
+ EXE=out/${COMPILER}/${BUILD_TYPE}/sexpr-wasm${SANITIZER}
+ if [ -e ${EXE} ]; then
+ run_tests ${EXE}
+ run_tests ${EXE} --use-libc-allocator
+ else
+ echo "${EXE} doesn't exist; skipping."
+ fi
+ done
+ fi
+ done
done