builder: convert to io.launcher
parent
6c3505aba9
commit
1f66e8173f
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
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 ;
|
||||||
|
|
||||||
IN: builder
|
IN: builder
|
||||||
|
|
||||||
|
@ -19,15 +19,19 @@ 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 ]
|
|
||||||
}
|
}
|
||||||
" " join system drop ;
|
>hashtable run-process drop ;
|
||||||
|
|
||||||
|
: email-string ( subject -- )
|
||||||
|
`{ "mutt" "-s" , %[ builder-recipients get ] }
|
||||||
|
<process-stream>
|
||||||
|
dup
|
||||||
|
dispose
|
||||||
|
process-stream-process wait-for-process drop ;
|
||||||
|
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
@ -44,18 +48,21 @@ VAR: stamp
|
||||||
datestamp >stamp
|
datestamp >stamp
|
||||||
|
|
||||||
"/builds/factor" cd
|
"/builds/factor" cd
|
||||||
"git pull git://factorcode.org/git/factor.git" system
|
|
||||||
|
{ "git" "pull" "--no-summary" "git://factorcode.org/git/factor.git" }
|
||||||
|
run-process process-status
|
||||||
0 =
|
0 =
|
||||||
[ ]
|
[ ]
|
||||||
[
|
[
|
||||||
"builder: git pull" "/dev/null" email-file
|
"builder: git pull" email-string
|
||||||
"builder: git pull" throw
|
"builder: git pull" throw
|
||||||
]
|
]
|
||||||
if
|
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
|
|
||||||
|
{ "git" "clone" "/builds/factor" } run-process drop
|
||||||
|
|
||||||
"factor" cd
|
"factor" cd
|
||||||
|
|
||||||
|
@ -64,9 +71,14 @@ if
|
||||||
" " split second
|
" " split second
|
||||||
"../git-id" <file-writer> [ print ] with-stream
|
"../git-id" <file-writer> [ print ] with-stream
|
||||||
|
|
||||||
"make clean" system drop
|
{ "make" "clean" } run-process drop
|
||||||
|
|
||||||
"make " target " > ../compile-log" 3append system
|
`{
|
||||||
|
{ +arguments+ { "make" ,[ target ] } }
|
||||||
|
{ +stdout+ "../compile-log" }
|
||||||
|
{ +stderr+ +stdout+ }
|
||||||
|
}
|
||||||
|
>hashtable run-process process-status
|
||||||
0 =
|
0 =
|
||||||
[ ]
|
[ ]
|
||||||
[
|
[
|
||||||
|
@ -74,21 +86,22 @@ if
|
||||||
"builder: vm compile" throw
|
"builder: vm compile" throw
|
||||||
] if
|
] if
|
||||||
|
|
||||||
"wget http://factorcode.org/images/latest/" boot-image-name append system
|
[ "http://factorcode.org/images/latest/" boot-image-name append download ]
|
||||||
0 =
|
[ "builder: image download" email-string ]
|
||||||
[ ]
|
recover
|
||||||
[
|
|
||||||
"builder: image download" "/dev/null" email-file
|
|
||||||
"builder: image download" throw
|
|
||||||
] if
|
|
||||||
|
|
||||||
[
|
`{
|
||||||
"./factor -i=" boot-image-name " -no-user-init > ../boot-log"
|
{ +arguments+ {
|
||||||
3append
|
"./factor"
|
||||||
system
|
,[ "-i=" boot-image-name append ]
|
||||||
]
|
"-no-user-init"
|
||||||
benchmark nip
|
} }
|
||||||
"../boot-time" <file-writer> [ . ] with-stream
|
{ +stdout+ "../boot-log" }
|
||||||
|
{ +stderr+ +stdout+ }
|
||||||
|
}
|
||||||
|
>hashtable
|
||||||
|
[ run-process process-status ]
|
||||||
|
benchmark nip "../boot-time" <file-writer> [ . ] with-stream
|
||||||
0 =
|
0 =
|
||||||
[ ]
|
[ ]
|
||||||
[
|
[
|
||||||
|
@ -96,19 +109,19 @@ benchmark nip
|
||||||
"builder: bootstrap" throw
|
"builder: bootstrap" throw
|
||||||
] if
|
] if
|
||||||
|
|
||||||
[
|
`{
|
||||||
"./factor -e='USE: tools.browser load-everything' > ../load-everything-log"
|
{ +arguments+ { "./factor" "-e=USE: tools.browser load-everything" } }
|
||||||
system
|
{ +stdout+ "../load-everything-log" }
|
||||||
] benchmark nip
|
{ +stderr+ +stdout+ }
|
||||||
|
}
|
||||||
|
>hashtable [ run-process process-status ] benchmark nip
|
||||||
"../load-everything-time" <file-writer> [ . ] with-stream
|
"../load-everything-time" <file-writer> [ . ] with-stream
|
||||||
0 =
|
0 =
|
||||||
[ ]
|
[ ]
|
||||||
[
|
[
|
||||||
"builder: load-everything" "../load-everything-log" email-file
|
"builder: load-everything" "../load-everything-log" email-file
|
||||||
"builder: load-everything" throw
|
"builder: load-everything" throw
|
||||||
] if
|
] if ;
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue