Skip to content

Commit

Permalink
Add installation test to Travis.
Browse files Browse the repository at this point in the history
  • Loading branch information
devinamatthews committed Aug 16, 2019
1 parent 4d39263 commit b9d719e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
25 changes: 16 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,22 @@ compiler:
- clang

env:
- RUN_TEST=1 THREADING="none" BUILD_CONFIG="auto"
- RUN_TEST=1 THREADING="none" BUILD_CONFIG="reference"
- RUN_TEST=0 THREADING="openmp" BUILD_CONFIG="auto"
- RUN_TEST=0 THREADING="pthreads" BUILD_CONFIG="auto"
- RUN_TEST=0 THREADING="tbb" BUILD_CONFIG="auto"
- TEST_INSTALL=0 RUN_TEST=1 THREADING="none" BUILD_CONFIG="auto"
- TEST_INSTALL=0 RUN_TEST=1 THREADING="none" BUILD_CONFIG="reference"
- TEST_INSTALL=1 RUN_TEST=0 THREADING="none" BUILD_CONFIG="auto"
- TEST_INSTALL=0 RUN_TEST=0 THREADING="openmp" BUILD_CONFIG="auto"
- TEST_INSTALL=0 RUN_TEST=0 THREADING="pthreads" BUILD_CONFIG="auto"
- TEST_INSTALL=0 RUN_TEST=0 THREADING="tbb" BUILD_CONFIG="auto"

matrix:
exclude:
- env: RUN_TEST=1 THREADING="none" BUILD_CONFIG="auto"
- env: TEST_INSTALL=0 RUN_TEST=1 THREADING="none" BUILD_CONFIG="auto"
os: osx
- env: RUN_TEST=1 THREADING="none" BUILD_CONFIG="reference"
- env: TEST_INSTALL=0 RUN_TEST=1 THREADING="none" BUILD_CONFIG="reference"
os: osx
- env: RUN_TEST=0 THREADING="tbb" BUILD_CONFIG="auto"
- env: TEST_INSTALL=1 RUN_TEST=0 THREADING="none" BUILD_CONFIG="auto"
os: osx
- env: TEST_INSTALL=0 RUN_TEST=0 THREADING="tbb" BUILD_CONFIG="auto"
os: osx

before_install:
Expand Down Expand Up @@ -65,7 +68,11 @@ script:
- $CC --version
- $CXX --version
- as --version
- ./configure CC="$CC" CXX="$CXX" --enable-threading="$THREADING" --enable-config="$BUILD_CONFIG"
- ./configure CC="$CC" CXX="$CXX" --enable-threading="$THREADING" --enable-config="$BUILD_CONFIG" --prefix=`pwd`/install
- cat config.log src/external/tci/config.log
- make -j 2
- if [ $RUN_TEST -eq 1 ]; then travis_wait 30 bin/test; fi
- 'if [ $TEST_INSTALL -eq 1 ]; then
make install;
$CXX -std=c++11 -o test_install -I./install/include test/test_install.cxx -L./install/lib -ltblis;
fi'
12 changes: 12 additions & 0 deletions test/test_install.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include <tblis/tblis.h>

using namespace tblis;

int main()
{
tensor<double> A({10, 4, 3});
tensor<double> B({3, 4, 6, 7});
tensor<double> C({7, 10, 6});

mult<double>(1.0, A, "abc", B, "cbde", 0.0, C, "ead");
}

0 comments on commit b9d719e

Please sign in to comment.