Skip to content

Commit

Permalink
Merge pull request #2 from karelmaxa/build-pipeline
Browse files Browse the repository at this point in the history
Add build pipeline
  • Loading branch information
pavelhoral authored Jan 18, 2025
2 parents 9a69b35 + 8e2ff59 commit 6352f58
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 61 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/buid.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build

on: [push, pull_request]

jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v4

- name: Install .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2

- name: Setup NuGet
uses: nuget/setup-nuget@v2

- name: Install external dependencies
run: |
nuget install MSBuildTasks -Version 1.5.0.235
nuget install NUnit.Runners -Version 2.6.7
- name: Install project dependencies
run: nuget restore ConnectorFramework.sln

- name: Build project
run: msbuild ConnectorFramework.sln /p:Configuration=Release

- name: Upload built artifacts
uses: actions/upload-artifact@v4
with:
name: wrenicf-dotnet-framework
path: |
ServiceInstall\bin\Release\openicf-*.zip
ServiceInstall\bin\Release\openicf-*.msi
49 changes: 26 additions & 23 deletions Framework.targets
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
<!--
====================
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
Copyright 2008-2009 Sun Microsystems, Inc. All rights reserved.
The contents of this file are subject to the terms of the Common Development
and Distribution License("CDDL") (the "License"). You may not use this file
Copyright 2008-2009 Sun Microsystems, Inc. All rights reserved.
The contents of this file are subject to the terms of the Common Development
and Distribution License("CDDL") (the "License"). You may not use this file
except in compliance with the License.
You can obtain a copy of the License at
You can obtain a copy of the License at
http://opensource.org/licenses/cddl1.php
See the License for the specific language governing permissions and limitations
under the License.
See the License for the specific language governing permissions and limitations
under the License.
When distributing the Covered Code, include this CDDL Header Notice in each file
and include the License file at http://opensource.org/licenses/cddl1.php.
If applicable, add the following below this CDDL Header, with the fields
enclosed by brackets [] replaced by your own identifying information:
If applicable, add the following below this CDDL Header, with the fields
enclosed by brackets [] replaced by your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"
====================
Portions Copyrighted 2025 Wren Security.
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<PropertyGroup>
<VersionFileIn>$(MSBuildProjectDirectory)\version.template</VersionFileIn>
<VersionFileOut>$(MSBuildProjectDirectory)\version.txt</VersionFileOut>
<Company>ForgeRock</Company>
Expand All @@ -30,9 +31,11 @@
<!--FrameworkRootDir>$(MSBuildProjectDirectory)\..\..\</FrameworkRootDir-->
<FrameworkRootDir>$(MSBuildProjectDirectory)</FrameworkRootDir>
<TreatTestFailureAsBuildFailure>true</TreatTestFailureAsBuildFailure>
<MSBuildCommunityTasksPath>$(SolutionDir)\MSBuildTasks.1.5.0.235\tools</MSBuildCommunityTasksPath>
<NunitPath>$(SolutionDir)\NUnit.Runners.2.6.7\tools</NunitPath>
</PropertyGroup>

<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.Targets" />

<Target Name="GenerateAssemblyInfo">
<Version VersionFile="$(VersionFileIn)">
Expand All @@ -49,17 +52,17 @@
</CreateProperty>
<Message Text="$(MSBuildProjectName) Version: $(Major).$(Minor).$(Build).$(Revision) Revision: $(SVNRevision)"/>
<WriteLinesToFile File="$(VersionFileOut)" Lines="$(Major).$(Minor).$(Build).$(Revision)" Overwrite="true" />
<AssemblyInfo CodeLanguage="CS"
<AssemblyInfo CodeLanguage="CS"
OutputFile="AssemblyInfo.cs"
AssemblyTitle="$(ProductName)"
AssemblyProduct="OpenICF"
AssemblyCopyright="$(Copyright)"
AssemblyCompany="$(Company)"
AssemblyVersion="$(Major).$(Minor).$(Build).$(Revision)"
AssemblyCompany="$(Company)"
AssemblyVersion="$(Major).$(Minor).$(Build).$(Revision)"
AssemblyFileVersion="$(Major).$(Minor).$(Build).$(Revision) Revision $(SVNRevision)"
InternalsVisibleTo="$(InternalsVisibleTo)" />
</Target>

