From e5d8fe5a49f1ba87e2dd1765384242ea42a0dac0 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Thu, 4 Oct 2018 03:31:38 +0100 Subject: [PATCH 1/3] Export the travis_fold function so we can add our own folds --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 3b2cf0aeeb..f6ca949534 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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" From 4cec0045ff9d8dbdba1cd6a1ca76d2aeb760566b Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Thu, 4 Oct 2018 03:38:55 +0100 Subject: [PATCH 2/3] Add some Travis folding --- .travis-ci.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.travis-ci.sh b/.travis-ci.sh index 7061f0de4a..5a83f504d0 100755 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -197,12 +197,22 @@ elif [[ $TASK = 'flake8' ]]; then else # Otherwise compile and check as normal export DISTCHECK_CONFIGURE_FLAGS='--enable-rdm-tests --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 From f33ca99824ffeae0297fe8d001d909a986298976 Mon Sep 17 00:00:00 2001 From: Peter Newman Date: Thu, 4 Oct 2018 04:13:44 +0100 Subject: [PATCH 3/3] Add more folding --- .travis-ci.sh | 66 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 58 insertions(+), 8 deletions(-) diff --git a/.travis-ci.sh b/.travis-ci.sh index 5a83f504d0..4e931bb3ca 100755 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -45,11 +45,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) @@ -80,22 +84,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") @@ -111,11 +127,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") @@ -131,11 +153,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") @@ -151,12 +179,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 @@ -169,11 +203,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_ @@ -185,14 +227,22 @@ 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 else # Otherwise compile and check as normal