From 8724a70c4c4329f09b9cf6dbda4dbefaaf3a3ee9 Mon Sep 17 00:00:00 2001 From: Zach White Date: Mon, 30 Nov 2020 11:19:44 -0800 Subject: [PATCH] Reduce travis load by replacing an exclusive grep with an inclusive grep (#10964) * add -n to avoid compiling * switch to an include rather than exclude strategy --- lib/python/qmk/tests/test_cli_commands.py | 2 +- util/travis_build.sh | 2 -- util/travis_test.sh | 2 -- util/travis_utils.sh | 1 + 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index dd0c572a7d..99ec596083 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -34,7 +34,7 @@ def test_compile(): def test_compile_json(): - result = check_subcommand('compile', '-kb', 'handwired/onekey/pytest', '-km', 'default_json') + result = check_subcommand('compile', '-kb', 'handwired/onekey/pytest', '-km', 'default_json', '-n') check_returncode(result) diff --git a/util/travis_build.sh b/util/travis_build.sh index 6d5dbed684..e7bbe36a7b 100755 --- a/util/travis_build.sh +++ b/util/travis_build.sh @@ -2,8 +2,6 @@ source util/travis_utils.sh -NUM_CORE_CHANGES=$(echo "$QMK_CHANGES" | grep -Ecv -e '^(docs/)' -e '^(keyboards/)' -e '^(layouts/)' -e '^(util/)' -e '^(lib/python/)' -e '^(bin/qmk)' -e '^(requirements.txt)' -e '(.travis.yml)') - if [[ "$TRAVIS_COMMIT_MESSAGE" == *"[skip build]"* ]]; then echo "Skipping due to commit message" exit 0 diff --git a/util/travis_test.sh b/util/travis_test.sh index c6fc0f9034..be0cfce001 100644 --- a/util/travis_test.sh +++ b/util/travis_test.sh @@ -2,8 +2,6 @@ source util/travis_utils.sh -NUM_CORE_CHANGES=$(echo "$QMK_CHANGES" | grep -Ecv -e '^(docs/)' -e '^(keyboards/)' -e '^(layouts/)' -e '^(util/)' -e '^(lib/python/)' -e '^(bin/qmk)' -e '^(requirements.txt)' -e '(.travis.yml)') - if [[ "$TRAVIS_COMMIT_MESSAGE" == *"[skip test]"* ]]; then echo "Skipping due to commit message" exit 0 diff --git a/util/travis_utils.sh b/util/travis_utils.sh index e3d806dfba..e949946e22 100755 --- a/util/travis_utils.sh +++ b/util/travis_utils.sh @@ -12,6 +12,7 @@ TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" # Extra variables LOCAL_BRANCH=$(git rev-parse --abbrev-ref HEAD) QMK_CHANGES=$(git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE}) +NUM_CORE_CHANGES=$(echo "$QMK_CHANGES" | grep -Ec -e '^Makefile' -e '^[^/]*.mk' -e '^drivers/' -e '^lib/atsam' -e '^lib/lib8tion/' -e '^platforms' -e '^quantum' -e '^tests' -e '^tmk_core') # if docker is installed - patch calls to within the qmk docker image if command -v docker >/dev/null; then