Permalink
Browse files

Add continuous integration scripts

Ignore-this: dec9d08b091b35f275b5f675e255ceb0

darcs-hash:20120628013629-a43a9-7f13654ec7ab2e5d51c8247d7f96b6984be3bc9a
  • Loading branch information...
1 parent 2ba7804 commit feea043930f5c9229216a9747b87537d46dc14d5 @gildor478 gildor478 committed Jun 28, 2012
Showing with 66 additions and 0 deletions.
  1. +38 −0 bootstrap.lua
  2. +28 −0 ci-main.lua
View
@@ -0,0 +1,38 @@
+
+local os = os
+local error = error
+local lfs = require("lfs")
+local package = package
+
+module("bootstrap")
+
+function init ()
+ local ci_url = os.getenv("CI_URL")
+ if not ci_url then
+ ci_url = "http://mini:8080/job/continuous-integration/label=debian-squeeze64/lastSuccessfulBuild/artifact/dist/ci.zip"
+ end
+ local bootstrapdir = "build/bootstrap"
+ if lfs.attributes(bootstrapdir) then
+ for fn in lfs.dir(bootstrapdir) do
+ if fn ~= "." and fn ~= ".." then
+ local realfn = bootstrapdir .. "/" .. fn
+ if not os.remove(realfn) then
+ error("Cannot remove " .. realfn)
+ end
+ end
+ end
+ lfs.rmdir("build/bootstrap")
+ end
+ lfs.mkdir("build")
+ lfs.mkdir("build/bootstrap")
+ local topdir = lfs.currentdir()
+ lfs.chdir("build/bootstrap")
+ if os.execute("curl -o ci.zip " .. ci_url) ~= 0 then
+ error "Cannot download ci.zip"
+ end
+ if os.execute("unzip ci.zip") ~= 0 then
+ error "Cannot unzip ci.zip"
+ end
+ lfs.chdir(topdir)
+ package.path = "./build/bootstrap/?.lua;" .. package.path
+end
View
@@ -0,0 +1,28 @@
+bootstrap = require("bootstrap")
+
+bootstrap.init()
+
+ci = require("ci")
+godi = require("godi")
+oasis = require("oasis")
+darcs = require("darcs")
+
+ci.init()
+godi.init()
+darcs.init()
+oasis.init()
+
+godi.bootstrap("3.12")
+godi.update()
+godi.upgrade()
+godi.build_many(
+ {"godi-findlib",
+ "godi-ocaml-fileutils",
+ "godi-ocaml-data-notation",
+ "godi-expect",
+ "godi-ounit",
+ "apps-ocamlmod",
+ "apps-ocamlify"})
+
+oasis.std_process("--enable-tests")
+darcs.create_tag(oasis.package_version())

0 comments on commit feea043

Please sign in to comment.