Skip to content

Commit

Permalink
adjust travis config to get scripts to run
Browse files Browse the repository at this point in the history
  • Loading branch information
justinfx committed Aug 29, 2018
1 parent 03cc49d commit 56c9fa1
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 24 deletions.
75 changes: 52 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,54 @@
language: go

# This will run on Travis' 'new' container-based infrastructure
sudo: false

git:
depth: 1

cache:
apt: true

addons:
apt:
packages:
- doxygen
- doxygen-doc
- doxygen-latex
- doxygen-gui
- graphviz

matrix:
include:
- go: "1.10.x"
script: go test -v $(go list ./... | grep -v /vendor/)
- go: "1.11.x"
script: go test -v -mod=vendor ./...
directories:
- "$HOME/opt"

env:
- GO111MODULE=on

global:
- WAF_VERSION=waf-1.9.14

install: true

jobs:
include:
- go: "1.10.x"
env: USEMOD=0
script: go test -v $(go list ./... | grep -v /vendor/)

- go: "1.11.x"
env: USEMOD=1 GO111MODULE=on
script: go test -v -mod=vendor ./...

- stage: cpp-test
language: cpp
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.9
- g++-4.9
before_install:
- export PATH=$HOME/opt/waf-${WAF_VERSION}:$PATH
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
- test -x waf-light || {
cd "$HOME/opt" &&
wget "https://gitlab.com/ita1024/waf/-/archive/${WAF_VERSION}/waf-${WAF_VERSION}.tar.gz" &&
tar -zxf "waf-${WAF_VERSION}.tar.gz" &&
cd "waf-${WAF_VERSION}" &&
./waf-light configure build &&
cd $TRAVIS_BUILD_DIR; }
script:
- cd ${TRAVIS_BUILD_DIR}/cpp
- waf-light configure test

- stage: deploy
script: skip
if: tag =~ ^v\d+
deploy:
provider: script
Expand All @@ -38,9 +57,19 @@ jobs:
on:
tags: true
condition: $TRAVIS_OS_NAME = linux

- stage: doxygen
script: cd cpp/docs && doxygen && cd $TRAVIS_BUILD_DIR
language: cpp
addons:
apt:
packages:
- doxygen
- doxygen-doc
- doxygen-latex
- doxygen-gui
- graphviz
script:
- cd cpp/docs && doxygen && cd $TRAVIS_BUILD_DIR
deploy:
provider: pages
project-name: libfileseq
Expand Down
4 changes: 3 additions & 1 deletion cpp/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def _create_test(bld):
'test/gtest/src/gtest-all.cc']),
includes = [ "test", "test/gtest/include", "test/gtest", "." ],
use = use,
lib = ['pthread'],
stlib = stlib,
cxxflags = ["-Wno-undef", "-g", "-ggdb"],
defines = ["FILESEQ_TEST_DIR=%s" % bld.path.parent.abspath()],
Expand Down Expand Up @@ -105,9 +106,10 @@ def check_cxx_regex(ctx):
okmsg="Done",
cxxflags=['-std=c++11'],
fragment=REGEX_CPP_TEST,
mandatory=False,
)

if have_regex.strip() == "1":
if have_regex and have_regex.strip() == "1":
ctx.define("HAVE_REGEX", 1, comment="C++11 <regex> is supported")
else:
ctx.check_cxx(
Expand Down

0 comments on commit 56c9fa1

Please sign in to comment.