Skip to content

Commit

Permalink
[CI] revive stale nim-lang#6999 : Dont to run the tests if only the d…
Browse files Browse the repository at this point in the history
…ocs were updated; travis only for now
  • Loading branch information
timotheecour committed Aug 30, 2018
1 parent dfdf8e5 commit 419e8cd
Showing 1 changed file with 48 additions and 29 deletions.
77 changes: 48 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,54 @@ addons:
- libsfml-dev

before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install boehmgc; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install sfml; fi
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update
brew install boehmgc
brew install sfml
fi
before_script:
- set -e
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then unset -f cd; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then shell_session_update() { :; }; fi
- git clone --depth 1 https://github.com/nim-lang/csources.git
- cd csources
- sh build.sh
- cd ..
- export PATH=$(pwd)/bin${PATH:+:$PATH}
- |
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
TRAVIS_COMMIT_RANGE="FETCH_HEAD...$TRAVIS_BRANCH"
fi
export SKIPTESTS="false"
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
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
# see https://github.com/travis-ci/travis-ci/issues/8703#issuecomment-389117994
unset -f cd
shell_session_update() { :; };
fi
git clone --depth 1 https://github.com/nim-lang/csources.git
cd csources
sh build.sh
cd ..
export PATH=$(pwd)/bin${PATH:+:$PATH}
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 -y
- nimble install niminst
- nim c --taintMode:on -d:nimCoroutines tests/testament/tester
- tests/testament/tester --pedantic all -d:nimCoroutines
- nim c -o:bin/nimpretty nimpretty/nimpretty.nim
- nim c -r nimpretty/tester.nim
- ./koch web
- ./koch csource
- ./koch nimsuggest
- nim c -r nimsuggest/tester
- |
set -e
nim c koch
./koch boot
./koch boot -d:release
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 -y
nimble install niminst
nim c --taintMode:on -d:nimCoroutines tests/testament/tester
tests/testament/tester --pedantic all -d:nimCoroutines
nim c -o:bin/nimpretty nimpretty/nimpretty.nim
nim c -r nimpretty/tester.nim
./koch csource
./koch nimsuggest
fi
./koch web
nim c -r nimsuggest/tester

0 comments on commit 419e8cd

Please sign in to comment.