WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.7% of users enabled 2FA.

Commit 4dbf0201 authored by John Zhang's avatar John Zhang
Browse files

Merge branch 'dacapo-versioning' into 'master'

build versioning

See merge request !4
parents 4a4e4978 8587f2de
Pipeline #2052 failed with stage
in 21 minutes and 12 seconds
...@@ -7,80 +7,75 @@ before_script: ...@@ -7,80 +7,75 @@ before_script:
avrora: avrora:
script: script:
- ant avrora - ant -Dbuild.target-jar=dacapo.jar avrora
- java -jar dacapo.jar avrora - java -jar dacapo.jar avrora
batik: batik:
script: script:
- ant batik - ant -Dbuild.target-jar=dacapo.jar batik
- java -jar dacapo.jar batik - java -jar dacapo.jar batik
eclipse: eclipse:
script: script:
- ant eclipse - ant -Dbuild.target-jar=dacapo.jar eclipse
- java -jar dacapo.jar eclipse - java -jar dacapo.jar eclipse
fop: fop:
script: script:
- ant fop - ant -Dbuild.target-jar=dacapo.jar fop
- java -jar dacapo.jar fop - java -jar dacapo.jar fop
h2: h2:
script: script:
- ant h2 - ant -Dbuild.target-jar=dacapo.jar h2
- java -jar dacapo.jar h2 - java -jar dacapo.jar h2
jython: jython:
script: script:
- ant jython - ant -Dbuild.target-jar=dacapo.jar jython
- java -jar dacapo.jar jython - java -jar dacapo.jar jython
luindex: luindex:
script: script:
- ant luindex - ant -Dbuild.target-jar=dacapo.jar luindex
- java -jar dacapo.jar luindex - java -jar dacapo.jar luindex
lusearch: lusearch:
script: script:
- ant lusearch - ant -Dbuild.target-jar=dacapo.jar lusearch
- java -jar dacapo.jar lusearch
lusearch:
script:
- ant lusearch
- java -jar dacapo.jar lusearch - java -jar dacapo.jar lusearch
lusearch-fix: lusearch-fix:
script: script:
- ant lusearch-fix - ant -Dbuild.target-jar=dacapo.jar lusearch-fix
- java -jar dacapo.jar lusearch-fix - java -jar dacapo.jar lusearch-fix
pmd: pmd:
script: script:
- ant pmd - ant -Dbuild.target-jar=dacapo.jar pmd
- java -jar dacapo.jar pmd - java -jar dacapo.jar pmd
sunflow: sunflow:
script: script:
- ant sunflow - ant -Dbuild.target-jar=dacapo.jar sunflow
- java -jar dacapo.jar sunflow - java -jar dacapo.jar sunflow
tomcat: tomcat:
script: script:
- ant tomcat - ant -Dbuild.target-jar=dacapo.jar tomcat
- java -jar dacapo.jar tomcat - java -jar dacapo.jar tomcat
tradebeans: tradebeans:
script: script:
- ant tradebeans - ant -Dbuild.target-jar=dacapo.jar tradebeans
- java -jar dacapo.jar tradebeans - java -jar dacapo.jar tradebeans
tradesoap: tradesoap:
script: script:
- ant tradesoap - ant -Dbuild.target-jar=dacapo.jar tradesoap
- java -jar dacapo.jar tradesoap - java -jar dacapo.jar tradesoap
xalan: xalan:
script: script:
- ant xalan - ant -Dbuild.target-jar=dacapo.jar xalan
- java -jar dacapo.jar xalan - java -jar dacapo.jar xalan
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
</target> </target>
<target name="complete"> <target name="complete">
<unjar src="${jar-target}" dest="${bm-output-dir}" overwrite="yes"> <unjar src="${build.target-jar}" dest="${bm-output-dir}" overwrite="yes">
<patternset> <patternset>
<include name="doc/menu.html"/> <include name="doc/menu.html"/>
</patternset> </patternset>
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
</java> </java>
<copy file="${temp.file}" tofile="${bm-output-dir}/doc/menu.html"/> <copy file="${temp.file}" tofile="${bm-output-dir}/doc/menu.html"/>
<delete file="${temp.file}"/> <delete file="${temp.file}"/>
<jar jarfile="${jar-target}" basedir="${bm-output-dir}" update="true"/> <jar jarfile="${build.target-jar}" basedir="${bm-output-dir}" update="true"/>
</target> </target>
</project> </project>
...@@ -105,7 +105,7 @@ BUILDING: ...@@ -105,7 +105,7 @@ BUILDING:
<target name="extract-git-revision" depends="check-git-present" if="git.present"> <target name="extract-git-revision" depends="check-git-present" if="git.present">
<exec executable="${git.exe}" failonerror="no" failifexecutionfails="no"> <exec executable="${git.exe}" failonerror="no" failifexecutionfails="no">
<arg line="show --abbrev-commit HEAD"/> <arg line="show --abbrev-commit HEAD"/>
<redirector outputproperty="git.revision"> <redirector outputproperty="git.hash">
<outputfilterchain> <outputfilterchain>
<linecontainsregexp> <linecontainsregexp>
<regexp pattern="^commit [a-z0-9]+$"/> <regexp pattern="^commit [a-z0-9]+$"/>
...@@ -118,14 +118,21 @@ BUILDING: ...@@ -118,14 +118,21 @@ BUILDING:
</exec> </exec>
</target> </target>
<target name="get-git-revision" depends="extract-git-revision" unless="git.revision"> <target name="get-git-revision" depends="extract-git-revision" unless="git.hash">
<!-- set property if not already set --> <!-- set property if not already set -->
<property name="git.revision" value="unknown"/> <property name="git.hash" value="unknown"/>
</target> </target>
<target name="set-build-version-info" depends="get-git-revision"> <target name="set-build-version-info" depends="get-git-revision">
<property name="build.nickname" value="development"/> <property name="build.nickname" value="${dacapo.nickname}"/>
<property name="build.version" value="head-r${git.revision}"/> <!-- overwritable with -Dbuild.is-official=true on commandline-->
<condition property="build.version"
value="${dacapo.version}"
else="${dacapo.version}+${git.hash}">
<isset property="build.is-official"/>
</condition>
<!-- set target jar name -->
<property name="build.target-jar" value="dacapo-${build.version}.jar"/>
</target> </target>
<target name="init" depends="set-build-version-info"> <target name="init" depends="set-build-version-info">
...@@ -234,7 +241,7 @@ BUILDING: ...@@ -234,7 +241,7 @@ BUILDING:
target: dist target: dist
================================= --> ================================= -->
<target name="dist" depends="harness,compile"> <target name="dist" depends="harness,compile">
<move file="dacapo.jar" tofile="dacapo-${DSTAMP}.jar"/> <move file="${build.target-jar}" tofile="dacapo-${DSTAMP}.jar"/>
</target> </target>
<target name="doc" depends="init,bootstrap,harness" description="make the top level documentation"> <target name="doc" depends="init,bootstrap,harness" description="make the top level documentation">
...@@ -270,7 +277,7 @@ BUILDING: ...@@ -270,7 +277,7 @@ BUILDING:
</copy> </copy>
<!-- construct the base jar --> <!-- construct the base jar -->
<jar jarfile="${jar-target}" basedir="${dacapo.build.dir}" update="false" manifest="${dacapo.build.dir}/MANIFEST.MF" excludes="MANIFEST.MF"/> <jar jarfile="${build.target-jar}" basedir="${dacapo.build.dir}" update="false" manifest="${dacapo.build.dir}/MANIFEST.MF" excludes="MANIFEST.MF"/>
</target> </target>
<target name="clean-bootstrap" depends="init"> <target name="clean-bootstrap" depends="init">
...@@ -358,6 +365,7 @@ See ${log.build.report} for a summary of benchmark build status. ...@@ -358,6 +365,7 @@ See ${log.build.report} for a summary of benchmark build status.
<arg value="-Dtoolsdir=${toolsdir}"/> <arg value="-Dtoolsdir=${toolsdir}"/>
<arg value="-Dbuild.time=${build.time}"/> <arg value="-Dbuild.time=${build.time}"/>
<arg value="-Dlog.build.dir=${log.build.dir}"/> <arg value="-Dlog.build.dir=${log.build.dir}"/>
<arg value="-Dbuild.target-jar=${build.target-jar}"/>
<arg value="-buildfile"/> <arg value="-buildfile"/>
<arg value="bms/@{benchmark}/build.xml"/> <arg value="bms/@{benchmark}/build.xml"/>
<arg value="incremental"/> <arg value="incremental"/>
......
# DaCapo version
dacapo.version=9.12-MR1
dacapo.nickname=uncalibrated
# #
# Common properties for the dacapo benchmarks # Common properties for the dacapo benchmarks
# #
...@@ -12,5 +16,3 @@ sfdata.url=http://dacapobench.sourceforge.net/source-data ...@@ -12,5 +16,3 @@ sfdata.url=http://dacapobench.sourceforge.net/source-data
apache.dl.url=http://archive.apache.org/dist apache.dl.url=http://archive.apache.org/dist
apache.mirror=http://apache.mirror.amaze.com.au apache.mirror=http://apache.mirror.amaze.com.au
github.url=https://github.com github.url=https://github.com
jar-target=dacapo.jar
...@@ -64,6 +64,6 @@ ...@@ -64,6 +64,6 @@
</target> </target>
<target name="jar"> <target name="jar">
<jar jarfile="${jar-target}" basedir="${output-parent-dir}" update="true"/> <jar jarfile="${build.target-jar}" basedir="${output-parent-dir}" update="true"/>
</target> </target>
</project> </project>
...@@ -215,7 +215,7 @@ public class CommandLineArgs { ...@@ -215,7 +215,7 @@ public class CommandLineArgs {
*/ */
static void printUsage() { static void printUsage() {
HelpFormatter formatter = new HelpFormatter(); HelpFormatter formatter = new HelpFormatter();
formatter.printHelp("DaCapo Benchmark suite", visibleOptions); formatter.printHelp("DaCapo Benchmark suite " + TestHarness.getBuildVersion(), visibleOptions);
} }
/** /**
......
...@@ -81,6 +81,7 @@ public class TestHarness { ...@@ -81,6 +81,7 @@ public class TestHarness {
/* All benchmarks run headless */ /* All benchmarks run headless */
System.setProperty("java.awt.headless", "true"); System.setProperty("java.awt.headless", "true");
setBuildInfo(); // set BuildVersion and BuildNickName.
try { try {
commandLineArgs = new CommandLineArgs(args); commandLineArgs = new CommandLineArgs(args);
...@@ -253,8 +254,7 @@ public class TestHarness { ...@@ -253,8 +254,7 @@ public class TestHarness {
return null; // not reached return null; // not reached
} }
} }
private static void setBuildInfo() {
{
try { try {
String url = TestHarness.class.getProtectionDomain().getCodeSource().getLocation().getFile(); String url = TestHarness.class.getProtectionDomain().getCodeSource().getLocation().getFile();
JarFile jarFile = new JarFile(url.replace("!/harness", "").replace("file:", "")); JarFile jarFile = new JarFile(url.replace("!/harness", "").replace("file:", ""));
......
...@@ -70,6 +70,6 @@ ...@@ -70,6 +70,6 @@
<target name="jar"/> <target name="jar"/>
<target name="complete"> <target name="complete">
<jar jarfile="${jar-target}" basedir="${lib-output-dir}" update="true"/> <jar jarfile="${build.target-jar}" basedir="${lib-output-dir}" update="true"/>
</target> </target>
</project> </project>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment