From 5aecf6617ccbffaf64b5973beee9614cc6e31ea5 Mon Sep 17 00:00:00 2001 From: data-man Date: Sat, 30 Dec 2017 15:55:55 +0300 Subject: [PATCH 01/10] Dont't run tests if only docs were updated --- .travis.yml | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6b8cdbe03bdb8..72717dc55554f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,6 +24,14 @@ before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sfml; fi before_script: + - | + if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then + TRAVIS_COMMIT_RANGE="FETCH_HEAD...$TRAVIS_BRANCH" + fi + git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)|(\.txt$)(\.rst)|(^(doc|icons|web|))/' || { + echo "Only the docs were updated, the tests will not run." + export SKIPTESTS="true" + } - set -e - git clone --depth 1 https://github.com/nim-lang/csources.git - cd csources @@ -35,18 +43,21 @@ script: - nim c koch - ./koch boot - ./koch boot -d:release - - ./koch nimble - - nim e tests/test_nimscript.nims - - nimble install zip -y - - nimble install opengl - - nimble install sdl1 - - nimble install jester@#head - - nimble install niminst - - nim c --taintMode:on -d:nimCoroutines tests/testament/tester - - tests/testament/tester --pedantic all -d:nimCoroutines + - | + if [ "$SKIPTESTS" != "true" ]; then + ./koch nimble + nim e tests/test_nimscript.nims + nimble install zip -y + nimble install opengl + nimble install sdl1 + nimble install jester@#head + nimble install niminst + nim c --taintMode:on -d:nimCoroutines tests/testament/tester + tests/testament/tester --pedantic all -d:nimCoroutines + ./koch csource + ./koch nimsuggest + fi - ./koch web - - ./koch csource - - ./koch nimsuggest # - nim c -r nimsuggest/tester - ( ! grep -F '.. code-block' -l -r --include '*.html' --exclude contributing.html --exclude docgen.html --exclude tut2.html ) - ( ! grep -F '..code-block' -l -r --include '*.html' --exclude contributing.html --exclude docgen.html --exclude tut2.html ) From 6260c2c7e204a28bbaf149645cfa1990f8063019 Mon Sep 17 00:00:00 2001 From: data-man Date: Mon, 1 Jan 2018 23:37:37 +0300 Subject: [PATCH 02/10] Trying adding AppVeyor --- appveyor.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index be2cc50d3789f..2efe9ebeb027a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -40,22 +40,28 @@ install: - cd csources - IF "%PLATFORM%" == "x64" ( build64.bat ) else ( build.bat ) - cd .. + - set COMMIT_RANGE="FETCH_HEAD...%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%" + - echo %COMMIT_RANGE% build_script: - bin\nim c koch - koch boot -d:release - - koch nimble - - nim e tests/test_nimscript.nims - - nimble install zip -y - - nimble install opengl - - nimble install sdl1 - - nimble install jester@#head - - nimble install niminst - - nim c --taintMode:on -d:nimCoroutines tests/testament/tester +# - koch nimble +# - nim e tests/test_nimscript.nims +# - nimble install zip -y +# - nimble install opengl +# - nimble install sdl1 +# - nimble install jester@#head +# - nimble install niminst +# - nim c --taintMode:on -d:nimCoroutines tests/testament/tester test_script: - - tests\testament\tester --pedantic all -d:nimCoroutines +# - tests\testament\tester --pedantic all -d:nimCoroutines # - koch csource # - koch zip + - ./koch web +# - nim c -r nimsuggest/tester + - ( ! grep -F '.. code-block' -l -r --include '*.html' --exclude contributing.html --exclude docgen.html --exclude tut2.html ) + - ( ! grep -F '..code-block' -l -r --include '*.html' --exclude contributing.html --exclude docgen.html --exclude tut2.html ) deploy: off From 87b2299aa699deb172c134553a70ba4e2cce2592 Mon Sep 17 00:00:00 2001 From: data-man Date: Mon, 1 Jan 2018 23:51:16 +0300 Subject: [PATCH 03/10] Remove ./ for to run koch --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 2efe9ebeb027a..82523de51a20d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -59,7 +59,7 @@ test_script: # - tests\testament\tester --pedantic all -d:nimCoroutines # - koch csource # - koch zip - - ./koch web + - koch web # - nim c -r nimsuggest/tester - ( ! grep -F '.. code-block' -l -r --include '*.html' --exclude contributing.html --exclude docgen.html --exclude tut2.html ) - ( ! grep -F '..code-block' -l -r --include '*.html' --exclude contributing.html --exclude docgen.html --exclude tut2.html ) From b5a4e30567e4166aa324233a4ea0ed5a12dc3e6b Mon Sep 17 00:00:00 2001 From: data-man Date: Tue, 2 Jan 2018 00:01:50 +0300 Subject: [PATCH 04/10] Add git diff redirect to grep --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 82523de51a20d..4b38f1e73895f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -42,6 +42,7 @@ install: - cd .. - set COMMIT_RANGE="FETCH_HEAD...%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%" - echo %COMMIT_RANGE% + - git diff --name-only %COMMIT_RANGE% | grep -vE '(\.md$)|(\.txt$)(\.rst)|(^(doc|icons|web|))/' build_script: - bin\nim c koch From d400c3d02f09f08d82948a230b5b42e6f676b560 Mon Sep 17 00:00:00 2001 From: data-man Date: Tue, 2 Jan 2018 00:10:58 +0300 Subject: [PATCH 05/10] Add just git diff output --- appveyor.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 4b38f1e73895f..572670abcbb50 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -42,7 +42,8 @@ install: - cd .. - set COMMIT_RANGE="FETCH_HEAD...%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%" - echo %COMMIT_RANGE% - - git diff --name-only %COMMIT_RANGE% | grep -vE '(\.md$)|(\.txt$)(\.rst)|(^(doc|icons|web|))/' + - git diff --name-only %COMMIT_RANGE% + - git diff --name-only %COMMIT_RANGE% | grep -vE "(\.md$)|(\.txt$)(\.rst)|(^(doc|icons|web|))/" build_script: - bin\nim c koch From 1dc33a898f2b8789e15c8241cec330776590907f Mon Sep 17 00:00:00 2001 From: data-man Date: Tue, 2 Jan 2018 00:20:09 +0300 Subject: [PATCH 06/10] Change env variable names for git diff --- appveyor.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 572670abcbb50..ff7ee7b31ad74 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -42,8 +42,9 @@ install: - cd .. - set COMMIT_RANGE="FETCH_HEAD...%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%" - echo %COMMIT_RANGE% - - git diff --name-only %COMMIT_RANGE% - - git diff --name-only %COMMIT_RANGE% | grep -vE "(\.md$)|(\.txt$)(\.rst)|(^(doc|icons|web|))/" +# - git diff --name-only %COMMIT_RANGE% + - git diff --name-only %APPVEYOR_PULL_REQUEST_HEAD_COMMIT% + - git diff --name-only %APPVEYOR_PULL_REQUEST_HEAD_COMMIT% | grep -vE "(\.md$)|(\.txt$)(\.rst)|(^(doc|icons|web|))/" build_script: - bin\nim c koch From aa778f2a4df2197693d456a46a4aa23b1a8c7b2e Mon Sep 17 00:00:00 2001 From: data-man Date: Tue, 2 Jan 2018 00:26:19 +0300 Subject: [PATCH 07/10] Change env variable names to %APPVEYOR_REPO_COMMIT% --- appveyor.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index ff7ee7b31ad74..38e708fe53ff8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -42,9 +42,10 @@ install: - cd .. - set COMMIT_RANGE="FETCH_HEAD...%APPVEYOR_PULL_REQUEST_HEAD_COMMIT%" - echo %COMMIT_RANGE% + - echo %APPVEYOR_REPO_COMMIT% # - git diff --name-only %COMMIT_RANGE% - - git diff --name-only %APPVEYOR_PULL_REQUEST_HEAD_COMMIT% - - git diff --name-only %APPVEYOR_PULL_REQUEST_HEAD_COMMIT% | grep -vE "(\.md$)|(\.txt$)(\.rst)|(^(doc|icons|web|))/" + - git diff --name-only %APPVEYOR_REPO_COMMIT% + - git diff --name-only %APPVEYOR_REPO_COMMIT% | grep -vE "(\.md$)|(\.txt$)(\.rst)|(^(doc|icons|web|))/" build_script: - bin\nim c koch From d65f1f3f7cb331d4c0cb74126babad5a7d3f7d7f Mon Sep 17 00:00:00 2001 From: data-man Date: Tue, 2 Jan 2018 00:36:36 +0300 Subject: [PATCH 08/10] For testing: add dir command --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 38e708fe53ff8..e9c3d9dd9d140 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,6 +37,7 @@ install: - IF "%PLATFORM%" == "x64" ( copy %CD%\DIST\sqlite3.dll %CD%\BIN\sqlite3_64.dll ) ELSE ( copy %CD%\DIST\sqlite3.dll %CD%\BIN\sqlite3_32.dll ) - IF "%PLATFORM%" == "x64" ( copy %CD%\DIST\PCRE\pcre.redist.8.33.0.1\build\native\bin\v100\x64\Release\dynamic\utf8\pcre8.dll %CD%\bin\pcre64.dll ) ELSE ( copy %CD%\DIST\PCRE\pcre.redist.8.33.0.1\build\native\bin\v100\Win32\Release\dynamic\utf8\pcre8.dll %CD%\bin\pcre32.dll ) - git clone --depth 1 https://github.com/nim-lang/csources + - dir - cd csources - IF "%PLATFORM%" == "x64" ( build64.bat ) else ( build.bat ) - cd .. @@ -44,6 +45,7 @@ install: - echo %COMMIT_RANGE% - echo %APPVEYOR_REPO_COMMIT% # - git diff --name-only %COMMIT_RANGE% + - dir - git diff --name-only %APPVEYOR_REPO_COMMIT% - git diff --name-only %APPVEYOR_REPO_COMMIT% | grep -vE "(\.md$)|(\.txt$)(\.rst)|(^(doc|icons|web|))/" From c6a067d566bc83940cf3160e8103561c6a903df0 Mon Sep 17 00:00:00 2001 From: data-man Date: Tue, 2 Jan 2018 00:46:19 +0300 Subject: [PATCH 09/10] Add git diff w/o commit hash --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index e9c3d9dd9d140..a6c44ff8e1f83 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -46,6 +46,7 @@ install: - echo %APPVEYOR_REPO_COMMIT% # - git diff --name-only %COMMIT_RANGE% - dir + - git diff --name-only - git diff --name-only %APPVEYOR_REPO_COMMIT% - git diff --name-only %APPVEYOR_REPO_COMMIT% | grep -vE "(\.md$)|(\.txt$)(\.rst)|(^(doc|icons|web|))/" From 41069cba902ae6d3c32a012f2c94e0465264c884 Mon Sep 17 00:00:00 2001 From: data-man Date: Tue, 2 Jan 2018 00:54:08 +0300 Subject: [PATCH 10/10] Keep only one git diff --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index a6c44ff8e1f83..a710f79577788 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -47,8 +47,8 @@ install: # - git diff --name-only %COMMIT_RANGE% - dir - git diff --name-only - - git diff --name-only %APPVEYOR_REPO_COMMIT% - - git diff --name-only %APPVEYOR_REPO_COMMIT% | grep -vE "(\.md$)|(\.txt$)(\.rst)|(^(doc|icons|web|))/" +# - git diff --name-only %APPVEYOR_REPO_COMMIT% +# - git diff --name-only %APPVEYOR_REPO_COMMIT% | grep -vE "(\.md$)|(\.txt$)(\.rst)|(^(doc|icons|web|))/" build_script: - bin\nim c koch