<Target Name="CopyOutput">
<MakeDir Directories="$(FrameworkDistDir)" Condition="!Exists('$(FrameworkDistDir)')" />
<Copy
Expand All @@ -71,20 +74,20 @@
<CreateItem Include="$(OutputPath)\*Tests.dll">
<Output TaskParameter="Include" ItemName="TestAssembly" />
</CreateItem>
<MSBuild.Community.Tasks.NUnit DisableShadowCopy="true" Assemblies="@(TestAssembly)" ExcludeCategory="LongRunning" ToolPath="$(NUNIT_HOME)\bin" OutputXmlFile="$(OutputPath)\NUnitResults_$(Configuration).xml" ShowLabels="True">
<MSBuild.Community.Tasks.NUnit DisableShadowCopy="true" Assemblies="@(TestAssembly)" ExcludeCategory="LongRunning" ToolPath="$(NunitPath)" OutputXmlFile="$(OutputPath)\NUnitResults_$(Configuration).xml" ShowLabels="True">
<Output TaskParameter="ExitCode" PropertyName="NUnitResult" />
</MSBuild.Community.Tasks.NUnit>
</Target>

<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

<PropertyGroup>
<BuildDependsOn>
FrameworkBeforeBuild;
$(BuildDependsOn);
FrameworkAfterBuild
</BuildDependsOn>
<CleanDependsOn>
<CleanDependsOn>
$(CleanDependsOn);
FrameworkClean
</CleanDependsOn>
Expand All @@ -95,11 +98,11 @@
</Target>

<Target Name="FrameworkAfterBuild">
<CallTarget Condition=" '$(CopyOutput)'=='true' " Targets="CopyOutput" />
<CallTarget Condition=" '$(CopyOutput)'=='true' " Targets="CopyOutput" />
</Target>

<Target Name="FrameworkClean">
<RemoveDir Directories="$(FrameworkDistDir)"/>
</Target>

