Browse Source

Merge pull request #1021 from hamiltont/travis-refactor-yaml

Refactor travis-ci yaml for new directory organization
Hamilton Turner 11 years ago
parent
commit
f7c28fab44
3 changed files with 162 additions and 138 deletions
  1. 138 128
      .travis.yml
  2. 13 1
      frameworks/C/duda/install.sh
  3. 11 9
      toolset/run-ci.py

+ 138 - 128
.travis.yml

@@ -18,149 +18,159 @@ env:
     # we end up starting ~200+ different workers. Seems that ~100 is the limit
     # before their website starts to lag heavily
     #
-    # Here's a bash one-liner if you need to update this: 
-    # toolset/run-tests.py --list-tests | while read line ; do
-    #    echo "    - TESTDIR=$line"
-    # done    
-    - TESTDIR=activeweb
-    - TESTDIR=aspnet
-    - TESTDIR=beego
-    - TESTDIR=bottle
-    - TESTDIR=cakephp
-    - TESTDIR=compojure
-    - TESTDIR=cowboy
-    - TESTDIR=cpoll_cppsp
-    - TESTDIR=curacao
-    - TESTDIR=dancer
-    - TESTDIR=dart
-    - TESTDIR=dart-start
-    - TESTDIR=dart-stream
-    - TESTDIR=dart-redstone
-    - TESTDIR=django
-    - TESTDIR=dropwizard
-    - TESTDIR=dropwizard-mongodb
-    - TESTDIR=duda
-    - TESTDIR=elli
-    - TESTDIR=evhttp-sharp
-    - TESTDIR=express
-    - TESTDIR=falcon
-    - TESTDIR=falcore
-    - TESTDIR=finagle
-    - TESTDIR=flask
-    - TESTDIR=gemini
-    - TESTDIR=gin
-    - TESTDIR=go
-    - TESTDIR=grails
-    - TESTDIR=grizzly-bm
-    - TESTDIR=grizzly-jersey
-    - TESTDIR=hapi
-    - TESTDIR=hhvm
-    - TESTDIR=http-kit
-    - TESTDIR=jester
-    - TESTDIR=jetty-servlet
-    - TESTDIR=kelp
-    - TESTDIR=lapis
-    - TESTDIR=lift-stateless
-    - TESTDIR=luminus
-    - TESTDIR=mojolicious
-    - TESTDIR=nancy
-    - TESTDIR=nawak
-    - TESTDIR=netty
-    - TESTDIR=ninja-resin
-    - TESTDIR=ninja-standalone
-    - TESTDIR=nodejs
-    - TESTDIR=onion
-    - TESTDIR=openresty
-    - TESTDIR=php
-    - TESTDIR=php-codeigniter
-    - TESTDIR=php-fuel
-    - TESTDIR=php-kohana
-    - TESTDIR=php-laravel
-    - TESTDIR=php-lithium
-    - TESTDIR=php-micromvc
-    - TESTDIR=php-phalcon
-    - TESTDIR=php-phalcon-micro
-    - TESTDIR=php-phpixie
-    - TESTDIR=php-pimf
-    - TESTDIR=php-senthot
-    - TESTDIR=php-silex
-    - TESTDIR=php-silex-orm
-    - TESTDIR=php-silica
-    - TESTDIR=php-slim
-    - TESTDIR=php-symfony2
-    - TESTDIR=php-symfony2-stripped
-    - TESTDIR=php-yaf
-    - TESTDIR=php-yii2
-    - TESTDIR=php-zend-framework
-    - TESTDIR=phreeze
-    - TESTDIR=plack
-    - TESTDIR=plain
-    - TESTDIR=play1
-    - TESTDIR=play1siena
-    - TESTDIR=play2-java
-    - TESTDIR=play2-scala
-    - TESTDIR=play-activate-mysql
-    - TESTDIR=play-java-jpa
-    - TESTDIR=play-scala-mongodb
-    - TESTDIR=play-slick
-    - TESTDIR=pyramid
-    - TESTDIR=rack
-    - TESTDIR=racket-ws
-    - TESTDIR=rails
-    - TESTDIR=rails-stripped
-    - TESTDIR=restexpress
-    - TESTDIR=revel
-    - TESTDIR=revel-jet
-    - TESTDIR=revel-qbs
-    - TESTDIR=ringojs
-    - TESTDIR=ringojs-convenient
-    - TESTDIR=scalatra
-    - TESTDIR=servicestack
-    - TESTDIR=servlet
-    - TESTDIR=servlet3-cass
-    - TESTDIR=sinatra
-    - TESTDIR=snap
-    - TESTDIR=spark
-    - TESTDIR=spray
-    - TESTDIR=spring
-    - TESTDIR=tapestry
-    - TESTDIR=tornado
-    - TESTDIR=treefrog
-    - TESTDIR=ULib
-    - TESTDIR=undertow
-    - TESTDIR=undertow-edge
-    - TESTDIR=unfiltered
-    - TESTDIR=urweb
-    - TESTDIR=uwsgi
-    - TESTDIR=vertx
-    - TESTDIR=wai
-    - TESTDIR=WeberFramework
-    - TESTDIR=webgo
-    - TESTDIR=web-simple
-    - TESTDIR=wicket
-    - TESTDIR=wildfly-ee7
-    - TESTDIR=wsgi
-    - TESTDIR=wt
-    - TESTDIR=yesod
+    # Here's the bash if you need to update this. Be sure to maintain the 
+    # lines that are currently commented out (these cannot run in Travis)
+    #   cd frameworks 
+    #   find . -type d -depth 2 | sed 's|./|    - "TESTDIR=|' | sed 's/$/"/g'
+    #
+    #  
+    - "TESTDIR=C/duda"
+    - "TESTDIR=C/onion"
+    - "TESTDIR=C#/aspnet"
+    # - "TESTDIR=C#/aspnet-stripped"
+    - "TESTDIR=C#/evhttp-sharp"
+    # - "TESTDIR=C#/HttpListener"
+    - "TESTDIR=C#/nancy"
+    - "TESTDIR=C#/servicestack"
+    - "TESTDIR=C++/cpoll_cppsp"
+    - "TESTDIR=C++/treefrog"
+    - "TESTDIR=C++/ULib"
+    - "TESTDIR=C++/wt"
+    - "TESTDIR=Clojure/compojure"
+    - "TESTDIR=Clojure/http-kit"
+    - "TESTDIR=Clojure/luminus"
+    - "TESTDIR=Dart/dart"
+    - "TESTDIR=Dart/dart-redstone"
+    - "TESTDIR=Dart/dart-start"
+    - "TESTDIR=Dart/dart-stream"
+    - "TESTDIR=Elixir/WeberFramework"
+    - "TESTDIR=Erlang/cowboy"
+    - "TESTDIR=Erlang/elli"
+    - "TESTDIR=Go/beego"
+    - "TESTDIR=Go/falcore"
+    - "TESTDIR=Go/gin"
+    - "TESTDIR=Go/go"
+    - "TESTDIR=Go/gorail"
+    - "TESTDIR=Go/revel"
+    - "TESTDIR=Go/revel-jet"
+    - "TESTDIR=Go/revel-qbs"
+    - "TESTDIR=Go/webgo"
+    - "TESTDIR=Groovy/grails"
+    - "TESTDIR=Haskell/snap"
+    - "TESTDIR=Haskell/wai"
+    - "TESTDIR=Haskell/yesod"
+    - "TESTDIR=Java/activeweb"
+    - "TESTDIR=Java/curacao"
+    - "TESTDIR=Java/dropwizard"
+    - "TESTDIR=Java/dropwizard-mongodb"
+    - "TESTDIR=Java/gemini"
+    - "TESTDIR=Java/grizzly-bm"
+    - "TESTDIR=Java/grizzly-jersey"
+    - "TESTDIR=Java/jetty-servlet"
+    - "TESTDIR=Java/netty"
+    - "TESTDIR=Java/ninja-resin"
+    - "TESTDIR=Java/ninja-standalone"
+    - "TESTDIR=Java/play-java"
+    - "TESTDIR=Java/play-java-jpa"
+    - "TESTDIR=Java/play1"
+    - "TESTDIR=Java/play1siena"
+    - "TESTDIR=Java/play2-java"
+    - "TESTDIR=Java/restexpress"
+    - "TESTDIR=Java/servlet"
+    - "TESTDIR=Java/servlet3-cass"
+    - "TESTDIR=Java/spark"
+    - "TESTDIR=Java/spring"
+    - "TESTDIR=Java/tapestry"
+    - "TESTDIR=Java/undertow"
+    - "TESTDIR=Java/undertow-edge"
+    - "TESTDIR=Java/vertx"
+    - "TESTDIR=Java/wicket"
+    - "TESTDIR=Java/wildfly-ee7"
+    - "TESTDIR=JavaScript/express"
+    - "TESTDIR=JavaScript/hapi"
+    - "TESTDIR=JavaScript/nodejs"
+    - "TESTDIR=JavaScript/ringojs"
+    - "TESTDIR=JavaScript/ringojs-convenient"
+    - "TESTDIR=Lua/lapis"
+    - "TESTDIR=Lua/leda"
+    - "TESTDIR=Lua/openresty"
+    - "TESTDIR=Nimrod/jester"
+    - "TESTDIR=Nimrod/nawak"
+    - "TESTDIR=Perl/dancer"
+    - "TESTDIR=Perl/kelp"
+    - "TESTDIR=Perl/mojolicious"
+    - "TESTDIR=Perl/plack"
+    - "TESTDIR=Perl/web-simple"
+    - "TESTDIR=PHP/cakephp"
+    - "TESTDIR=PHP/hhvm"
+    - "TESTDIR=PHP/php"
+    - "TESTDIR=PHP/php-codeigniter"
+    - "TESTDIR=PHP/php-fatfree"
+    - "TESTDIR=PHP/php-fuel"
+    - "TESTDIR=PHP/php-kohana"
+    - "TESTDIR=PHP/php-laravel"
+    - "TESTDIR=PHP/php-lithium"
+    - "TESTDIR=PHP/php-micromvc"
+    - "TESTDIR=PHP/php-phalcon"
+    - "TESTDIR=PHP/php-phalcon-micro"
+    - "TESTDIR=PHP/php-phpixie"
+    - "TESTDIR=PHP/php-pimf"
+    - "TESTDIR=PHP/php-senthot"
+    - "TESTDIR=PHP/php-silex"
+    - "TESTDIR=PHP/php-silex-orm"
+    - "TESTDIR=PHP/php-silica"
+    - "TESTDIR=PHP/php-slim"
+    - "TESTDIR=PHP/php-symfony2"
+    - "TESTDIR=PHP/php-symfony2-stripped"
+    - "TESTDIR=PHP/php-yaf"
+    - "TESTDIR=PHP/php-yii2"
+    - "TESTDIR=PHP/php-zend-framework"
+    - "TESTDIR=PHP/phreeze"
+    - "TESTDIR=Python/bottle"
+    - "TESTDIR=Python/django"
+    - "TESTDIR=Python/falcon"
+    - "TESTDIR=Python/flask"
+    - "TESTDIR=Python/pyramid"
+    - "TESTDIR=Python/tornado"
+    - "TESTDIR=Python/uwsgi"
+    - "TESTDIR=Python/wsgi"
+    - "TESTDIR=Racket/racket-ws"
+    - "TESTDIR=Ruby/rack"
+    - "TESTDIR=Ruby/rails"
+    - "TESTDIR=Ruby/rails-stripped"
+    - "TESTDIR=Ruby/sinatra"
+    - "TESTDIR=Scala/finagle"
+    - "TESTDIR=Scala/lift-stateless"
+    - "TESTDIR=Scala/plain"
+    - "TESTDIR=Scala/play-activate-mysql"
+    - "TESTDIR=Scala/play-scala"
+    - "TESTDIR=Scala/play-scala-mongodb"
+    - "TESTDIR=Scala/play-slick"
+    - "TESTDIR=Scala/play2-scala"
+    - "TESTDIR=Scala/scalatra"
+    - "TESTDIR=Scala/scruffy"
+    - "TESTDIR=Scala/spray"
+    - "TESTDIR=Scala/unfiltered"
+    - "TESTDIR=Ur/urweb"
 
 before_install:
   # Configure Travis-CI build environment for TFB
   #   e.g. setup databases, users, etc
