Merge pull request #33 from xianyi/master

Enable Travis CI
This commit is contained in:
Field G. Van Zee
2015-10-14 13:26:07 -05:00
4 changed files with 104 additions and 0 deletions

34
.travis.yml Normal file
View File

@@ -0,0 +1,34 @@
language: c
sudo: false
compiler:
- gcc
env:
- RUN_TEST=1 BUILD_CONFIG="auto"
- RUN_TEST=1 BUILD_CONFIG="reference"
- RUN_TEST=1 BUILD_CONFIG="dunnington"
- RUN_TEST=0 BUILD_CONFIG="sandybridge"
- RUN_TEST=0 BUILD_CONFIG="haswell"
- RUN_TEST=0 BUILD_CONFIG="bulldozer"
- RUN_TEST=0 BUILD_CONFIG="piledriver"
- RUN_TEST=0 BUILD_CONFIG="carrizo"
install:
- if [ "$CC" = "gcc" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.8
- g++-4.8
- clang
script:
- ./configure $BUILD_CONFIG
- make CC=gcc-4.8
- if [ $RUN_TEST -eq 1 ]; then make BLIS_ENABLE_TEST_OUTPUT=yes test; fi
- if [ $RUN_TEST -eq 1 ]; then ./build/check-test.sh ./output.testsuite; fi

View File

@@ -633,6 +633,11 @@ ifeq ($(BLIS_ENABLE_VERBOSE_MAKE_OUTPUT),yes)
./$(TESTSUITE_BIN) -g $(TESTSUITE_CONF_GEN_PATH) \
-o $(TESTSUITE_CONF_OPS_PATH) \
> $(TESTSUITE_OUT_FILE)
else ifeq ($(BLIS_ENABLE_TEST_OUTPUT), yes)
./$(TESTSUITE_BIN) -g $(TESTSUITE_CONF_GEN_PATH) \
-o $(TESTSUITE_CONF_OPS_PATH) | \
tee $(TESTSUITE_OUT_FILE)
else
@echo "Running $(TESTSUITE_BIN) with output redirected to '$(TESTSUITE_OUT_FILE)'"
@./$(TESTSUITE_BIN) -g $(TESTSUITE_CONF_GEN_PATH) \

View File

@@ -172,6 +172,7 @@ int cpu_detect()
case 12:
case 15:
//Haswell
case 13: //Broadwell
if(support_avx()) {
return CPUNAME_HASWELL;
}else{
@@ -185,6 +186,9 @@ int cpu_detect()
case 5:
case 6:
//Haswell
case 7:
case 15:
//Broadwell
if(support_avx()) {
return CPUNAME_HASWELL;
}else{
@@ -192,6 +196,17 @@ int cpu_detect()
}
}
break;
case 5:
switch (model) {
case 6:
//Broadwell
if(support_avx()) {
return CPUNAME_HASWELL;
}else{
return CPUNAME_REFERENCE; //OS doesn't support AVX
}
}
break;
}
break;
}

50
build/check-test.sh Executable file
View File

@@ -0,0 +1,50 @@
#!/bin/bash
#
# BLIS
# An object-based framework for developing high-performance BLAS-like
# libraries.
#
# Copyright (C) 2015, The University of Texas at Austin
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# - Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# - Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# - Neither the name of The University of Texas at Austin nor the names
# of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#
#
# check-test.sh
#
# Zhang Xianyi
#
grep -q FAILURE $1
if [ $? -eq 0 ]; then
echo "Test Failure"
exit 1
else
echo "Test Pass"
exit 0
fi