</Project>
27 changes: 16 additions & 11 deletions FrameworkServerTests/FrameworkServerTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@
Copyright (c) 2015 ForgeRock AS. All rights reserved.
The contents of this file are subject to the terms of the Common Development
and Distribution License("CDDL") (the "License"). You may not use this file
The contents of this file are subject to the terms of the Common Development
and Distribution License("CDDL") (the "License"). You may not use this file
except in compliance with the License.
You can obtain a copy of the License at
You can obtain a copy of the License at
http://opensource.org/licenses/CDDL-1.0
See the License for the specific language governing permissions and limitations
under the License.
See the License for the specific language governing permissions and limitations
under the License.
When distributing the Covered Code, include this CDDL Header Notice in each file
and include the License file at legal/CDDLv1.txt.
If applicable, add the following below this CDDL Header, with the fields
enclosed by brackets [] replaced by your own identifying information:
If applicable, add the following below this CDDL Header, with the fields
enclosed by brackets [] replaced by your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"
====================
Portions Copyrighted 2025 Wren Security.
-->
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
Expand All @@ -36,6 +37,7 @@
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TestProjectType>UnitTest</TestProjectType>
<TargetFrameworkProfile />
<NunitPath>$(SolutionDir)\NUnit.Runners.2.6.7\tools</NunitPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -58,7 +60,10 @@
<Reference Include="Google.Protobuf">
<HintPath>..\packages\Google.ProtocolBuffers.3\lib\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="nunit.framework" />
<Reference Include="nunit.framework">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(NunitPath)\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.IdentityModel" />
<Reference Include="System.Reactive.Core, Version=2.2.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
Expand Down Expand Up @@ -146,7 +151,7 @@
<CreateItem Include="FrameworkServerTests.dll">
<Output TaskParameter="Include" ItemName="TestAssembly" />
</CreateItem>
<!--MSBuild.Community.Tasks.NUnit DisableShadowCopy="true" WorkingDirectory="bin\$(Configuration)" Assemblies="@(TestAssembly)" ContinueOnError="true" ToolPath="$(NUNIT_HOME)\bin" OutputXmlFile="TestResults_$(Configuration).xml" /-->
<!--MSBuild.Community.Tasks.NUnit DisableShadowCopy="true" WorkingDirectory="bin\$(Configuration)" Assemblies="@(TestAssembly)" ContinueOnError="true" ToolPath="$(NunitPath)" OutputXmlFile="TestResults_$(Configuration).xml" /-->
</Target>
<Target Name="Clean">
<Delete Files="AssemblyInfo.cs;version.txt" />
Expand Down
33 changes: 19 additions & 14 deletions FrameworkTests/FrameworkTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,25 @@
<!--
====================
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
Copyright 2008-2009 Sun Microsystems, Inc. All rights reserved.
The contents of this file are subject to the terms of the Common Development
and Distribution License("CDDL") (the "License"). You may not use this file
Copyright 2008-2009 Sun Microsystems, Inc. All rights reserved.
The contents of this file are subject to the terms of the Common Development
and Distribution License("CDDL") (the "License"). You may not use this file
except in compliance with the License.
You can obtain a copy of the License at
You can obtain a copy of the License at
http://opensource.org/licenses/cddl1.php
See the License for the specific language governing permissions and limitations
under the License.
See the License for the specific language governing permissions and limitations
under the License.
When distributing the Covered Code, include this CDDL Header Notice in each file
and include the License file at http://opensource.org/licenses/cddl1.php.
If applicable, add the following below this CDDL Header, with the fields
enclosed by brackets [] replaced by your own identifying information:
If applicable, add the following below this CDDL Header, with the fields
enclosed by brackets [] replaced by your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"
====================
Portions Copyrighted 2025 Wren Security.
-->
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
Expand All @@ -32,6 +33,7 @@
<ProductName>FrameworkTests</ProductName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkProfile />
<NunitPath>$(SolutionDir)\NUnit.Runners.2.6.7\tools</NunitPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>bin\Debug\</OutputPath>
Expand All @@ -55,7 +57,10 @@
</PropertyGroup>
<Import Project="$(MSBuildProjectDirectory)\..\Framework.targets" />
<ItemGroup>
<Reference Include="nunit.framework" />
<Reference Include="nunit.framework">
<SpecificVersion>False</SpecificVersion>
<HintPath>$(NunitPath)\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
Expand Down Expand Up @@ -173,7 +178,7 @@
<CreateItem Include="FrameworkTests.dll">
<Output TaskParameter="Include" ItemName="TestAssembly" />
</CreateItem>
<MSBuild.Community.Tasks.NUnit DisableShadowCopy="true" WorkingDirectory="bin\$(Configuration)" Assemblies="@(TestAssembly)" ContinueOnError="true" ToolPath="$(NUNIT_HOME)\bin" OutputXmlFile="TestResults_$(Configuration).xml" />
<MSBuild.Community.Tasks.NUnit DisableShadowCopy="true" WorkingDirectory="bin\$(Configuration)" Assemblies="@(TestAssembly)" ContinueOnError="true" ToolPath="$(NunitPath)" OutputXmlFile="TestResults_$(Configuration).xml" />
</Target>
<Target Name="Clean">
<Delete Files="AssemblyInfo.cs;version.txt" />
Expand Down
28 changes: 15 additions & 13 deletions ServiceInstall/ServiceInstall.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,25 @@
<!--
====================
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
Copyright 2008-2009 Sun Microsystems, Inc. All rights reserved.
The contents of this file are subject to the terms of the Common Development
and Distribution License("CDDL") (the "License"). You may not use this file
Copyright 2008-2009 Sun Microsystems, Inc. All rights reserved.
The contents of this file are subject to the terms of the Common Development
and Distribution License("CDDL") (the "License"). You may not use this file
except in compliance with the License.
You can obtain a copy of the License at
You can obtain a copy of the License at
http://IdentityConnectors.dev.java.net/legal/license.txt
See the License for the specific language governing permissions and limitations
under the License.
See the License for the specific language governing permissions and limitations
under the License.
When distributing the Covered Code, include this CDDL Header Notice in each file
and include the License file at identityconnectors/legal/license.txt.
If applicable, add the following below this CDDL Header, with the fields
enclosed by brackets [] replaced by your own identifying information:
If applicable, add the following below this CDDL Header, with the fields
enclosed by brackets [] replaced by your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"
====================
Portions Copyrighted 2025 Wren Security.
-->
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
Expand All @@ -34,6 +35,7 @@
<Cultures>en-US</Cultures>
<SupressIces>ICE45</SupressIces>
<OpenICFVersion>1.5.2.0-SNAPSHOT</OpenICFVersion>
<MSBuildCommunityTasksPath>$(SolutionDir)\MSBuildTasks.1.5.0.235\tools</MSBuildCommunityTasksPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<ErrorReport>prompt</ErrorReport>
Expand All @@ -59,7 +61,7 @@
<OpenICFVersion>1.5.2.0</OpenICFVersion>
</PropertyGroup>
<Import Project="$(WixTargetsPath)" />
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
<Import Project="$(MSBuildCommunityTasksPath)\MSBuild.Community.Tasks.Targets" />
<ItemGroup>
<WixExtension Include="WixUtilExtension">
<HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
Expand Down

0 comments on commit 6352f58

Please sign in to comment.