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 5022f3e2 authored by John Zhang's avatar John Zhang
Browse files

build versioning

- specify `dacapo.version` and `dacapo.nickname` in dacapo.properties file;
- build versino is dacapo version + git hash; this can be overwritten by cmd args;
- use `build.target-jar` as output jar name; append build version to jar name.
parent 4a4e4978
Pipeline #2047 failed with stage
in 24 minutes and 52 seconds
...@@ -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,17 @@ BUILDING: ...@@ -118,14 +118,17 @@ 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.version on commandline-->
<property name="build.version" value="${dacapo.version}+${git.hash}"/>
<!-- 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 +237,7 @@ BUILDING: ...@@ -234,7 +237,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 +273,7 @@ BUILDING: ...@@ -270,7 +273,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 +361,7 @@ See ${log.build.report} for a summary of benchmark build status. ...@@ -358,6 +361,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>
...@@ -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