Skip to content

Commit

Permalink
travis config added
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Reimann committed Feb 16, 2018
1 parent a800ccb commit 333c02e
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 16 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/.gradle/
bin
build

# Eclipse files are created with `gradlew eclipse`
.classpath
.project
.settings
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: java
install: true

dist: trusty

after_success:
- ./gradlew coveralls
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[![Build Status](https://travis-ci.org/felixreimann/opendse.svg?branch=master)](https://travis-ci.org/felixreimann/opendse)
[![Coverage Status](https://coveralls.io/repos/github/felixreimann/opendse/badge.svg?branch=master)](https://coveralls.io/github/felixreimann/opendse?branch=master)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/net.sf.opendse/opendse-model/badge.svg)](https://maven-badges.herokuapp.com/maven-central/net.sf.opendse/opendse-model)
[![Javadocs](https://javadoc.io/badge/net.sf.opendse/opendse-model.svg)](https://javadoc.io/doc/net.sf.opendse/opendse-model)

# OpenDSE - Open Design Space Exploration Framework

_OpenDSE_ is a design space exploration framework for embedded systems, written in Java.
Expand Down
52 changes: 36 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
plugins {
id 'com.github.kt3k.coveralls' version '2.6.3'
}
apply plugin: 'base'
apply plugin: 'maven'
apply plugin: 'application'
Expand Down Expand Up @@ -196,24 +199,41 @@ task website(dependsOn: [copyWebsite, copyJavadoc]) {}

task release(dependsOn: [fatjar,website] ){}

task codeCoverageReport(type: JacocoReport) {
dependsOn subprojects*.test

// Gather execution data from all subprojects
// (change this if you e.g. want to calculate unit test/integration test coverage separately)
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")

// Add all relevant sourcesets from the subprojects
subprojects.each {
sourceSets it.sourceSets.main
}

task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
dependsOn = subprojects.test
additionalSourceDirs = files(subprojects.sourceSets.main.allSource.srcDirs)
sourceDirectories = files(subprojects.sourceSets.main.allSource.srcDirs)
classDirectories = files(subprojects.sourceSets.main.output)
executionData = files(subprojects.jacocoTestReport.executionData)
reports {
xml.enabled true
html.enabled true
html.destination "${buildDir}/reports/jacoco"
csv.enabled false
html.enabled = true
xml.enabled = true
csv.enabled = false
}
onlyIf = {
true
}
doFirst {
executionData = files(executionData.findAll {
it.exists()
})
}
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it, exclude: ['ptolemy/**', 'org/opt4j/tutorial/**', 'org/opt4j/viewer/**', 'org/opt4j/core/config/visualization/**'])
})
}
}

coveralls {
sourceDirs = subprojects.sourceSets.main.allSource.srcDirs.flatten()
jacocoReportPath = "${buildDir}/reports/jacoco/jacocoRootReport/jacocoRootReport.xml"
}
tasks.coveralls {
group = 'Documentation'
description = 'Uploads the aggregated coverage report to Coveralls'

dependsOn jacocoRootReport
onlyIf { System.env.'CI' && !JavaVersion.current().isJava9Compatible() }
}

0 comments on commit 333c02e

Please sign in to comment.