Refactored targets to allow building debug and release configurations of one target framework
Project: http://git-wip-us.apache.org/repos/asf/logging-log4net/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4net/commit/9b357c99 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4net/tree/9b357c99 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4net/diff/9b357c99 Branch: refs/heads/develop Commit: 9b357c994dd96a65ab69ffc62156c3dc084ca0fe Parents: 7eb982d Author: Dominik Psenner <[email protected]> Authored: Mon Jul 3 09:47:44 2017 +0200 Committer: Dominik Psenner <[email protected]> Committed: Mon Jul 3 09:47:44 2017 +0200 ---------------------------------------------------------------------- Jenkinsfile | 2 +- log4net.build | 141 +++++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 122 insertions(+), 21 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/9b357c99/Jenkinsfile ---------------------------------------------------------------------- diff --git a/Jenkinsfile b/Jenkinsfile index 3941913..a47e58a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -44,7 +44,7 @@ pipeline { stage('Build on builder-mono3') { agent { dockerfile { dir 'buildtools/docker/builder-mono3' } } steps { - sh "nant -buildfile:log4net.build" + sh "nant -buildfile:log4net.build compile-momo-3.5" } } stage('Test on Windows') { http://git-wip-us.apache.org/repos/asf/logging-log4net/blob/9b357c99/log4net.build ---------------------------------------------------------------------- diff --git a/log4net.build b/log4net.build index f736aaa..0ad18c2 100644 --- a/log4net.build +++ b/log4net.build @@ -174,26 +174,6 @@ limitations under the License. <!-- Target for compiling all build configurations for all runtime configurations --> <target name="compile-all" description="Compile all build configurations for all runtime configurations" depends="generate-assembly-description"> <echo message="Compiling all build configurations for all runtime configurations."/> - <call target="set-debug-build-configuration"/> - <call target="compile-build"/> - <call target="set-release-build-configuration"/> - <call target="compile-build"/> - </target> - <!-- Target for compiling all build configurations for the current runtime configurations --> - <target name="compile-runtime" description="Compile all build configurations for the current target framework"> - <echo message="Compiling all build configurations for ${framework::get-description(framework::get-target-framework())}."/> - <call target="set-debug-build-configuration"/> - <!-- make sure that the runtime properties that rely on build configuration information are refreshed --> - <call target="set-runtime-configuration"/> - <call target="compile-${framework::get-target-framework()}"/> - <call target="set-release-build-configuration"/> - <!-- make sure that the runtime properties that rely on build configuration information are refreshed --> - <call target="set-runtime-configuration"/> - <call target="compile-${framework::get-target-framework()}"/> - </target> - <!-- Target for compiling all runtime configurations in the current build configuration --> - <target name="compile-build" description="Compile current build configurations for all runtime configurations"> - <echo message="Compiling all framework versions for the ${current.build.config} build configuration."/> <!-- NETCF_1_0 --> <call target="compile-netcf-1.0"/> <!-- NETCF_2_0 --> @@ -225,10 +205,23 @@ limitations under the License. <!-- netstandard --> <call target="compile-netstandard"/> </target> + <!-- Target for compiling all build configurations for the current runtime configurations --> + <target name="compile-runtime" description="Compile all build configurations for the current target framework"> + <echo message="Compiling all build configurations for ${framework::get-description(framework::get-target-framework())}."/> + <call target="compile-${framework::get-target-framework()}"/> + </target> <target name="compile" description="Builds the current build configuration for the current target framework." depends="check-current-build-config"> <call target="compile-${framework::get-target-framework()}"/> </target> <target name="compile-netcf-1.0" description="Builds .NET Compact Framework 1.0 version"> + <call target="set-debug-build-configuration"/> + <call target="set-runtime-configuration"/> + <call target="compile-netcf-1.0-current-configuration"/> + <call target="set-release-build-configuration"/> + <call target="set-runtime-configuration"/> + <call target="compile-netcf-1.0-current-configuration"/> + </target> + <target name="compile-netcf-1.0-current-configuration"> <if test="${not framework::exists('netcf-1.0')}"> <echo message="Skipping build; required framework is not available: .NET Compact Framework 1.0"/> </if> @@ -282,6 +275,14 @@ limitations under the License. </if> </target> <target name="compile-netcf-2.0" description="Builds .NET Compact Framework 2.0 version"> + <call target="set-debug-build-configuration"/> + <call target="set-runtime-configuration"/> + <call target="compile-netcf-2.0-current-configuration"/> + <call target="set-release-build-configuration"/> + <call target="set-runtime-configuration"/> + <call target="compile-netcf-2.0-current-configuration"/> + </target> + <target name="compile-netcf-2.0-current-configuration"> <if test="${not framework::exists('netcf-2.0')}"> <echo message="Skipping build; required framework is not available: .NET Compact Framework 2.0"/> </if> @@ -372,6 +373,14 @@ limitations under the License. </if> </target> <target name="compile-net-1.0" description="Builds .NET Framework 1.0 version"> + <call target="set-debug-build-configuration"/> + <call target="set-runtime-configuration"/> + <call target="compile-net-1.0-current-configuration"/> + <call target="set-release-build-configuration"/> + <call target="set-runtime-configuration"/> + <call target="compile-net-1.0-current-configuration"/> + </target> + <target name="compile-net-1.0-current-configuration"> <if test="${not framework::exists('net-1.0')}"> <echo message="Skipping build; required framework is not available: .NET Framework 1.0"/> </if> @@ -449,6 +458,14 @@ limitations under the License. </if> </target> <target name="compile-net-1.1" description="Builds .NET Framework 1.1 version"> + <call target="set-debug-build-configuration"/> + <call target="set-runtime-configuration"/> + <call target="compile-net-1.1-current-configuration"/> + <call target="set-release-build-configuration"/> + <call target="set-runtime-configuration"/> + <call target="compile-net-1.1-current-configuration"/> + </target> + <target name="compile-net-1.1-current-configuration"> <if test="${not framework::exists('net-1.1')}"> <echo message="Skipping build; required framework is not available: .NET Framework 1.1"/> </if> @@ -526,6 +543,14 @@ limitations under the License. </if> </target> <target name="compile-net-2.0" description="Builds .NET Framework 2.0 version"> + <call target="set-debug-build-configuration"/> + <call target="set-runtime-configuration"/> + <call target="compile-net-2.0-current-configuration"/> + <call target="set-release-build-configuration"/> + <call target="set-runtime-configuration"/> + <call target="compile-net-2.0-current-configuration"/> + </target> + <target name="compile-net-2.0-current-configuration"> <if test="${not framework::exists('net-2.0')}"> <echo message="Skipping build; required framework is not available: .NET Framework 2.0"/> </if> @@ -622,6 +647,14 @@ limitations under the License. </if> </target> <target name="compile-net-3.5" description="Builds .NET Framework 3.5 version"> + <call target="set-debug-build-configuration"/> + <call target="set-runtime-configuration"/> + <call target="compile-net-3.5-current-configuration"/> + <call target="set-release-build-configuration"/> + <call target="set-runtime-configuration"/> + <call target="compile-net-3.5-current-configuration"/> + </target> + <target name="compile-net-3.5-current-configuration"> <if test="${not framework::exists('net-3.5')}"> <echo message="Skipping build; required framework is not available: .NET Framework 3.5"/> </if> @@ -721,6 +754,14 @@ limitations under the License. </if> </target> <target name="compile-net-3.5-cp" description="Builds .NET Framework 3.5 Client Profile version"> + <call target="set-debug-build-configuration"/> + <call target="set-runtime-configuration"/> + <call target="compile-net-3.5-cp-current-configuration"/> + <call target="set-release-build-configuration"/> + <call target="set-runtime-configuration"/> + <call target="compile-net-3.5-cp-current-configuration"/> + </target> + <target name="compile-net-3.5-cp-current-configuration"> <if test="${not framework::exists('net-3.5')}"> <echo message="Skipping build; required framework is not available: .NET Framework 3.5"/> </if> @@ -817,6 +858,14 @@ limitations under the License. </if> </target> <target name="compile-net-4.0" description="Builds .NET Framework 4.0 version"> + <call target="set-debug-build-configuration"/> + <call target="set-runtime-configuration"/> + <call target="compile-net-4.0-current-configuration"/> + <call target="set-release-build-configuration"/> + <call target="set-runtime-configuration"/> + <call target="compile-net-4.0-current-configuration"/> + </target> + <target name="compile-net-4.0-current-configuration"> <if test="${not framework::exists('net-4.0')}"> <echo message="Skipping build; required framework is not available: .NET Framework 4.0"/> </if> @@ -916,6 +965,14 @@ limitations under the License. </if> </target> <target name="compile-net-4.0-cp" description="Builds .NET Framework 4.0 Client Profile version"> + <call target="set-debug-build-configuration"/> + <call target="set-runtime-configuration"/> + <call target="compile-net-4.0-cp-current-configuration"/> + <call target="set-release-build-configuration"/> + <call target="set-runtime-configuration"/> + <call target="compile-net-4.0-cp-current-configuration"/> + </target> + <target name="compile-net-4.0-cp-current-configuration"> <if test="${not framework::exists('net-4.0')}"> <echo message="Skipping build; required framework is not available: .NET Framework 4.0"/> </if> @@ -1012,6 +1069,14 @@ limitations under the License. </if> </target> <target name="compile-net-4.5" description="Builds .NET Framework 4.5 version"> + <call target="set-debug-build-configuration"/> + <call target="set-runtime-configuration"/> + <call target="compile-net-4.5-current-configuration"/> + <call target="set-release-build-configuration"/> + <call target="set-runtime-configuration"/> + <call target="compile-net-4.5-current-configuration"/> + </target> + <target name="compile-net-4.5-current-configuration"> <if test="${not framework::exists('net-4.0')}"> <echo message="Skipping build; required framework is not available: .NET Framework 4.0"/> </if> @@ -1111,6 +1176,12 @@ limitations under the License. </if> </target> <target name="compile-mono-1.0" description="Builds Mono 1.0 version"> + <call target="set-debug-build-configuration"/> + <call target="compile-mono-1.0-current-configuration"/> + <call target="set-release-build-configuration"/> + <call target="compile-mono-1.0-current-configuration"/> + </target> + <target name="compile-mono-1.0-current-configuration"> <if test="${not framework::exists('mono-1.0')}"> <echo message="Skipping build; required framework is not available: Mono 1.0"/> </if> @@ -1208,6 +1279,12 @@ limitations under the License. </if> </target> <target name="compile-mono-2.0" description="Builds Mono 2.0 version"> + <call target="set-debug-build-configuration"/> + <call target="compile-mono-2.0-current-configuration"/> + <call target="set-release-build-configuration"/> + <call target="compile-mono-2.0-current-configuration"/> + </target> + <target name="compile-mono-2.0-current-configuration"> <if test="${not framework::exists('mono-2.0')}"> <echo message="Skipping build; required framework is not available: Mono 2.0"/> </if> @@ -1310,6 +1387,12 @@ limitations under the License. </if> </target> <target name="compile-mono-3.5" description="Builds Mono 3.5 version"> + <call target="set-debug-build-configuration"/> + <call target="compile-mono-3.5-current-configuration"/> + <call target="set-release-build-configuration"/> + <call target="compile-mono-3.5-current-configuration"/> + </target> + <target name="compile-mono-3.5-current-configuration"> <if test="${not framework::exists('mono-3.5')}"> <echo message="Skipping build; required framework is not available: Mono 3.5"/> </if> @@ -1415,6 +1498,12 @@ limitations under the License. </if> </target> <target name="compile-mono-4.0" description="Builds Mono 4.0 version"> + <call target="set-debug-build-configuration"/> + <call target="compile-mono-4.0-current-configuration"/> + <call target="set-release-build-configuration"/> + <call target="compile-mono-4.0-current-configuration"/> + </target> + <target name="compile-mono-4.0-current-configuration"> <if test="${not framework::exists('mono-4.0')}"> <echo message="Skipping build; required framework is not available: Mono 4.0"/> </if> @@ -1520,6 +1609,12 @@ limitations under the License. </if> </target> <target name="compile-sscli-1.0" description="Builds SSCLI 1.0 version"> + <call target="set-debug-build-configuration"/> + <call target="compile-sscli-1.0-current-configuration"/> + <call target="set-release-build-configuration"/> + <call target="compile-sscli-1.0-current-configuration"/> + </target> + <target name="compile-sscli-1.0-current-configuration"> <if test="${not framework::exists('sscli-1.0')}"> <echo message="Skipping build; required framework is not available: SSCLI 1.0"/> </if> @@ -1587,6 +1682,12 @@ limitations under the License. and would be too closely tied to a specific implementation. --> <target name="compile-cli-1.0" description="Builds CLI 1.0 version" if="${current.build.config.release}"> + <call target="set-debug-build-configuration"/> + <call target="compile-cli-1.0-current-configuration"/> + <call target="set-release-build-configuration"/> + <call target="compile-cli-1.0-current-configuration"/> + </target> + <target name="compile-cli-1.0-current-configuration"> <if test="${not framework::exists('net-1.0')}"> <echo message="Skipping build; required framework is not available: .NET Framework 1.0"/> </if>
