Permalink
Browse files

Merge branch '0.10' of https://github.com/OpenLightingProject/ola int…

…o master-resync
  • Loading branch information...
peternewman committed Oct 17, 2018
2 parents 5b1482d + 9aa9e9b commit da9d023619c4640c1c17925c8b8c4e413bb6f287
Showing with 94 additions and 12 deletions.
  1. +90 −12 .travis-ci.sh
  2. +4 −0 .travis.yml
@@ -48,11 +48,15 @@ BLACKLIST
if [[ $TASK = 'lint' ]]; then
# run the lint tool only if it is the requested task
travis_fold start "autoreconf"
autoreconf -i;
travis_fold end "autoreconf"
./configure --enable-rdm-tests --enable-ja-rule --enable-e133;
# the following is a bit of a hack to build the files normally built during
# the build, so they are present for linting to run against
make builtfiles
travis_fold start "make_builtfiles"
make builtfiles;
travis_fold end "make_builtfiles"
# first check we've not got any generic NOLINTs
# count the number of generic NOLINTs
nolints=$(grep -IR NOLINT * | grep -v "NOLINT(" | wc -l)
@@ -83,22 +87,34 @@ if [[ $TASK = 'lint' ]]; then
fi;
elif [[ $TASK = 'check-licences' ]]; then
# check licences only if it is the requested task
travis_fold start "autoreconf"
autoreconf -i;
travis_fold end "autoreconf"
travis_fold start "configure"
./configure --enable-rdm-tests --enable-ja-rule --enable-e133;
travis_fold end "configure"
# the following is a bit of a hack to build the files normally built during
# the build, so they are present for licence checking to run against
make builtfiles
travis_fold start "make_builtfiles"
make builtfiles;
travis_fold end "make_builtfiles"
./scripts/enforce_licence.py
if [[ $? -ne 0 ]]; then
exit 1;
fi;
elif [[ $TASK = 'spellintian' ]]; then
# run spellintian only if it is the requested task, ignoring duplicate words
travis_fold start "autoreconf"
autoreconf -i;
travis_fold end "autoreconf"
travis_fold start "configure"
./configure --enable-rdm-tests --enable-ja-rule --enable-e133;
travis_fold end "configure"
# the following is a bit of a hack to build the files normally built during
# the build, so they are present for spellintian to run against
make builtfiles
travis_fold start "make_builtfiles"
make builtfiles;
travis_fold end "make_builtfiles"
spellingfiles=$(eval "find ./ -type f -and ! \( \
$SPELLINGBLACKLIST \
\) | xargs")
@@ -114,11 +130,17 @@ elif [[ $TASK = 'spellintian' ]]; then
fi;
elif [[ $TASK = 'spellintian-duplicates' ]]; then
# run spellintian only if it is the requested task
travis_fold start "autoreconf"
autoreconf -i;
travis_fold end "autoreconf"
travis_fold start "configure"
./configure --enable-rdm-tests --enable-ja-rule --enable-e133;
travis_fold end "configure"
# the following is a bit of a hack to build the files normally built during
# the build, so they are present for spellintian to run against
make builtfiles
travis_fold start "make_builtfiles"
make builtfiles;
travis_fold end "make_builtfiles"
spellingfiles=$(eval "find ./ -type f -and ! \( \
$SPELLINGBLACKLIST \
\) | xargs")
@@ -134,11 +156,17 @@ elif [[ $TASK = 'spellintian-duplicates' ]]; then
fi;
elif [[ $TASK = 'codespell' ]]; then
# run codespell only if it is the requested task
travis_fold start "autoreconf"
autoreconf -i;
travis_fold end "autoreconf"
travis_fold start "configure"
./configure --enable-rdm-tests --enable-ja-rule --enable-e133;
travis_fold end "configure"
# the following is a bit of a hack to build the files normally built during
# the build, so they are present for codespell to run against
make builtfiles
travis_fold start "make_builtfiles"
make builtfiles;
travis_fold end "make_builtfiles"
spellingfiles=$(eval "find ./ -type f -and ! \( \
$SPELLINGBLACKLIST \
\) | xargs")
@@ -154,12 +182,18 @@ elif [[ $TASK = 'codespell' ]]; then
fi;
elif [[ $TASK = 'doxygen' ]]; then
# check doxygen only if it is the requested task
travis_fold start "autoreconf"
autoreconf -i;
travis_fold end "autoreconf"
# Doxygen is C++ only, so don't bother with RDM tests
travis_fold start "configure"
./configure --enable-ja-rule --enable-e133;
travis_fold end "configure"
# the following is a bit of a hack to build the files normally built during
# the build, so they are present for Doxygen to run against
make builtfiles
travis_fold start "make_builtfiles"
make builtfiles;
travis_fold end "make_builtfiles"
# count the number of warnings
warnings=$(make doxygen-doc 2>&1 >/dev/null | wc -l)
if [[ $warnings -ne 0 ]]; then
@@ -172,11 +206,19 @@ elif [[ $TASK = 'doxygen' ]]; then
fi;
elif [[ $TASK = 'coverage' ]]; then
# Compile with coverage for coveralls
travis_fold start "autoreconf"
autoreconf -i;
travis_fold end "autoreconf"
# Coverage is C++ only, so don't bother with RDM tests
travis_fold start "configure"
./configure --enable-gcov --enable-ja-rule --enable-e133;
travis_fold end "configure"
travis_fold start "make"
make;
travis_fold end "make"
travis_fold start "make_check"
make check;
travis_fold end "make_check"
elif [[ $TASK = 'coverity' ]]; then
# Run Coverity Scan unless token is zero length
# The Coverity Scan script also relies on a number of other COVERITY_SCAN_
@@ -188,36 +230,62 @@ elif [[ $TASK = 'coverity' ]]; then
fi;
elif [[ $TASK = 'jshint' ]]; then
cd ./javascript/new-src;
travis_fold start "npm_install"
npm install;
travis_fold end "npm_install"
grunt test
elif [[ $TASK = 'flake8' ]]; then
travis_fold start "autoreconf"
autoreconf -i;
./configure --enable-rdm-tests
travis_fold end "autoreconf"
travis_fold start "configure"
./configure --enable-rdm-tests;
travis_fold end "configure"
# the following is a bit of a hack to build the files normally built during
# the build, so they are present for flake8 to run against
make builtfiles
travis_fold start "make_builtfiles"
make builtfiles;
travis_fold end "make_builtfiles"
flake8 --max-line-length 80 --exclude *_pb2.py,.git,__pycache --ignore E111,E114,E121,E127,E129 data/rdm include/ola python scripts tools/ola_mon tools/rdm
elif [[ $TASK = 'pychecker' ]]; then
travis_fold start "autoreconf"
autoreconf -i;
./configure --enable-rdm-tests
travis_fold end "autoreconf"
travis_fold start "configure"
./configure --enable-rdm-tests;
travis_fold end "configure"
# the following is a bit of a hack to build the files normally built during
# the build, so they are present for pychecker to run against
make builtfiles
travis_fold start "make_builtfiles"
make builtfiles;
travis_fold end "make_builtfiles"
PYTHONPATH=./python/:$PYTHONPATH
export PYTHONPATH
mkdir ./python/ola/testing/
ln -s ./tools/rdm ./python/ola/testing/rdm
travis_fold start "pychecker_a"
pychecker --quiet --limit 500 --blacklist $PYCHECKER_BLACKLIST $(find ./ -name "*.py" -and \( -wholename "./data/*" -or -wholename "./include/*" -or -wholename "./scripts/*" -or -wholename "./python/examples/rdm_compare.py" -or -wholename "./python/ola/*" \) -and ! \( -name "*_pb2.py" -or -name "OlaClient.py" -or -name "ola_candidate_ports.py" -or -wholename "./scripts/enforce_licence.py" -or -wholename "./python/ola/rpc/*" -or -wholename "./python/ola/ClientWrapper.py" -or -wholename "./python/ola/PidStore.py" -or -wholename "./python/ola/RDMAPI.py" \) | xargs)
travis_fold end "pychecker_a"
# More restricted checking for files that import files that break pychecker
travis_fold start "pychecker_b"
pychecker --quiet --limit 500 --blacklist $PYCHECKER_BLACKLIST --only $(find ./ -name "*.py" -and \( -wholename "./tools/rdm/ModelCollector.py" -or -wholename "./tools/rdm/DMXSender.py" -or -wholename "./tools/rdm/TestCategory.py" -or -wholename "./tools/rdm/TestHelpers.py" -or -wholename "./tools/rdm/TestState.py" -or -wholename "./tools/rdm/TimingStats.py" -or -wholename "./tools/rdm/list_rdm_tests.py" \) | xargs)
travis_fold end "pychecker_b"
# Even more restricted checking for files that import files that break pychecker and have unused parameters
travis_fold start "pychecker_c"
pychecker --quiet --limit 500 --blacklist $PYCHECKER_BLACKLIST --only --no-argsused $(find ./ -name "*.py" -and ! \( -name "*_pb2.py" -or -name "OlaClient.py" -or -name "ola_candidate_ports.py" -or -name "ola_universe_info.py" -or -name "rdm_snapshot.py" -or -name "ClientWrapper.py" -or -name "PidStore.py" -or -name "enforce_licence.py" -or -name "ola_mon.py" -or -name "TestLogger.py" -or -name "TestRunner.py" -or -name "rdm_model_collector.py" -or -name "rdm_responder_test.py" -or -name "rdm_test_server.py" \) | xargs)
travis_fold end "pychecker_c"
elif [[ $TASK = 'pychecker-wip' ]]; then
travis_fold start "autoreconf"
autoreconf -i;
./configure --enable-rdm-tests
travis_fold end "autoreconf"
travis_fold start "configure"
./configure --enable-rdm-tests;
travis_fold end "configure"
# the following is a bit of a hack to build the files normally built during
# the build, so they are present for pychecker to run against
make builtfiles
travis_fold start "make_builtfiles"
make builtfiles;
travis_fold end "make_builtfiles"
PYTHONPATH=./python/:$PYTHONPATH
export PYTHONPATH
mkdir ./python/ola/testing/
@@ -226,12 +294,22 @@ elif [[ $TASK = 'pychecker-wip' ]]; then
else
# Otherwise compile and check as normal
export DISTCHECK_CONFIGURE_FLAGS='--enable-rdm-tests --enable-java-libs --enable-ja-rule --enable-e133'
travis_fold start "autoreconf"
autoreconf -i;
travis_fold end "autoreconf"
travis_fold start "configure"
./configure $DISTCHECK_CONFIGURE_FLAGS;
travis_fold end "configure"
travis_fold start "make_distcheck"
make distcheck;
travis_fold end "make_distcheck"
travis_fold start "make_dist"
make dist;
travis_fold end "make_dist"
travis_fold start "verify_trees"
tarball=$(ls -Ut ola*.tar.gz | head -1)
tar -zxf $tarball;
tarball_root=$(echo $tarball | sed 's/.tar.gz$//')
./scripts/verify_trees.py ./ $tarball_root
travis_fold end "verify_trees"
fi
@@ -3,6 +3,10 @@ language: cpp
sudo: required
# Use the latest Travis images since they are more up to date than the stable release.
group: edge
before_script:
- export -f travis_fold
script:
- "bash -ex .travis-ci.sh"

0 comments on commit da9d023

Please sign in to comment.