zealot: use CI_BRANCH and set it in travis.
zealot.factor: Check against HEAD
.travis.yml: Travis seems to be terminating my command after the USING:.
[[
[0K$ ./factor -run=zealot.cli-changed-vocabs
io.pathnames
vocabs.loader
cli.git
modern
modern.out
modern.paths
modern.slices
sequences.extras
web-services.github
zealot.cli-changed-vocabs
zealot.factor
zealot
travis_time:end:
155cd3d8:start=
1530762416088842089,finish=
1530762475370504525,duration=
59281662436
[0K
[32;1mThe command "./factor -run=zealot.cli-changed-vocabs" exited with 0.[0m
travis_time:start:
2ac2d2d0
[0K$ {:"./factor -run=zealot.cli-changed-vocabs | while read line ; do ./factor -e=\"USING"=>"kernel tools.test vocabs.hierarchy ; \\\"$line\\\" [ load ] [ test ] bi\" ; done"}
/home/travis/.travis/job_stages: line 78: {:./factor -run=zealot.cli-changed-vocabs | while read line ; do ./factor -e="USING=: No such file or directory
travis_time:end:
2ac2d2d0:start=
1530762475377510994,finish=
1530762475383948090,duration=
6437096
[0K
[31;1mThe command "{:"./factor -run=zealot.cli-changed-vocabs | while read line ; do ./factor -e=\"USING"=>"kernel tools.test vocabs.hierarchy ; \\"$line\\" [ load ] [ test ] bi\" ; done"}" exited with 127.[0m
Done. Your build exited with 1.
]]
zealot: test on cli.
travis: Load zealot so we can use it quickly twice. Also fetch origin/master so we can ``git diff`` against it.
wget https://github.com/vmt/udis86/archive/v1.7.2.tar.gz && tar xzvf v1.7.2.tar.gz &&
( cd udis86-1.7.2/ && ./autogen.sh && ./configure --enable-shared=yes && make && sudo make install ) &&
( [[ "$TRAVIS_OS_NAME" != "osx" ]] && sudo ldconfig || true )
+ - git remote set-branches --add origin master
+ - git fetch # so we can see which vocabs changed versus origin/master...
script:
+ - echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, TRAVIS_PULL_REQUEST_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH"
+ - export CI_BRANCH="${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}"
+ - echo "CI_BRANCH=${CI_BRANCH}"
- DEBUG=1 ./build.sh net-bootstrap < /dev/null
- - ./factor -run=zealot.cli-changed-vocabs | while read line ; do ./factor -e="USING: kernel tools.test vocabs.hierarchy ; \"$line\" [ load ] [ test ] bi" ; done
+ - "./factor -e='USING: memory vocabs.hierarchy ; \"zealot\" load save'"
+ - ./factor -run=zealot.cli-changed-vocabs
+ - ./factor -run=zealot.cli-test-changed-vocabs
}
set_current_branch() {
- if [ -z ${TRAVIS_BRANCH} ]; then
- CURRENT_BRANCH=$(current_git_branch)
+ if [ -n "${CI_BRANCH}" ]; then
+ CURRENT_BRANCH="${CI_BRANCH}"
else
- CURRENT_BRANCH=${TRAVIS_BRANCH}
+ CURRENT_BRANCH=$(current_git_branch)
fi
}
?file-info dup [ directory? ] when ;
: git-current-branch* ( -- name )
- ! { "git" "rev-parse" "--abbrev-ref" "HEAD" }
- { "git" "name-rev" "--name-only" "HEAD" } git-command>string ;
+ { "git" "rev-parse" "--abbrev-ref" "HEAD" } git-command>string ;
: git-current-branch ( directory -- name )
[ git-current-branch* ] with-directory ;
--- /dev/null
+Doug Coleman
--- /dev/null
+! Copyright (C) 2018 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: kernel sequences tools.test vocabs zealot.factor ;
+IN: zealot.cli-test-changed-vocabs
+
+: zealot-test-changed-vocabs ( -- )
+ ci-vocabs-to-test [
+ [ require ] each
+ ] [
+ [ test ] each
+ ] bi ;
+
+MAIN: zealot-test-changed-vocabs
\ No newline at end of file
! Copyright (C) 2017 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays bootstrap.image calendar cli.git
-combinators concurrency.combinators formatting fry http.client
-io io.directories io.launcher io.pathnames kernel math.parser
-memory modern.paths namespaces parser.notes prettyprint
-sequences sequences.extras sets splitting system system-info
-threads tools.test tools.test.private vocabs vocabs.hierarchy
+USING: accessors arrays bootstrap.image bootstrap.image.upload
+calendar cli.git combinators concurrency.combinators environment
+formatting fry http.client io io.directories io.launcher
+io.pathnames kernel math.parser memory modern.paths namespaces
+parser.notes prettyprint sequences sequences.extras sets
+splitting system system-info threads tools.test
+tools.test.private vocabs vocabs.hierarchy
vocabs.hierarchy.private vocabs.loader vocabs.metadata zealot ;
IN: zealot.factor
[ path-separator split harvest "." join ] map members ;
: changed-factor-vocabs-from-master ( -- vocabs )
- "master" "origin/master" changed-factor-vocabs ;
+ "HEAD" "origin/master" changed-factor-vocabs ;
: reject-unloadable-vocabs ( vocabs -- vocabs' )
[ don't-load? ] reject ;