Skip to content

Commit

Permalink
Added support for automated continuous integration using Travis-CI.org
Browse files Browse the repository at this point in the history
  • Loading branch information
rhauch committed Oct 19, 2015
1 parent d764a75 commit 3645832
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -17,3 +17,4 @@ libs/wpilib
downloads/ downloads/


.DS_Store/ .DS_Store/

6 changes: 6 additions & 0 deletions .travis.yml
@@ -0,0 +1,6 @@
sudo: false
language: java
install: ant deps
script: ant test
jdk:
- oraclejdk8
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -23,7 +23,7 @@ If you want to build Strongback locally, you will need to have installed JDK 1.8


$ ant test $ ant test


This will download the appropriate version of WPILib and install it into the `libs` directory, and then compile all the code and run the unit tests. Once this works, you know your environment is set up correctly, and you can proceed to import the projects into your Eclipse workspace and view or make changes to the library and/or tests using Eclipse. At any time, you can run Ant to compile, test, or create distribution files. This will download the appropriate version of WPILib and install it into the `libs` directory, and then compile all the code and run the unit tests. Once this works, you know your environment is set up correctly, and you can proceed to import the projects into your Eclipse workspace and view or make changes to the library and/or tests using Eclipse. At any time, you can run Ant to compile, test, or create distribution files. For help with Ant, run `ant help` to see the available targets and their descriptions.


