propellor spin
This commit is contained in:
parent
a0b808e892
commit
2066292be9
|
@ -197,9 +197,11 @@ hosts = -- (o) `
|
||||||
, GitAnnexBuilder.armelAutoBuilderContainer dockerImage "1 3 * * *" "5h"
|
, GitAnnexBuilder.armelAutoBuilderContainer dockerImage "1 3 * * *" "5h"
|
||||||
, GitAnnexBuilder.androidAutoBuilderContainer dockerImage "1 1 * * *" "3h"
|
, GitAnnexBuilder.androidAutoBuilderContainer dockerImage "1 1 * * *" "3h"
|
||||||
|
|
||||||
-- for development of git-annex for android
|
-- for development of git-annex for android, using my git-annex
|
||||||
, GitAnnexBuilder.androidContainer dockerImage "android-git-annex"
|
-- work tree
|
||||||
& Docker.volume ("/home/joey/src/git-annex:" ++ GitAnnexBuilder.homedir </> "git-annex")
|
, let gitannexdir = GitAnnexBuilder.homedir </> "git-annex"
|
||||||
|
in GitAnnexBuilder.androidContainer dockerImage "android-git-annex" doNothing gitannexdir
|
||||||
|
& Docker.volume ("/home/joey/src/git-annex:" ++ gitannexdir)
|
||||||
] ++ monsters
|
] ++ monsters
|
||||||
|
|
||||||
-- This is my standard system setup.
|
-- This is my standard system setup.
|
||||||
|
|
|
@ -103,6 +103,9 @@ trivial p = adjustProperty p $ \satisfy -> do
|
||||||
then return NoChange
|
then return NoChange
|
||||||
else return r
|
else return r
|
||||||
|
|
||||||
|
doNothing :: Property
|
||||||
|
doNothing = property "noop property" noChange
|
||||||
|
|
||||||
-- | Makes a property that is satisfied differently depending on the host's
|
-- | Makes a property that is satisfied differently depending on the host's
|
||||||
-- operating system.
|
-- operating system.
|
||||||
--
|
--
|
||||||
|
|
|
@ -23,10 +23,9 @@ builddir = gitbuilderdir </> "build"
|
||||||
|
|
||||||
type TimeOut = String -- eg, 5h
|
type TimeOut = String -- eg, 5h
|
||||||
|
|
||||||
builder :: Architecture -> CronTimes -> TimeOut -> Bool -> Property
|
autobuilder :: CronTimes -> TimeOut -> Bool -> Property
|
||||||
builder buildarch crontimes timeout rsyncupload = combineProperties "gitannexbuilder"
|
autobuilder crontimes timeout rsyncupload = combineProperties "gitannexbuilder"
|
||||||
[ tree buildarch
|
[ Apt.serviceInstalledRunning "cron"
|
||||||
, Apt.serviceInstalledRunning "cron"
|
|
||||||
, Cron.niceJob "gitannexbuilder" crontimes builduser gitbuilderdir $
|
, Cron.niceJob "gitannexbuilder" crontimes builduser gitbuilderdir $
|
||||||
"git pull ; timeout " ++ timeout ++ " ./autobuild"
|
"git pull ; timeout " ++ timeout ++ " ./autobuild"
|
||||||
-- The builduser account does not have a password set,
|
-- The builduser account does not have a password set,
|
||||||
|
@ -50,8 +49,7 @@ builder buildarch crontimes timeout rsyncupload = combineProperties "gitannexbui
|
||||||
|
|
||||||
tree :: Architecture -> Property
|
tree :: Architecture -> Property
|
||||||
tree buildarch = combineProperties "gitannexbuilder tree"
|
tree buildarch = combineProperties "gitannexbuilder tree"
|
||||||
[ User.accountFor builduser
|
[ Apt.installed ["git"]
|
||||||
, Apt.installed ["git"]
|
|
||||||
-- gitbuilderdir directory already exists when docker volume is used,
|
-- gitbuilderdir directory already exists when docker volume is used,
|
||||||
-- but with wrong owner.
|
-- but with wrong owner.
|
||||||
, File.dirExists gitbuilderdir
|
, File.dirExists gitbuilderdir
|
||||||
|
@ -104,21 +102,24 @@ standardAutoBuilderContainer dockerImage arch buildminute timeout = Docker.conta
|
||||||
& Apt.stdSourcesList Unstable
|
& Apt.stdSourcesList Unstable
|
||||||
& Apt.unattendedUpgrades
|
& Apt.unattendedUpgrades
|
||||||
& buildDepsApt
|
& buildDepsApt
|
||||||
& builder arch (show buildminute ++ " * * * *") timeout True
|
& autobuilder (show buildminute ++ " * * * *") timeout True
|
||||||
|
`requires` tree arch
|
||||||
|
|
||||||
androidAutoBuilderContainer :: (System -> Docker.Image) -> Cron.CronTimes -> TimeOut -> Host
|
androidAutoBuilderContainer :: (System -> Docker.Image) -> Cron.CronTimes -> TimeOut -> Host
|
||||||
androidAutoBuilderContainer dockerImage crontimes timeout =
|
androidAutoBuilderContainer dockerImage crontimes timeout =
|
||||||
androidContainer dockerImage "android-git-annex-builder"
|
androidContainer dockerImage "android-git-annex-builder" (tree "android") builddir
|
||||||
& Apt.unattendedUpgrades
|
& Apt.unattendedUpgrades
|
||||||
& builder "android" crontimes timeout True
|
& autobuilder crontimes timeout True
|
||||||
|
|
||||||
-- Android is cross-built in a Debian i386 container, using the Android NDK.
|
-- Android is cross-built in a Debian i386 container, using the Android NDK.
|
||||||
androidContainer :: (System -> Docker.Image) -> Docker.ContainerName -> Host
|
androidContainer :: (System -> Docker.Image) -> Docker.ContainerName -> Property -> FilePath -> Host
|
||||||
androidContainer dockerImage name = Docker.container name
|
androidContainer dockerImage name setupgitannexdir gitannexdir = Docker.container name
|
||||||
(dockerImage $ System (Debian Stable) "i386")
|
(dockerImage $ System (Debian Stable) "i386")
|
||||||
& Apt.stdSourcesList Stable
|
& Apt.stdSourcesList Stable
|
||||||
|
& User.accountFor builduser
|
||||||
& buildDepsNoHaskellLibs
|
& buildDepsNoHaskellLibs
|
||||||
& flagFile chrootsetup ("/chrootsetup")
|
& flagFile chrootsetup ("/chrootsetup")
|
||||||
|
`requires` setupgitannexdir
|
||||||
-- TODO: automate installing haskell libs
|
-- TODO: automate installing haskell libs
|
||||||
-- (Currently have to run
|
-- (Currently have to run
|
||||||
-- git-annex/standalone/android/install-haskell-packages
|
-- git-annex/standalone/android/install-haskell-packages
|
||||||
|
@ -128,7 +129,7 @@ androidContainer dockerImage name = Docker.container name
|
||||||
-- ghc-android and the NDK, all build deps, etc, in the home
|
-- ghc-android and the NDK, all build deps, etc, in the home
|
||||||
-- directory of the builder user.
|
-- directory of the builder user.
|
||||||
chrootsetup = scriptProperty
|
chrootsetup = scriptProperty
|
||||||
[ "cd " ++ builddir ++ " && ./standalone/android/buildchroot-inchroot"
|
[ "cd " ++ gitannexdir ++ " && ./standalone/android/buildchroot-inchroot"
|
||||||
]
|
]
|
||||||
|
|
||||||
-- armel builder has a companion container using amd64 that
|
-- armel builder has a companion container using amd64 that
|
||||||
|
@ -163,7 +164,8 @@ armelAutoBuilderContainer dockerImage crontimes timeout = Docker.container "arme
|
||||||
-- git-annex/standalone/linux/install-haskell-packages
|
-- git-annex/standalone/linux/install-haskell-packages
|
||||||
-- which is not fully automated.)
|
-- which is not fully automated.)
|
||||||
& buildDepsFewHaskellLibs
|
& buildDepsFewHaskellLibs
|
||||||
& builder "armel" crontimes timeout True
|
& autobuilder crontimes timeout True
|
||||||
|
`requires` tree "armel"
|
||||||
& Ssh.keyImported SshRsa builduser
|
& Ssh.keyImported SshRsa builduser
|
||||||
& trivial writecompanionaddress
|
& trivial writecompanionaddress
|
||||||
where
|
where
|
||||||
|
|
Loading…
Reference in New Issue