-  - time ./toolset/run-ci.py cisetup $TESTDIR
+  - time ./toolset/run-ci.py cisetup "$TESTDIR"
 
 addons:
   postgresql: "9.3" 
 
 install:
   # Install prerequisites
-  - time ./toolset/run-ci.py prereq $TESTDIR
+  - time ./toolset/run-ci.py prereq "$TESTDIR"
   
   # Install software for this framework  
-  - time ./toolset/run-ci.py install $TESTDIR
+  - time ./toolset/run-ci.py install "$TESTDIR"
    
 script: 
   # Pick one test in this directory and verify
-  - time ./toolset/run-ci.py verify $TESTDIR
+  - time ./toolset/run-ci.py verify "$TESTDIR"
 
 cache:
   directories:

+ 13 - 1
frameworks/C/duda/install.sh

@@ -1,3 +1,15 @@
 #!/bin/bash
 
-fw_depends duda
+RETCODE=$(fw_exists duda-0.23.installed)
+[ ! "$RETCODE" == 0 ] || { return 0; }
+
+fw_get http://duda.io/releases/duda-client/dudac-0.23.tar.gz -O dudac-0.23.tar.gz
+fw_untar dudac-0.23.tar.gz
+
+cd dudac-0.23
+
+./dudac -r
+./dudac -s
+
+cd ..
+touch duda-0.23.installed