If you have any problems getting this far, please check our [developers discussion forum](https://groups.google.com/forum/#!forum/strongback-dev) to see if others are having similar problems. If you see no relevant discussion, post a question with the details about your platform, the versions of the tools, what you are trying to do, and what result you are getting. If you have any problems getting this far, please check our [developers discussion forum](https://groups.google.com/forum/#!forum/strongback-dev) to see if others are having similar problems. If you see no relevant discussion, post a question with the details about your platform, the versions of the tools, what you are trying to do, and what result you are getting.


Expand Down
4 changes: 2 additions & 2 deletions build-common.xml
Expand Up @@ -70,7 +70,7 @@
<copy todir="${project.output.dir}"> <copy todir="${project.output.dir}">
<fileset dir="${project.source.dir}" includes="**/*.xml,**/*.properties,**/*.txt,**/*.ico" /> <fileset dir="${project.source.dir}" includes="**/*.xml,**/*.properties,**/*.txt,**/*.ico" />
</copy> </copy>
<copy todir="${project.output.dir}" failonerror="false" quiet="true"> <copy todir="${project.output.dir}" failonerror="false">
<fileset dir="${project.resources.dir}"/> <fileset dir="${project.resources.dir}"/>
</copy> </copy>
</target> </target>
Expand All @@ -92,7 +92,7 @@
<copy todir="${project.test.output.dir}"> <copy todir="${project.test.output.dir}">
<fileset dir="${project.test.source.dir}" includes="**/*.xml,**/*.properties,**/*.txt,**/*.ico" /> <fileset dir="${project.test.source.dir}" includes="**/*.xml,**/*.properties,**/*.txt,**/*.ico" />
</copy> </copy>
<copy todir="${project.output.dir}" failonerror="false" quiet="true"> <copy todir="${project.output.dir}" failonerror="false">
<fileset dir="${project.test.resources.dir}"/> <fileset dir="${project.test.resources.dir}"/>
</copy> </copy>
</target> </target>
Expand Down
34 changes: 18 additions & 16 deletions build.xml
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<project name="strongback" default="dist" xmlns:antcontrib="antlib:net.sf.antcontrib"> <project name="strongback" default="dist">
<!-- Add Ant-Contrib --> <!-- Add Ant-Contrib -->
<taskdef uri="antlib:net.sf.antcontrib" <taskdef resource="net/sf/antcontrib/antlib.xml">
resource="net/sf/antcontrib/antlib.xml" <classpath>
classpath="libs/build/ant-contrib-1.0b3.jar"/> <pathelement location="libs/ant/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>


<import file="dependencies.xml"/> <import file="dependencies.xml"/>
<tstamp> <tstamp>
Expand Down Expand Up @@ -33,8 +35,8 @@
<echo>There are a few other targets that are automatically run when the above targets are used,</echo> <echo>There are a few other targets that are automatically run when the above targets are used,</echo>
<echo>but which you may want to run manually:</echo> <echo>but which you may want to run manually:</echo>
<echo></echo> <echo></echo>
<echo> dep Install the dependencies required to compile, run tests, and create the distribution.</echo> <echo> deps Install the dependencies required to compile, run tests, and create the distribution.</echo>
<echo> remove-dep Remove the dependencies installed by `dep`</echo> <echo> remove-deps Remove the dependencies installed by `dep`</echo>
<echo></echo> <echo></echo>
</target> </target>


Expand All @@ -45,19 +47,19 @@
</antcall> </antcall>
</target> </target>


<target name="compile" depends="dep" description="Compiles source code"> <target name="compile" depends="deps" description="Compiles source code">
<antcall target="strongback.all"> <antcall target="strongback.all">
<param name="dependency.target" value="compile"/> <param name="dependency.target" value="compile"/>
</antcall> </antcall>
</target> </target>


<target name="test" depends="dep" description="Run the tests"> <target name="test" depends="deps" description="Run the tests">
<antcall target="strongback.all"> <antcall target="strongback.all">
<param name="dependency.target" value="test"/> <param name="dependency.target" value="test"/>
</antcall> </antcall>
</target> </target>


<target name="jar" depends="dep" description="Creates the JARs"> <target name="jar" depends="deps" description="Creates the JARs">
<antcall target="strongback.all"> <antcall target="strongback.all">
<param name="dependency.target" value="jar"/> <param name="dependency.target" value="jar"/>
</antcall> </antcall>
Expand Down Expand Up @@ -137,7 +139,7 @@
</target> </target>


<!-- Remove and clean dependencies --> <!-- Remove and clean dependencies -->
<target name="remove-dep" depends="clean-downloads" description="Removes the locally-installed dependencies"> <target name="remove-deps" depends="clean-downloads" description="Removes the locally-installed dependencies">
<!-- !!!! Always remove the *local* installation; never the one in ${wpilib.dir} !!!! --> <!-- !!!! Always remove the *local* installation; never the one in ${wpilib.dir} !!!! -->
<delete dir="libs/wpilib" /> <delete dir="libs/wpilib" />
</target> </target>
Expand All @@ -148,7 +150,7 @@
</target> </target>


<!-- Install Dependencies --> <!-- Install Dependencies -->
<target name="dep" depends="download-wpilib,clean-downloads" description="Downloads and installs the dependencies required for the build"> <target name="deps" depends="download-wpilib,clean-downloads" description="Downloads and installs the dependencies required for the build">
</target> </target>


<!-- Check if the WPI directory exists --> <!-- Check if the WPI directory exists -->
Expand All @@ -167,17 +169,17 @@
<!-- Download the 'site.xml' file that contains the URL to the feature we want, and get that URL --> <!-- Download the 'site.xml' file that contains the URL to the feature we want, and get that URL -->
<get src="${wpilib.updatesite.url}/site.xml" dest="downloads/site.xml"/> <get src="${wpilib.updatesite.url}/site.xml" dest="downloads/site.xml"/>
<xmlproperty file="downloads/site.xml" collapseAttributes="true" semanticAttributes="true" keepRoot="true"/> <xmlproperty file="downloads/site.xml" collapseAttributes="true" semanticAttributes="true" keepRoot="true"/>
<antcontrib:for list="${site.feature.url}" param="url"> <for list="${site.feature.url}" param="url">
<sequential> <sequential>
<antcontrib:if> <if>
<contains string="@{url}" substring="java.feature"/> <contains string="@{url}" substring="java.feature"/>
<then> <then>
<property name="javaFeatureUrl" value="@{url}"/> <property name="javaFeatureUrl" value="@{url}"/>
</then> </then>
</antcontrib:if> </if>
</sequential> </sequential>
</antcontrib:for> </for>
<antcontrib:propertyregex property="wpilib.version" input="${javaFeatureUrl}" regexp="_([\d.]*).jar" select="\1" casesensitive="false" /> <propertyregex property="wpilib.version" input="${javaFeatureUrl}" regexp="_([\d.]*).jar" select="\1" casesensitive="false" />
<!-- The feature URL can be converted to the plugin URL --> <!-- The feature URL can be converted to the plugin URL -->
<loadresource property="javaPluginUrl"> <loadresource property="javaPluginUrl">
<propertyresource name="javaFeatureUrl"/> <propertyresource name="javaFeatureUrl"/>
Expand Down
Binary file added libs/ant/ant-contrib-1.0b3.jar
Binary file not shown.

0 comments on commit 3645832

Please sign in to comment.