Skip to content

Commit

Permalink
travis test
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLartians committed May 17, 2019
1 parent 6dacd3d commit ec850ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 33 deletions.
31 changes: 0 additions & 31 deletions .travis.yml
Expand Up @@ -10,38 +10,7 @@ common_sources: &all_sources
python:
- 3.7

matrix:
include:
- os: linux
compiler: gcc
addons: &gcc8
apt:
sources: *all_sources
packages:
- g++-8
env:
- MATRIX_EVAL="export CC=gcc-8; export CXX=g++-8;"

- os: linux
compiler: clang
addons:
apt:
sources: *all_sources
packages:
- g++-8
- clang-6.0
env:
- MATRIX_EVAL="export CC=clang-6.0; export CXX=clang++-6.0;"

before_install:
# Update compilers
- eval "${MATRIX_EVAL}"
- echo "CC=$CC CXX=$CXX"
# Install a supported cmake version (>= 3.14)
- wget -O cmake.sh https://cmake.org/files/v3.14/cmake-3.14.0-Linux-x86_64.sh
- sudo sh cmake.sh --skip-license --exclude-subdir --prefix=/usr/local
- export PATH=/usr/local/bin:$PATH
- cmake --version

script:
- python3 examples/run_all.py
Expand Down
5 changes: 3 additions & 2 deletions examples/run_all.py
Expand Up @@ -3,7 +3,9 @@
from pathlib import Path
from subprocess import PIPE, run

examples = [x for x in Path(__file__).parent.iterdir() if x.is_dir() and (x / 'CmakeLists.txt').is_file()]
examples = [
x for x in Path(__file__).parent.iterdir() if x.is_dir() and (x / 'CMakeLists.txt').exists()
]

assert(len(examples) > 0)

Expand All @@ -25,4 +27,3 @@ def runCommand(command):
build = runCommand('cmake --build %s -j' % (project))
print(' ' + '\n '.join([line for line in build.split('\n') if 'Built target' in line]))
print('')

0 comments on commit ec850ce

Please sign in to comment.