Skip to content

Commit

Permalink
delete Travis CI from ant which is conflict with Hudson CI
Browse files Browse the repository at this point in the history
  • Loading branch information
walterxie committed Apr 23, 2018
1 parent df04506 commit 816684a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 199 deletions.
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

11 changes: 0 additions & 11 deletions Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# bdsky - Birth Death Serial Skyline Model for BEAST2

[![Build Status](https://travis-ci.org/BEAST2-Dev/bdsky.svg?branch=master)](https://travis-ci.org/BEAST2-Dev/bdsky)
<!--[![Build Status](https://travis-ci.org/BEAST2-Dev/bdsky.svg?branch=master)](https://travis-ci.org/BEAST2-Dev/bdsky)-->

## Citation

Expand Down
177 changes: 0 additions & 177 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -211,181 +211,4 @@
<echo message="Add-on version release is finished." />
</target>

<!--=================================================-->

<!--the following scripts used for Travis CI-->
<!-- Source, JUnit test code and jar library locations. -->
<property name="src" location="src"/>
<property name="test" location="src"/>
<property name="lib" location="lib"/>

<!-- Location to check for local copy of beast2 repository -->
<property name="beastDir" location="../beast2"/>

<!-- BEAST 2 currently uses Java 1.8 -->
<property name="sourceVersion" value="1.8"/>
<property name="targetVersion" value="1.8"/>

<!-- BEAST branch and version to build against
(only different for version tags because of
a Github peculiarity) -->
<property name="beast-branch" value="master"/>
<property name="beast-version" value="master"/>

<!-- Names of temporary build/test directories -->
<property name="build" location="build"/>
<property name="build-lib" location="build-lib"/>
<property name="build-test" location="build-test"/>
<property name="test-reports" location="test-reports"/>
<property name="dist" location="dist"/>
<property name="pack" location="${dist}/package"/>

<!-- Prepare for compilation -->
<target name="init">
<available file="version.xml" property="versionAvailable"/>
<fail unless="versionAvailable">
** Required file version.xml does not exist. **
If this is a new project, run "ant skeleton" from
the command line to create the files required for
your BEAST 2 package.
</fail>

<!-- Read package name and version from xml file -->
<xmlproperty file="version.xml" prefix="fromVersionFile" />
<property name="projName" value="${fromVersionFile.addon(name)}" />
<property name="projVersion" value="${fromVersionFile.addon(version)}" />

<mkdir dir="${build}"/>
<mkdir dir="${build-lib}"/>
<mkdir dir="${dist}"/>

<copy todir="${build-lib}" failonerror="false">
<fileset dir="${lib}" includes="*.jar"/>
</copy>
</target>

<!-- Get beast -->
<target name="find-beast" depends="init">
<available file="${beastDir}" property="localBeastAvailable"/>
</target>

<target name="build-remote-beast" depends="find-beast" unless="localBeastAvailable">
<echo>No local copy of the beast2 source found at ${beastDir}.</echo>
<echo>Compiling against version ${beast-version} from GitHub.</echo>

<property name="build-beast" location="build-beast"/>
<mkdir dir="${build-beast}"/>

<get src="https://github.com/CompEvol/beast2/archive/${beast-branch}.zip" dest="${build-beast}/beast.zip"/>
<unzip src="${build-beast}/beast.zip" dest="${build-beast}"/>
<mkdir dir="${build-beast}/beast2-${beast-version}/build"/>
<javac target="${targetVersion}" source="${sourceVersion}"
srcdir="${build-beast}/beast2-${beast-version}/src"
destdir="${build-beast}/beast2-${beast-version}/build" includeantruntime="false">
<classpath>
<pathelement path="${classpath}"/>
<fileset dir="${build-beast}/beast2-${beast-version}/lib" includes="*.jar"/>
</classpath>
</javac>
<jar jarfile="${build-lib}/beast2.jar" basedir="${build-beast}/beast2-${beast-version}/build" />
<copy todir="${build-lib}">
<fileset dir="${build-beast}/beast2-${beast-version}/lib" includes="*.jar"/>
</copy>

<delete dir="${build-beast}" />

</target>

<target name="build-local-beast" depends="find-beast" if="localBeastAvailable">
<echo>Compiling against beast2 source found at ${beastDir}.</echo>

<property name="build-beast" location="build-beast"/>
<mkdir dir="${build-beast}"/>

<javac target="${targetVersion}" source="${sourceVersion}"
srcdir="${beastDir}/src"
destdir="${build-beast}" includeantruntime="false">
<classpath>
<pathelement path="${classpath}"/>
<fileset dir="${beastDir}/lib" includes="*.jar"/>
</classpath>
</javac>
<jar jarfile="${build-lib}/beast2.jar" basedir="${build-beast}" />
<copy todir="${build-lib}">
<fileset dir="${beastDir}/lib" includes="*.jar"/>
</copy>

<delete dir="${build-beast}" />
</target>

<target name="build-beast" depends="build-local-beast,build-remote-beast"/>

<!-- Compile -->
<target name="compile" depends="build-beast">
<javac target="${targetVersion}" source="${sourceVersion}" srcdir="${src}" destdir="${build}" includeantruntime="false">
<classpath>
<pathelement path="${classpath}"/>
<fileset dir="${build-lib}" includes="*.jar"/>
</classpath>
</javac>
</target>

<target name="copy-resources" depends="compile">
<copy todir="${build}">
<fileset dir="${src}"
includes="**/*.png" />
</copy>
</target>

<!-- Prepare for unit test compilation -->
<target name="init-test" depends="init">
<mkdir dir="${build-test}"/>
<mkdir dir="${test-reports}"/>
</target>


<!-- Compile unit tests -->
<target name="compile-test" depends="init-test,compile,copy-resources">
<javac target="${targetVersion}" source="${sourceVersion}" srcdir="${test}" destdir="${build-test}" includeantruntime="false">
<classpath>
<pathelement path="${classpath}"/>
<pathelement path="${build}" />
<fileset dir="${build-lib}" includes="*.jar"/>
</classpath>
</javac>
</target>


<!-- Run unit tests -->
<target name="test" depends="compile-test" description="for Travis CI">
<junit printsummary="yes" failureproperty="testFailed" showoutput="true">
<classpath>
<pathelement path="${classpath}"/>
<pathelement path="${build}" />
<pathelement path="${build-test}" />
<fileset dir="${build-lib}" includes="*.jar"/>
</classpath>
<batchtest fork="yes" todir="${test-reports}">
<fileset dir="${test}">
<include name="**/*Test.java"/>
</fileset>
<formatter type="plain"/>
<!--formatter type="plain" usefile="false"/--> <!-- to screen -->
</batchtest>
</junit>

<fail if="testFailed" status="1" message="Unit test failed."/>
</target>


<!-- Revert to pristine state. -->
<target name="clean">
<delete dir="${build}" />
<delete dir="${build-lib}" />
<delete dir="${dist}" />
<delete dir="${build-test}" />
<delete dir="${test-reports}" />
</target>


</project>

0 comments on commit 816684a

Please sign in to comment.