Skip to content

Commit

Permalink
Demonstration
Browse files Browse the repository at this point in the history
  • Loading branch information
travisbrown committed Jun 25, 2015
1 parent f8ea987 commit 8ffbf7c
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 24 deletions.
59 changes: 37 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# This is necessary until https://github.com/travis-ci/travis-ci/issues/3120 is
# fixed
sudo: required

language: scala

# These directories are cached to S3 at the end of the build
cache:
directories:
- $HOME/.ivy2/cache
- $HOME/.sbt/boot/scala-$TRAVIS_SCALA_VERSION

scala:
- 2.10.5
- 2.11.6
Expand All @@ -13,32 +23,37 @@ jdk:
before_script:
# default $SBT_OPTS is irrelevant to sbt lancher
- unset SBT_OPTS
- ./bin/travisci
- travis_retry ./sbt ++$TRAVIS_SCALA_VERSION update

script:
# skip these projects because they don't pass on travis-ci
- echo skip ./sbt ++$TRAVIS_SCALA_VERSION finagle-http/test
- echo skip ./sbt ++$TRAVIS_SCALA_VERSION finagle-memcached/test
- echo skip ./sbt ++$TRAVIS_SCALA_VERSION finagle-mux/test
- echo skip ./sbt ++$TRAVIS_SCALA_VERSION coverage finagle-http/test
- echo skip ./sbt ++$TRAVIS_SCALA_VERSION coverage finagle-memcached/test
- echo skip ./sbt ++$TRAVIS_SCALA_VERSION coverage finagle-mux/test

# run conditionally because they don't pass with openjdks
- if [[ "$TRAVIS_JDK_VERSION" = oraclejdk* ]]; then ./sbt ++$TRAVIS_SCALA_VERSION finagle-native/test; fi
- if [[ "$TRAVIS_JDK_VERSION" = oraclejdk* ]]; then ./sbt ++$TRAVIS_SCALA_VERSION coverage finagle-native/test; fi

# run for all environments
- ./sbt ++$TRAVIS_SCALA_VERSION finagle-commons-stats/test
- ./sbt ++$TRAVIS_SCALA_VERSION finagle-core/test
- ./sbt ++$TRAVIS_SCALA_VERSION finagle-exception/test
- ./sbt ++$TRAVIS_SCALA_VERSION finagle-exp/test
- ./sbt ++$TRAVIS_SCALA_VERSION finagle-kestrel/test
- ./sbt ++$TRAVIS_SCALA_VERSION finagle-mdns/test
- ./sbt ++$TRAVIS_SCALA_VERSION finagle-mysql/test
- ./sbt ++$TRAVIS_SCALA_VERSION finagle-ostrich4/test
- ./sbt ++$TRAVIS_SCALA_VERSION finagle-redis/test
- ./sbt ++$TRAVIS_SCALA_VERSION finagle-serversets/test
- ./sbt ++$TRAVIS_SCALA_VERSION finagle-spdy/test
- ./sbt ++$TRAVIS_SCALA_VERSION finagle-stats/test
- ./sbt ++$TRAVIS_SCALA_VERSION finagle-stream/test
- ./sbt ++$TRAVIS_SCALA_VERSION finagle-stress/test
- ./sbt ++$TRAVIS_SCALA_VERSION finagle-testers/test
- ./sbt ++$TRAVIS_SCALA_VERSION finagle-thrift/test
- ./sbt ++$TRAVIS_SCALA_VERSION finagle-thriftmux/test
- ./sbt ++$TRAVIS_SCALA_VERSION finagle-zipkin/test
- ./sbt ++$TRAVIS_SCALA_VERSION coverage finagle-commons-stats/test
- ./sbt ++$TRAVIS_SCALA_VERSION coverage finagle-core/test
- ./sbt ++$TRAVIS_SCALA_VERSION coverage finagle-exception/test
- ./sbt ++$TRAVIS_SCALA_VERSION coverage finagle-exp/test
- ./sbt ++$TRAVIS_SCALA_VERSION coverage finagle-kestrel/test
- ./sbt ++$TRAVIS_SCALA_VERSION coverage finagle-mdns/test
- ./sbt ++$TRAVIS_SCALA_VERSION coverage finagle-mysql/test
- ./sbt ++$TRAVIS_SCALA_VERSION coverage finagle-ostrich4/test
- ./sbt ++$TRAVIS_SCALA_VERSION coverage finagle-redis/test
- ./sbt ++$TRAVIS_SCALA_VERSION coverage finagle-serversets/test
- ./sbt ++$TRAVIS_SCALA_VERSION coverage finagle-spdy/test
- ./sbt ++$TRAVIS_SCALA_VERSION coverage finagle-stats/test
- ./sbt ++$TRAVIS_SCALA_VERSION coverage finagle-stream/test
- ./sbt ++$TRAVIS_SCALA_VERSION coverage finagle-stress/test
- ./sbt ++$TRAVIS_SCALA_VERSION coverage finagle-testers/test
- ./sbt ++$TRAVIS_SCALA_VERSION coverage finagle-thrift/test
- ./sbt ++$TRAVIS_SCALA_VERSION coverage finagle-thriftmux/test
- ./sbt ++$TRAVIS_SCALA_VERSION coverage finagle-zipkin/test
- ./sbt ++$TRAVIS_SCALA_VERSION coverageAggregate

