From e4374c59881032ef644fbb2fd54a554dc4d914b1 Mon Sep 17 00:00:00 2001 From: Spacelord Date: Tue, 31 Dec 2019 00:35:02 +0100 Subject: Automated travis deployment --- .travis-ci.sh | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to '.travis-ci.sh') diff --git a/.travis-ci.sh b/.travis-ci.sh index da36c17..593b254 100644 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -76,9 +76,40 @@ elif [[ $TASK = 'windows' ]]; then travis_fold start "make_windows" make windows; travis_fold end "make_windows" + + if [ "$(git describe)" == "$(git describe --abbrev=0)" ]; then + mkdir ./deployment + mkdir ./deployment/backends + mkdir ./deployment/docs + cp ./midimonster.exe ./deployment/ + cp ./backends/*.dll ./deployment/backends/ + cp ./monster.cfg ./deployment/monster.cfg + cp ./backends/*.md ./deployment/docs/ + cp -r ./configs ./deployment/ + cd ./deployment + zip -r "./midimonster-$(git describe)-windows.zip" "./" + rm -v !("*.zip") + fi + + else # Otherwise compile as normal travis_fold start "make" make full; + +if [ "$(git describe)" == "$(git describe --abbrev=0)" ]; then + mkdir ./deployment + mkdir ./deployment/backends + mkdir ./deployment/docs + cp ./midimonster ./deployment/ + cp ./backends/*.so ./deployment/backends/ + cp ./monster.cfg ./deployment/monster.cfg + cp ./backends/*.md ./deployment/docs/ + cp -r ./configs ./deployment/ + cd ./deployment + tar czf "midimonster-$(git describe)-linux64.tgz" * + rm -v !("*.tgz") + fi + travis_fold end "make" -fi +fi \ No newline at end of file -- cgit v1.2.3 From 54685b03160279242c51288a306f332c07c82625 Mon Sep 17 00:00:00 2001 From: Spacelord Date: Tue, 31 Dec 2019 00:55:00 +0100 Subject: Diversify automated deploy per host OS --- .travis-ci.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.travis-ci.sh') diff --git a/.travis-ci.sh b/.travis-ci.sh index 593b254..a50398b 100644 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -88,7 +88,7 @@ elif [[ $TASK = 'windows' ]]; then cp -r ./configs ./deployment/ cd ./deployment zip -r "./midimonster-$(git describe)-windows.zip" "./" - rm -v !("*.zip") + rm -v !(*.zip) fi @@ -107,7 +107,7 @@ if [ "$(git describe)" == "$(git describe --abbrev=0)" ]; then cp ./backends/*.md ./deployment/docs/ cp -r ./configs ./deployment/ cd ./deployment - tar czf "midimonster-$(git describe)-linux64.tgz" * + tar czf "midimonster-$(git describe)-$TRAVIS_OS_NAME.tgz" * rm -v !("*.tgz") fi -- cgit v1.2.3 From 7d18bbb88b79c23c7e920eaecac75df77c38a02a Mon Sep 17 00:00:00 2001 From: cbdev Date: Tue, 31 Dec 2019 01:27:01 +0100 Subject: Fix deployment directory cleanup --- .travis-ci.sh | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) (limited to '.travis-ci.sh') diff --git a/.travis-ci.sh b/.travis-ci.sh index a50398b..1475dea 100644 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -76,7 +76,7 @@ elif [[ $TASK = 'windows' ]]; then travis_fold start "make_windows" make windows; travis_fold end "make_windows" - + travis_fold start "deploy_windows" if [ "$(git describe)" == "$(git describe --abbrev=0)" ]; then mkdir ./deployment mkdir ./deployment/backends @@ -88,28 +88,27 @@ elif [[ $TASK = 'windows' ]]; then cp -r ./configs ./deployment/ cd ./deployment zip -r "./midimonster-$(git describe)-windows.zip" "./" - rm -v !(*.zip) + find . ! -iname '*.zip' -delete fi - - + travis_fold end "deploy_windows" else # Otherwise compile as normal travis_fold start "make" make full; - -if [ "$(git describe)" == "$(git describe --abbrev=0)" ]; then - mkdir ./deployment - mkdir ./deployment/backends - mkdir ./deployment/docs - cp ./midimonster ./deployment/ - cp ./backends/*.so ./deployment/backends/ - cp ./monster.cfg ./deployment/monster.cfg - cp ./backends/*.md ./deployment/docs/ - cp -r ./configs ./deployment/ - cd ./deployment - tar czf "midimonster-$(git describe)-$TRAVIS_OS_NAME.tgz" * - rm -v !("*.tgz") - fi - travis_fold end "make" -fi \ No newline at end of file + travis_fold start "deploy_unix" + if [ "$(git describe)" == "$(git describe --abbrev=0)" ]; then + mkdir ./deployment + mkdir ./deployment/backends + mkdir ./deployment/docs + cp ./midimonster ./deployment/ + cp ./backends/*.so ./deployment/backends/ + cp ./monster.cfg ./deployment/monster.cfg + cp ./backends/*.md ./deployment/docs/ + cp -r ./configs ./deployment/ + cd ./deployment + tar czf "midimonster-$(git describe)-$TRAVIS_OS_NAME.tgz" * + find . ! -iname '*.tgz' -delete + fi + travis_fold end "deploy_unix" +fi -- cgit v1.2.3 From f8ed6c26683c041ec61dac46d740b4b87df811ad Mon Sep 17 00:00:00 2001 From: cbdev Date: Sat, 4 Jan 2020 18:58:19 +0100 Subject: Build the Lua backend on Windows using CI --- .travis-ci.sh | 1 + 1 file changed, 1 insertion(+) (limited to '.travis-ci.sh') diff --git a/.travis-ci.sh b/.travis-ci.sh index 1475dea..c278b33 100644 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -75,6 +75,7 @@ elif [[ $TASK = 'windows' ]]; then # Run sanitized compile travis_fold start "make_windows" make windows; + make -C backends lua.dll travis_fold end "make_windows" travis_fold start "deploy_windows" if [ "$(git describe)" == "$(git describe --abbrev=0)" ]; then -- cgit v1.2.3 From 2e689e8852dc985249b214a9db98c1221dfc689f Mon Sep 17 00:00:00 2001 From: cbdev Date: Wed, 4 Mar 2020 01:20:39 +0100 Subject: Clean up & retab CI script, fix typo --- .travis-ci.sh | 182 +++++++++++++++++++++++++++------------------------------- 1 file changed, 85 insertions(+), 97 deletions(-) (limited to '.travis-ci.sh') diff --git a/.travis-ci.sh b/.travis-ci.sh index c278b33..8008026 100644 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -5,111 +5,99 @@ set -e -COVERITY_SCAN_BUILD_URL="https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh" - SPELLINGBLACKLIST=$(cat <<-BLACKLIST - -wholename "./.git/*" +-wholename "./.git/*" BLACKLIST ) if [[ $TASK = 'spellintian' ]]; then - # run spellintian only if it is the requested task, ignoring duplicate words - spellingfiles=$(eval "find ./ -type f -and ! \( \ - $SPELLINGBLACKLIST \ - \) | xargs") - # count the number of spellintian errors, ignoring duplicate words - spellingerrors=$(zrun spellintian $spellingfiles 2>&1 | grep -v "\(duplicate word\)" | wc -l) - if [[ $spellingerrors -ne 0 ]]; then - # print the output for info - zrun spellintian $spellingfiles | grep -v "\(duplicate word\)" - echo "Found $spellingerrors spelling errors via spellintian, ignoring duplicates" - exit 1; - else - echo "Found $spellingerrors spelling errors via spellintian, ignoring duplicates" - fi; + # run spellintian only if it is the requested task, ignoring duplicate words + spellingfiles=$(eval "find ./ -type f -and ! \( \ + $SPELLINGBLACKLIST \ + \) | xargs") + # count the number of spellintian errors, ignoring duplicate words + spellingerrors=$(zrun spellintian $spellingfiles 2>&1 | grep -v "\(duplicate word\)" | wc -l) + if [[ $spellingerrors -ne 0 ]]; then + # print the output for info + zrun spellintian $spellingfiles | grep -v "\(duplicate word\)" + echo "Found $spellingerrors spelling errors via spellintian, ignoring duplicates" + exit 1; + else + echo "Found $spellingerrors spelling errors via spellintian, ignoring duplicates" + fi; elif [[ $TASK = 'spellintian-duplicates' ]]; then - # run spellintian only if it is the requested task - spellingfiles=$(eval "find ./ -type f -and ! \( \ - $SPELLINGBLACKLIST \ - \) | xargs") - # count the number of spellintian errors - spellingerrors=$(zrun spellintian $spellingfiles 2>&1 | wc -l) - if [[ $spellingerrors -ne 0 ]]; then - # print the output for info - zrun spellintian $spellingfiles - echo "Found $spellingerrors spelling errors via spellintian" - exit 1; - else - echo "Found $spellingerrors spelling errors via spellintian" - fi; + # run spellintian only if it is the requested task + spellingfiles=$(eval "find ./ -type f -and ! \( \ + $SPELLINGBLACKLIST \ + \) | xargs") + # count the number of spellintian errors + spellingerrors=$(zrun spellintian $spellingfiles 2>&1 | wc -l) + if [[ $spellingerrors -ne 0 ]]; then + # print the output for info + zrun spellintian $spellingfiles + echo "Found $spellingerrors spelling errors via spellintian" + exit 1; + else + echo "Found $spellingerrors spelling errors via spellintian" + fi; elif [[ $TASK = 'codespell' ]]; then - # run codespell only if it is the requested task - spellingfiles=$(eval "find ./ -type f -and ! \( \ - $SPELLINGBLACKLIST \ - \) | xargs") - # count the number of codespell errors - spellingerrors=$(zrun codespell --check-filenames --check-hidden --quiet 2 --regex "[a-zA-Z0-9][\\-'a-zA-Z0-9]+[a-zA-Z0-9]" $spellingfiles 2>&1 | wc -l) - if [[ $spellingerrors -ne 0 ]]; then - # print the output for info - zrun codespell --check-filenames --check-hidden --quiet 2 --regex "[a-zA-Z0-9][\\-'a-zA-Z0-9]+[a-zA-Z0-9]" $spellingfiles - echo "Found $spellingerrors spelling errors via codespell" - exit 1; - else - echo "Found $spellingerrors spelling errors via codespell" - fi; -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_ - # variables set in .travis.yml - if [[ ${#COVERITY_SCAN_TOKEN} -ne 0 ]]; then - curl -s $COVERITY_SCAN_BUILD_URL | bash - else - echo "Skipping Coverity Scan as no token found, probably a Pull Request" - fi; + # run codespell only if it is the requested task + spellingfiles=$(eval "find ./ -type f -and ! \( \ + $SPELLINGBLACKLIST \ + \) | xargs") + # count the number of codespell errors + spellingerrors=$(zrun codespell --check-filenames --check-hidden --quiet 2 --regex "[a-zA-Z0-9][\\-'a-zA-Z0-9]+[a-zA-Z0-9]" $spellingfiles 2>&1 | wc -l) + if [[ $spellingerrors -ne 0 ]]; then + # print the output for info + zrun codespell --check-filenames --check-hidden --quiet 2 --regex "[a-zA-Z0-9][\\-'a-zA-Z0-9]+[a-zA-Z0-9]" $spellingfiles + echo "Found $spellingerrors spelling errors via codespell" + exit 1; + else + echo "Found $spellingerrors spelling errors via codespell" + fi; elif [[ $TASK = 'sanitize' ]]; then - # Run sanitized compile - travis_fold start "make_sanitize" - make sanitize; - travis_fold end "make_sanitize" + # Run sanitized compile + travis_fold start "make_sanitize" + make sanitize; + travis_fold end "make_sanitize" elif [[ $TASK = 'windows' ]]; then - # Run sanitized compile - travis_fold start "make_windows" - make windows; - make -C backends lua.dll - travis_fold end "make_windows" - travis_fold start "deploy_windows" - if [ "$(git describe)" == "$(git describe --abbrev=0)" ]; then - mkdir ./deployment - mkdir ./deployment/backends - mkdir ./deployment/docs - cp ./midimonster.exe ./deployment/ - cp ./backends/*.dll ./deployment/backends/ - cp ./monster.cfg ./deployment/monster.cfg - cp ./backends/*.md ./deployment/docs/ - cp -r ./configs ./deployment/ - cd ./deployment - zip -r "./midimonster-$(git describe)-windows.zip" "./" - find . ! -iname '*.zip' -delete - fi - travis_fold end "deploy_windows" + travis_fold start "make_windows" + make windows; + make -C backends lua.dll + travis_fold end "make_windows" + if [ "$(git describe)" == "$(git describe --abbrev=0)" ]; then + travis_fold start "deploy_windows" + mkdir ./deployment + mkdir ./deployment/backends + mkdir ./deployment/docs + cp ./midimonster.exe ./deployment/ + cp ./backends/*.dll ./deployment/backends/ + cp ./monster.cfg ./deployment/monster.cfg + cp ./backends/*.md ./deployment/docs/ + cp -r ./configs ./deployment/ + cd ./deployment + zip -r "./midimonster-$(git describe)-windows.zip" "./" + find . ! -iname '*.zip' -delete + travis_fold end "deploy_windows" + fi else - # Otherwise compile as normal - travis_fold start "make" - make full; - travis_fold end "make" - travis_fold start "deploy_unix" - if [ "$(git describe)" == "$(git describe --abbrev=0)" ]; then - mkdir ./deployment - mkdir ./deployment/backends - mkdir ./deployment/docs - cp ./midimonster ./deployment/ - cp ./backends/*.so ./deployment/backends/ - cp ./monster.cfg ./deployment/monster.cfg - cp ./backends/*.md ./deployment/docs/ - cp -r ./configs ./deployment/ - cd ./deployment - tar czf "midimonster-$(git describe)-$TRAVIS_OS_NAME.tgz" * - find . ! -iname '*.tgz' -delete - fi - travis_fold end "deploy_unix" + # Otherwise compile as normal + travis_fold start "make" + make full; + travis_fold end "make" + if [ "$(git describe)" == "$(git describe --abbrev=0)" ]; then + travis_fold start "deploy_unix" + mkdir ./deployment + mkdir ./deployment/backends + mkdir ./deployment/docs + cp ./midimonster ./deployment/ + cp ./backends/*.so ./deployment/backends/ + cp ./monster.cfg ./deployment/monster.cfg + cp ./backends/*.md ./deployment/docs/ + cp -r ./configs ./deployment/ + cd ./deployment + tar czf "midimonster-$(git describe)-$TRAVIS_OS_NAME.tgz" * + find . ! -iname '*.tgz' -delete + travis_fold end "deploy_unix" + fi fi -- cgit v1.2.3 From 20803bd7d7578706ad55b56cf1a4d8865b5c1285 Mon Sep 17 00:00:00 2001 From: cbdev Date: Wed, 11 Mar 2020 20:44:24 +0100 Subject: Restructure CI spellchecking --- .travis-ci.sh | 80 +++++++++++++++++++++-------------------------------------- 1 file changed, 28 insertions(+), 52 deletions(-) (limited to '.travis-ci.sh') diff --git a/.travis-ci.sh b/.travis-ci.sh index 8008026..e9e3df3 100644 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -1,66 +1,42 @@ #!/bin/bash -# This script is triggered from the script section of .travis.yml -# It runs the appropriate commands depending on the task requested. +if [ "$TASK" = "spellcheck" ]; then + result=0 + # Create list of files to be spellchecked + spellcheck_files=$(find -type f | grep -v ".git/") -set -e + # Run spellintian to find spelling errors + sl_results=$(spellintian $spellcheck_files 2>&1) -SPELLINGBLACKLIST=$(cat <<-BLACKLIST --wholename "./.git/*" -BLACKLIST -) + sl_errors=$(wc -l <<< "$sl_results") + sl_errors_dups=$((grep "\(duplicate word\)" | wc -l) <<< "$sl_results") + sl_errors_nodups=$((grep -v "\(duplicate word\)" | wc -l) <<< "$sl_results") -if [[ $TASK = 'spellintian' ]]; then - # run spellintian only if it is the requested task, ignoring duplicate words - spellingfiles=$(eval "find ./ -type f -and ! \( \ - $SPELLINGBLACKLIST \ - \) | xargs") - # count the number of spellintian errors, ignoring duplicate words - spellingerrors=$(zrun spellintian $spellingfiles 2>&1 | grep -v "\(duplicate word\)" | wc -l) - if [[ $spellingerrors -ne 0 ]]; then - # print the output for info - zrun spellintian $spellingfiles | grep -v "\(duplicate word\)" - echo "Found $spellingerrors spelling errors via spellintian, ignoring duplicates" - exit 1; + if [ "$sl_errors" -ne 0 ]; then + printf "Spellintian found %s errors (%s spelling, %s duplicate words):\n\n" "$sl_errors" "$sl_errors_nodups" "$sl_errors_dups" + printf "%s\n\n" "$sl_results" + result=1 else - echo "Found $spellingerrors spelling errors via spellintian, ignoring duplicates" - fi; -elif [[ $TASK = 'spellintian-duplicates' ]]; then - # run spellintian only if it is the requested task - spellingfiles=$(eval "find ./ -type f -and ! \( \ - $SPELLINGBLACKLIST \ - \) | xargs") - # count the number of spellintian errors - spellingerrors=$(zrun spellintian $spellingfiles 2>&1 | wc -l) - if [[ $spellingerrors -ne 0 ]]; then - # print the output for info - zrun spellintian $spellingfiles - echo "Found $spellingerrors spelling errors via spellintian" - exit 1; - else - echo "Found $spellingerrors spelling errors via spellintian" - fi; -elif [[ $TASK = 'codespell' ]]; then - # run codespell only if it is the requested task - spellingfiles=$(eval "find ./ -type f -and ! \( \ - $SPELLINGBLACKLIST \ - \) | xargs") - # count the number of codespell errors - spellingerrors=$(zrun codespell --check-filenames --check-hidden --quiet 2 --regex "[a-zA-Z0-9][\\-'a-zA-Z0-9]+[a-zA-Z0-9]" $spellingfiles 2>&1 | wc -l) - if [[ $spellingerrors -ne 0 ]]; then - # print the output for info - zrun codespell --check-filenames --check-hidden --quiet 2 --regex "[a-zA-Z0-9][\\-'a-zA-Z0-9]+[a-zA-Z0-9]" $spellingfiles - echo "Found $spellingerrors spelling errors via codespell" - exit 1; + printf "Spellintian reports no errors\n" + fi + + # Run codespell to find some more + cs_results=$(codespell --check-filenames --check-hidden --quiet 2 --regex "[a-zA-Z0-9][\\-'a-zA-Z0-9]+[a-zA-Z0-9]" $spellcheck_files 2>&1) + cs_errors=$(wc -l <<< "$cs_results") + if [ "$cs_errors" -ne 0 ]; then + printf "Codespell found %s errors:\n\n" "$cs_errors" + printf "%s\n\n" "$cs_results" + result=1 else - echo "Found $spellingerrors spelling errors via codespell" - fi; -elif [[ $TASK = 'sanitize' ]]; then + printf "Codespell reports no errors\n" + fi + exit "$result" +elif [ "$TASK" = 'sanitize' ]; then # Run sanitized compile travis_fold start "make_sanitize" make sanitize; travis_fold end "make_sanitize" -elif [[ $TASK = 'windows' ]]; then +elif [ "$TASK" = 'windows' ]; then travis_fold start "make_windows" make windows; make -C backends lua.dll -- cgit v1.2.3 From abb1ffd367f4046d77ac62b0b017b407997bc43b Mon Sep 17 00:00:00 2001 From: cbdev Date: Wed, 11 Mar 2020 21:53:14 +0100 Subject: Add codesmell statistics to CI --- .travis-ci.sh | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) (limited to '.travis-ci.sh') diff --git a/.travis-ci.sh b/.travis-ci.sh index e9e3df3..763e558 100644 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -21,7 +21,7 @@ if [ "$TASK" = "spellcheck" ]; then fi # Run codespell to find some more - cs_results=$(codespell --check-filenames --check-hidden --quiet 2 --regex "[a-zA-Z0-9][\\-'a-zA-Z0-9]+[a-zA-Z0-9]" $spellcheck_files 2>&1) + cs_results=$(codespell --check-hidden --quiet 2 --regex "[a-zA-Z0-9][\\-'a-zA-Z0-9]+[a-zA-Z0-9]" $spellcheck_files 2>&1) cs_errors=$(wc -l <<< "$cs_results") if [ "$cs_errors" -ne 0 ]; then printf "Codespell found %s errors:\n\n" "$cs_errors" @@ -31,12 +31,40 @@ if [ "$TASK" = "spellcheck" ]; then printf "Codespell reports no errors\n" fi exit "$result" -elif [ "$TASK" = 'sanitize' ]; then +elif [ "$TASK" = "codesmell" ]; then + result=0 + + if [ -z "$(which lizard)" ]; then + printf "Installing lizard...\n" + pip3 install lizard + fi + + # Run shellcheck for all shell scripts + printf "Running shellcheck...\n" + shell_files="$(find . -type f -iname \*.sh)" + xargs shellcheck -Cnever -s bash <<< "$shell_files" + if [ "$?" -ne "0" ]; then + result=1 + fi + + # Run cloc for some stats + printf "Code statistics:\n\n" + cloc ./ + + # Run lizard for the project + printf "Running lizard for code complexity analysis\n" + lizard ./ + if [ "$?" -ne "0" ]; then + result=1 + fi + + exit "$result" +elif [ "$TASK" = "sanitize" ]; then # Run sanitized compile travis_fold start "make_sanitize" make sanitize; travis_fold end "make_sanitize" -elif [ "$TASK" = 'windows' ]; then +elif [ "$TASK" = "windows" ]; then travis_fold start "make_windows" make windows; make -C backends lua.dll -- cgit v1.2.3 From 9ec65119e11941d81a641f6387cdb542b4e8070e Mon Sep 17 00:00:00 2001 From: cbdev Date: Wed, 11 Mar 2020 22:23:55 +0100 Subject: Refactor installer --- .travis-ci.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.travis-ci.sh') diff --git a/.travis-ci.sh b/.travis-ci.sh index 763e558..3b7d7f5 100644 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -3,10 +3,10 @@ if [ "$TASK" = "spellcheck" ]; then result=0 # Create list of files to be spellchecked - spellcheck_files=$(find -type f | grep -v ".git/") + spellcheck_files=$(find . -type f | grep -v ".git/") # Run spellintian to find spelling errors - sl_results=$(spellintian $spellcheck_files 2>&1) + sl_results=$(xargs spellintian 2>&1 <<< "$spellcheck_files") sl_errors=$(wc -l <<< "$sl_results") sl_errors_dups=$((grep "\(duplicate word\)" | wc -l) <<< "$sl_results") @@ -21,7 +21,7 @@ if [ "$TASK" = "spellcheck" ]; then fi # Run codespell to find some more - cs_results=$(codespell --check-hidden --quiet 2 --regex "[a-zA-Z0-9][\\-'a-zA-Z0-9]+[a-zA-Z0-9]" $spellcheck_files 2>&1) + cs_results=$(xargs codespell --quiet 2 --regex "[a-zA-Z0-9][\\-'a-zA-Z0-9]+[a-zA-Z0-9]" <<< "$spellcheck_files" 2>&1) cs_errors=$(wc -l <<< "$cs_results") if [ "$cs_errors" -ne 0 ]; then printf "Codespell found %s errors:\n\n" "$cs_errors" @@ -100,7 +100,7 @@ else cp ./backends/*.md ./deployment/docs/ cp -r ./configs ./deployment/ cd ./deployment - tar czf "midimonster-$(git describe)-$TRAVIS_OS_NAME.tgz" * + tar czf "midimonster-$(git describe)-$TRAVIS_OS_NAME.tgz" ./ find . ! -iname '*.tgz' -delete travis_fold end "deploy_unix" fi -- cgit v1.2.3 From 6da00154f7745a4705047fc73ce42b7036b0bbdc Mon Sep 17 00:00:00 2001 From: cbdev Date: Sun, 15 Mar 2020 12:19:50 +0100 Subject: Fix build and CI exits --- .travis-ci.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to '.travis-ci.sh') diff --git a/.travis-ci.sh b/.travis-ci.sh index 3b7d7f5..c832f2c 100644 --- a/.travis-ci.sh +++ b/.travis-ci.sh @@ -21,7 +21,7 @@ if [ "$TASK" = "spellcheck" ]; then fi # Run codespell to find some more - cs_results=$(xargs codespell --quiet 2 --regex "[a-zA-Z0-9][\\-'a-zA-Z0-9]+[a-zA-Z0-9]" <<< "$spellcheck_files" 2>&1) + cs_results=$(xargs codespell --quiet 2 <<< "$spellcheck_files" 2>&1) cs_errors=$(wc -l <<< "$cs_results") if [ "$cs_errors" -ne 0 ]; then printf "Codespell found %s errors:\n\n" "$cs_errors" @@ -62,11 +62,15 @@ elif [ "$TASK" = "codesmell" ]; then elif [ "$TASK" = "sanitize" ]; then # Run sanitized compile travis_fold start "make_sanitize" - make sanitize; + if make sanitize; then + exit "$?" + fi travis_fold end "make_sanitize" elif [ "$TASK" = "windows" ]; then travis_fold start "make_windows" - make windows; + if make windows; then + exit "$?" + fi make -C backends lua.dll travis_fold end "make_windows" if [ "$(git describe)" == "$(git describe --abbrev=0)" ]; then @@ -87,7 +91,9 @@ elif [ "$TASK" = "windows" ]; then else # Otherwise compile as normal travis_fold start "make" - make full; + if make full; then + exit "$?" + fi travis_fold end "make" if [ "$(git describe)" == "$(git describe --abbrev=0)" ]; then travis_fold start "deploy_unix" -- cgit v1.2.3