reorg git-annex android builder, and put a dev container on my laptop
This commit is contained in:
parent
fe685d2660
commit
16fbf3c6f6
|
@ -42,6 +42,7 @@ hosts = -- (o) `
|
||||||
& ipv6 "2001:4830:1600:187::2" -- sixxs tunnel
|
& ipv6 "2001:4830:1600:187::2" -- sixxs tunnel
|
||||||
& Docker.configured
|
& Docker.configured
|
||||||
& Apt.buildDep ["git-annex"] `period` Daily
|
& Apt.buildDep ["git-annex"] `period` Daily
|
||||||
|
& Docker.docked hosts "android-git-annex"
|
||||||
|
|
||||||
-- Nothing super-important lives here.
|
-- Nothing super-important lives here.
|
||||||
, standardSystem "clam.kitenet.net" Unstable "amd64"
|
, standardSystem "clam.kitenet.net" Unstable "amd64"
|
||||||
|
@ -193,11 +194,15 @@ hosts = -- (o) `
|
||||||
(Just "remotes/origin/old-kitenet.net")
|
(Just "remotes/origin/old-kitenet.net")
|
||||||
|
|
||||||
-- git-annex autobuilder containers
|
-- git-annex autobuilder containers
|
||||||
, GitAnnexBuilder.standardContainer dockerImage "amd64" 15 "2h"
|
, GitAnnexBuilder.standardAutoBuilderContainer dockerImage "amd64" 15 "2h"
|
||||||
, GitAnnexBuilder.standardContainer dockerImage "i386" 45 "2h"
|
, GitAnnexBuilder.standardAutoBuilderContainer dockerImage "i386" 45 "2h"
|
||||||
, GitAnnexBuilder.armelCompanionContainer dockerImage
|
, GitAnnexBuilder.armelCompanionContainer dockerImage
|
||||||
, GitAnnexBuilder.armelContainer dockerImage "1 3 * * *" "5h"
|
, GitAnnexBuilder.armelAutoBuilderContainer dockerImage "1 3 * * *" "5h"
|
||||||
, GitAnnexBuilder.androidContainer dockerImage "1 1 * * *" "3h"
|
, GitAnnexBuilder.androidAutoBuilderContainer dockerImage "1 1 * * *" "3h"
|
||||||
|
|
||||||
|
-- for development of git-annex for android
|
||||||
|
, GitAnnexBuilder.androidContainer dockerImage "android-git-annex"
|
||||||
|
& Docker.volume ("/home/joey/src/git-annex:" ++ GitAnnexBuilder.homedir </> "git-annex")
|
||||||
] ++ monsters
|
] ++ monsters
|
||||||
|
|
||||||
-- This is my standard system setup.
|
-- This is my standard system setup.
|
||||||
|
|
|
@ -24,12 +24,8 @@ builddir = gitbuilderdir </> "build"
|
||||||
type TimeOut = String -- eg, 5h
|
type TimeOut = String -- eg, 5h
|
||||||
|
|
||||||
builder :: Architecture -> CronTimes -> TimeOut -> Bool -> Property
|
builder :: Architecture -> CronTimes -> TimeOut -> Bool -> Property
|
||||||
builder = builder' buildDeps
|
builder buildarch crontimes timeout rsyncupload = combineProperties "gitannexbuilder"
|
||||||
|
|
||||||
builder' :: Property -> Architecture -> CronTimes -> TimeOut -> Bool -> Property
|
|
||||||
builder' buildepsprop buildarch crontimes timeout rsyncupload = combineProperties "gitannexbuilder"
|
|
||||||
[ tree buildarch
|
[ tree buildarch
|
||||||
, buildepsprop
|
|
||||||
, 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"
|
||||||
|
@ -72,8 +68,8 @@ tree buildarch = combineProperties "gitannexbuilder tree"
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
buildDeps :: Property
|
buildDepsApt :: Property
|
||||||
buildDeps = combineProperties "gitannexbuilder build deps"
|
buildDepsApt = combineProperties "gitannexbuilder build deps"
|
||||||
[ Apt.buildDep ["git-annex"]
|
[ Apt.buildDep ["git-annex"]
|
||||||
, buildDepsFewHaskellLibs
|
, buildDepsFewHaskellLibs
|
||||||
, "git-annex source build deps installed" ==> Apt.buildDepIn builddir
|
, "git-annex source build deps installed" ==> Apt.buildDepIn builddir
|
||||||
|
@ -102,20 +98,26 @@ cabalDeps = flagFile go cabalupdated
|
||||||
go = userScriptProperty builduser ["cabal update && cabal install git-annex --only-dependencies || true"]
|
go = userScriptProperty builduser ["cabal update && cabal install git-annex --only-dependencies || true"]
|
||||||
cabalupdated = homedir </> ".cabal" </> "packages" </> "hackage.haskell.org" </> "00-index.cache"
|
cabalupdated = homedir </> ".cabal" </> "packages" </> "hackage.haskell.org" </> "00-index.cache"
|
||||||
|
|
||||||
standardContainer :: (System -> Docker.Image) -> Architecture -> Int -> TimeOut -> Host
|
standardAutoBuilderContainer :: (System -> Docker.Image) -> Architecture -> Int -> TimeOut -> Host
|
||||||
standardContainer dockerImage arch buildminute timeout = Docker.container (arch ++ "-git-annex-builder")
|
standardAutoBuilderContainer dockerImage arch buildminute timeout = Docker.container (arch ++ "-git-annex-builder")
|
||||||
(dockerImage $ System (Debian Unstable) arch)
|
(dockerImage $ System (Debian Unstable) arch)
|
||||||
& Apt.stdSourcesList Unstable
|
& Apt.stdSourcesList Unstable
|
||||||
& Apt.unattendedUpgrades
|
& Apt.unattendedUpgrades
|
||||||
|
& buildDepsApt
|
||||||
& builder arch (show buildminute ++ " * * * *") timeout True
|
& builder arch (show buildminute ++ " * * * *") timeout True
|
||||||
|
|
||||||
|
androidAutoBuilderContainer :: (System -> Docker.Image) -> Cron.CronTimes -> TimeOut -> Host
|
||||||
|
androidAutoBuilderContainer dockerImage crontimes timeout =
|
||||||
|
androidContainer dockerImage "android-git-annex-builder"
|
||||||
|
& Apt.unattendedUpgrades
|
||||||
|
& builder "android" 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) -> Cron.CronTimes -> TimeOut -> Host
|
androidContainer :: (System -> Docker.Image) -> Docker.ContainerName -> Host
|
||||||
androidContainer dockerImage crontimes timeout = Docker.container "android-git-annex-builder"
|
androidContainer dockerImage name = Docker.container name
|
||||||
(dockerImage $ System (Debian Stable) "i386")
|
(dockerImage $ System (Debian Stable) "i386")
|
||||||
& Apt.stdSourcesList Stable
|
& Apt.stdSourcesList Stable
|
||||||
& Apt.unattendedUpgrades
|
& buildDepsNoHaskellLibs
|
||||||
& builder' buildDepsNoHaskellLibs "android" crontimes timeout True
|
|
||||||
& flagFile chrootsetup ("/chrootsetup")
|
& flagFile chrootsetup ("/chrootsetup")
|
||||||
-- TODO: automate installing haskell libs
|
-- TODO: automate installing haskell libs
|
||||||
-- (Currently have to run
|
-- (Currently have to run
|
||||||
|
@ -148,8 +150,8 @@ armelCompanionContainer dockerImage = Docker.container "armel-git-annex-builder-
|
||||||
& Apt.serviceInstalledRunning "ssh"
|
& Apt.serviceInstalledRunning "ssh"
|
||||||
& Ssh.authorizedKeys builduser
|
& Ssh.authorizedKeys builduser
|
||||||
|
|
||||||
armelContainer :: (System -> Docker.Image) -> Cron.CronTimes -> TimeOut -> Host
|
armelAutoBuilderContainer :: (System -> Docker.Image) -> Cron.CronTimes -> TimeOut -> Host
|
||||||
armelContainer dockerImage crontimes timeout = Docker.container "armel-git-annex-builder"
|
armelAutoBuilderContainer dockerImage crontimes timeout = Docker.container "armel-git-annex-builder"
|
||||||
(dockerImage $ System (Debian Unstable) "armel")
|
(dockerImage $ System (Debian Unstable) "armel")
|
||||||
& Apt.stdSourcesList Unstable
|
& Apt.stdSourcesList Unstable
|
||||||
& Apt.unattendedUpgrades
|
& Apt.unattendedUpgrades
|
||||||
|
@ -160,7 +162,8 @@ armelContainer dockerImage crontimes timeout = Docker.container "armel-git-annex
|
||||||
-- (Currently have to run
|
-- (Currently have to run
|
||||||
-- git-annex/standalone/linux/install-haskell-packages
|
-- git-annex/standalone/linux/install-haskell-packages
|
||||||
-- which is not fully automated.)
|
-- which is not fully automated.)
|
||||||
& builder' buildDepsFewHaskellLibs "armel" crontimes timeout True
|
& buildDepsFewHaskellLibs
|
||||||
|
& builder "armel" crontimes timeout True
|
||||||
& Ssh.keyImported SshRsa builduser
|
& Ssh.keyImported SshRsa builduser
|
||||||
& trivial writecompanionaddress
|
& trivial writecompanionaddress
|
||||||
where
|
where
|
||||||
|
|
Loading…
Reference in New Issue