after_success: ./sbt ++$TRAVIS_SCALA_VERSION coveralls
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# Finagle

[![Build status](https://travis-ci.org/travisbrown/finagle.svg?branch=develop)](https://travis-ci.org/travisbrown/finagle)
[![Coverage status](https://img.shields.io/coveralls/travisbrown/finagle/develop.svg)](https://coveralls.io/r/travisbrown/finagle?branch=develop)
[![Project status](https://img.shields.io/badge/status-active-brightgreen.svg)](#status)

## Status

This project is used in production at Twitter (and many other organizations),
and is being actively developed and maintained.

![Finagle logo](https://raw.github.com/twitter/finagle/master/doc/src/sphinx/_static/logo_small.png)

## Getting involved
Expand Down
26 changes: 26 additions & 0 deletions bin/travisci
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

set -xe

# Publish local dependencies when not in a master branch
FINAGLE_BRANCH=$(git rev-parse --abbrev-ref HEAD)

if [ "$FINAGLE_BRANCH" != "master" ]; then
FINAGLE_DIR=$(pwd)
# TODO try to use ./sbt of each project instead of scrooge's sbt
FINAGLE_SBT=$FINAGLE_DIR/sbt
FINAGLE_TMP_DIR=$(mktemp -d -t ostrich.XXXXXXXXXX.tmp)
# util
cd $FINAGLE_TMP_DIR
git clone https://github.com/travisbrown/util.git --branch develop
cd util
$FINAGLE_SBT ++$TRAVIS_SCALA_VERSION publishLocal
# ostrich
cd $FINAGLE_TMP_DIR
git clone https://github.com/travisbrown/ostrich.git --branch develop
cd ostrich
$FINAGLE_SBT ++$TRAVIS_SCALA_VERSION publishLocal
# clean up
cd $FINAGLE_DIR
rm -rf $FINAGLE_TMP_DIR
fi
8 changes: 8 additions & 0 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import com.typesafe.sbt.site.SphinxSupport.Sphinx
import pl.project13.scala.sbt.JmhPlugin
import sbtunidoc.Plugin.UnidocKeys._
import sbtunidoc.Plugin.{ScalaUnidoc, unidocSettings}
import scoverage.ScoverageSbtPlugin

object Finagle extends Build {
val branch = Process("git" :: "rev-parse" :: "--abbrev-ref" :: "HEAD" :: Nil).!!.trim
Expand Down Expand Up @@ -61,6 +62,13 @@ object Finagle extends Build {
"org.mockito" % "mockito-all" % "1.9.5" % "test"
),
resolvers += "twitter-repo" at "http://maven.twttr.com",

ScoverageSbtPlugin.ScoverageKeys.coverageHighlighting := (
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, 10)) => false
case _ => true
}
),

publishM2Configuration <<= (packagedArtifacts, checksums in publish, ivyLoggingLevel) map { (arts, cs, level) =>
Classpaths.publishConfig(arts, None, resolverName = m2Repo.name, checksums = cs, logging = level)
Expand Down
6 changes: 4 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "0.8.1")
resolvers += Classpaths.sbtPluginReleases

addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "0.8.1")
addSbtPlugin("com.twitter" %% "scrooge-sbt-plugin" % "3.15.0")

addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.0.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.0.4")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.2.0")

0 comments on commit 8ffbf7c

Please sign in to comment.