+ 11 - 9
toolset/run-ci.py

@@ -19,6 +19,8 @@ sys.path.append('.')
 sys.path.append('toolset/setup/linux')
 sys.path.append('toolset/benchmark')
 
+from setup.linux import setup_util
+
 class CIRunnner:
   '''
   Manages running TFB on the Travis Continuous Integration system. 
@@ -176,19 +178,22 @@ class CIRunnner:
     #
 
     tests = gather_tests()
-    dirtests = [t for t in tests if os.path.basename(t.directory) == testdir]
+    self.fwroot = setup_util.get_fwroot()
+    target_dir = self.fwroot + '/frameworks/' + testdir
+    log.debug("Target directory is %s", target_dir)
+    dirtests = [t for t in tests if t.directory == target_dir]
     
     # Travis-CI is linux only
     osvalidtests = [t for t in dirtests if t.os.lower() == "linux"
                   and (t.database_os.lower() == "linux" or t.database_os.lower() == "none")]
     
-    # Travis-CI only has some supported databases
+    # Our Travis-CI only has some databases supported
     validtests = [t for t in osvalidtests if t.database.lower() == "mysql"
                   or t.database.lower() == "postgres"
                   or t.database.lower() == "mongodb"
                   or t.database.lower() == "none"]
-    log.info("Found %s tests (%s for linux, %s for linux and mysql) in directory '%s'", 
-      len(dirtests), len(osvalidtests), len(validtests), os.path.basename(testdir))
+    log.info("Found %s usable tests (%s valid for linux, %s valid for linux and {mysql,postgres,mongodb,none}) in directory '%s'", 
+      len(dirtests), len(osvalidtests), len(validtests), '$FWROOT/frameworks/' + testdir)
     if len(validtests) == 0:
       log.critical("Found no test that is possible to run in Travis-CI! Aborting!")
       if len(osvalidtests) != 0:
@@ -201,7 +206,7 @@ class CIRunnner:
       sys.exit(1)
 
     self.names = [t.name for t in validtests]
-    log.info("Using tests %s to verify directory %s", self.names, os.path.basename(testdir))
+    log.info("Using tests %s to verify directory %s", self.names, '$FWROOT/frameworks/' + testdir)
 
   def _should_run(self):
     ''' 
@@ -248,10 +253,7 @@ class CIRunnner:
       return True
   
     # Look for changes relevant to this test
-    if (
-         re.search("^%s/" % self.directory, changes, re.M) is None and 
-         re.search("^frameworks/.+?/%s/" % self.directory, changes, re.M) is None
-       ):
+    if re.search("^frameworks/%s/" % self.directory, changes, re.M) is None:
       log.info("No changes found for directory %s", self.directory)
       touch('.run-ci.should_not_run')
       return False