Merge branch 'master' of http://dharmatech.onigirihouse.com/factor
commit
e2f81bfd4b
|
@ -1,7 +1,8 @@
|
||||||
|
|
||||||
USING: kernel io io.files io.launcher tools.deploy.backend
|
USING: kernel io io.files io.launcher hashtables tools.deploy.backend
|
||||||
system namespaces sequences splitting math.parser
|
system continuations namespaces sequences splitting math.parser
|
||||||
unix prettyprint tools.time calendar bake vars ;
|
prettyprint tools.time calendar bake vars http.client
|
||||||
|
combinators ;
|
||||||
|
|
||||||
IN: builder
|
IN: builder
|
||||||
|
|
||||||
|
@ -19,96 +20,119 @@ IN: builder
|
||||||
|
|
||||||
SYMBOL: builder-recipients
|
SYMBOL: builder-recipients
|
||||||
|
|
||||||
: quote ( str -- str ) "'" swap "'" 3append ;
|
|
||||||
|
|
||||||
: email-file ( subject file -- )
|
: email-file ( subject file -- )
|
||||||
`{
|
`{
|
||||||
"cat" ,
|
{ +stdin+ , }
|
||||||
"| mutt -s" ,[ quote ]
|
{ +arguments+ { "mutt" "-s" , %[ builder-recipients get ] } }
|
||||||
"-x" %[ builder-recipients get ]
|
}
|
||||||
}
|
>hashtable run-process drop ;
|
||||||
" " join system drop ;
|
|
||||||
|
: email-string ( subject -- )
|
||||||
|
`{ "mutt" "-s" , %[ builder-recipients get ] }
|
||||||
|
<process-stream>
|
||||||
|
dup
|
||||||
|
dispose
|
||||||
|
process-stream-process wait-for-process drop ;
|
||||||
|
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
: target ( -- target ) `{ ,[ os ] %[ cpu "." split ] } "-" join ;
|
: target ( -- target ) `{ ,[ os ] %[ cpu "." split ] } "-" join ;
|
||||||
|
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
: factor-binary ( -- name )
|
||||||
|
os
|
||||||
|
{ { "macosx" [ "./Factor.app/Contents/MacOS/factor" ] }
|
||||||
|
{ "windows" [ "./factor-nt.exe" ] }
|
||||||
|
[ drop "./factor" ] }
|
||||||
|
case ;
|
||||||
|
|
||||||
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
VAR: stamp
|
VAR: stamp
|
||||||
|
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
: build ( -- )
|
: build ( -- )
|
||||||
|
|
||||||
datestamp >stamp
|
datestamp >stamp
|
||||||
|
|
||||||
"/builds/factor" cd
|
"/builds/factor" cd
|
||||||
"git pull git://factorcode.org/git/factor.git" system
|
|
||||||
0 =
|
{ "git" "pull" "--no-summary" "git://factorcode.org/git/factor.git" }
|
||||||
[ ]
|
run-process process-status
|
||||||
[
|
0 =
|
||||||
"builder: git pull" "/dev/null" email-file
|
[ ]
|
||||||
"builder: git pull" throw
|
[
|
||||||
]
|
"builder: git pull" email-string
|
||||||
if
|
"builder: git pull" throw
|
||||||
|
]
|
||||||
|
if
|
||||||
|
|
||||||
"/builds/" stamp> append make-directory
|
"/builds/" stamp> append make-directory
|
||||||
"/builds/" stamp> append cd
|
"/builds/" stamp> append cd
|
||||||
"git clone /builds/factor" system drop
|
|
||||||
|
|
||||||
"factor" cd
|
{ "git" "clone" "/builds/factor" } run-process drop
|
||||||
|
|
||||||
{ "git" "show" } <process-stream>
|
"factor" cd
|
||||||
[ readln ] with-stream
|
|
||||||
" " split second
|
|
||||||
"../git-id" <file-writer> [ print ] with-stream
|
|
||||||
|
|
||||||
"make clean" system drop
|
{ "git" "show" } <process-stream>
|
||||||
|
[ readln ] with-stream
|
||||||
|
" " split second
|
||||||
|
"../git-id" <file-writer> [ print ] with-stream
|
||||||
|
|
||||||
"make " target " > ../compile-log" 3append system
|
{ "make" "clean" } run-process drop
|
||||||
0 =
|
|
||||||
[ ]
|
|
||||||
[
|
|
||||||
"builder: vm compile" "../compile-log" email-file
|
|
||||||
"builder: vm compile" throw
|
|
||||||
] if
|
|
||||||
|
|
||||||
"wget http://factorcode.org/images/latest/" boot-image-name append system
|
`{
|
||||||
0 =
|
{ +arguments+ { "make" ,[ target ] } }
|
||||||
[ ]
|
{ +stdout+ "../compile-log" }
|
||||||
[
|
{ +stderr+ +stdout+ }
|
||||||
"builder: image download" "/dev/null" email-file
|
}
|
||||||
"builder: image download" throw
|
>hashtable run-process process-status
|
||||||
] if
|
0 =
|
||||||
|
[ ]
|
||||||
|
[
|
||||||
|
"builder: vm compile" "../compile-log" email-file
|
||||||
|
"builder: vm compile" throw
|
||||||
|
] if
|
||||||
|
|
||||||
[
|
[ "http://factorcode.org/images/latest/" boot-image-name append download ]
|
||||||
"./factor -i=" boot-image-name " -no-user-init > ../boot-log"
|
[ "builder: image download" email-string ]
|
||||||
3append
|
recover
|
||||||
system
|
|
||||||
]
|
|
||||||
benchmark nip
|
|
||||||
"../boot-time" <file-writer> [ . ] with-stream
|
|
||||||
0 =
|
|
||||||
[ ]
|
|
||||||
[
|
|
||||||
"builder: bootstrap" "../boot-log" email-file
|
|
||||||
"builder: bootstrap" throw
|
|
||||||
] if
|
|
||||||
|
|
||||||
[
|
`{
|
||||||
"./factor -e='USE: tools.browser load-everything' > ../load-everything-log"
|
{ +arguments+ {
|
||||||
system
|
,[ factor-binary ]
|
||||||
] benchmark nip
|
,[ "-i=" boot-image-name append ]
|
||||||
"../load-everything-time" <file-writer> [ . ] with-stream
|
"-no-user-init"
|
||||||
0 =
|
} }
|
||||||
[ ]
|
{ +stdout+ "../boot-log" }
|
||||||
[
|
{ +stderr+ +stdout+ }
|
||||||
"builder: load-everything" "../load-everything-log" email-file
|
}
|
||||||
"builder: load-everything" throw
|
>hashtable
|
||||||
] if
|
[ run-process process-status ]
|
||||||
|
benchmark nip "../boot-time" <file-writer> [ . ] with-stream
|
||||||
|
0 =
|
||||||
|
[ ]
|
||||||
|
[
|
||||||
|
"builder: bootstrap" "../boot-log" email-file
|
||||||
|
"builder: bootstrap" throw
|
||||||
|
] if
|
||||||
|
|
||||||
;
|
`{
|
||||||
|
{ +arguments+
|
||||||
|
{ ,[ factor-binary ] "-e=USE: tools.browser load-everything" } }
|
||||||
|
{ +stdout+ "../load-everything-log" }
|
||||||
|
{ +stderr+ +stdout+ }
|
||||||
|
}
|
||||||
|
>hashtable [ run-process process-status ] benchmark nip
|
||||||
|
"../load-everything-time" <file-writer> [ . ] with-stream
|
||||||
|
0 =
|
||||||
|
[ ]
|
||||||
|
[
|
||||||
|
"builder: load-everything" "../load-everything-log" email-file
|
||||||
|
"builder: load-everything" throw
|
||||||
|
] if ;
|
||||||
|
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue