Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

New build pipeline #1084

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,26 @@

<PropertyGroup>
<InMonoDevelopTree>False</InMonoDevelopTree>
<Net6>False</Net6>
<InMonoDevelopTree Condition="Exists('$(MSBuildThisFileDirectory)..\..\msbuild\MonoDevelop.AfterCommon.props')">True</InMonoDevelopTree>
<Net6 Condition="Exists('$(MSBuildThisFileDirectory)..\..\msbuild\Net6.props')">True</Net6>

<DotNetFrameworkTarget>net461</DotNetFrameworkTarget>
<DotNetFrameworkTarget>net472</DotNetFrameworkTarget>
<DotNetCoreTarget>netstandard2.0</DotNetCoreTarget>
<DotNetMacosTarget>net6.0-macos</DotNetMacosTarget>

<MacTargetFramework Condition="!$(Net6)">$(DotNetFrameworkTarget)</MacTargetFramework>
<MacTargetFramework Condition="$(Net6)">net6.0-macos</MacTargetFramework>
<!-- <MacTargetFramework Condition="!$(Net6)">$(DotNetFrameworkTarget)</MacTargetFramework>
<MacTargetFramework Condition="$(Net6)">$(DotNetMacosTarget)</MacTargetFramework>

<TargetFramework Condition="!$(Net6)">$(DotNetFrameworkTarget)</TargetFramework>
<TargetFramework Condition="$(Net6)">$(DotNetCoreTarget)</TargetFramework>
<TargetFramework Condition="$(Net6)">$(DotNetCoreTarget)</TargetFramework>-->

<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>

<PropertyGroup>
<XamMacPath>\Library\Frameworks\Xamarin.Mac.framework\Versions\Current\lib\x86_64\full\Xamarin.Mac.dll</XamMacPath>
<XamMacPath Condition="Exists('\Library\Frameworks\Xamarin.Mac.framework\Versions\Current\lib\64bits\full\Xamarin.Mac.dll')">\Library\Frameworks\Xamarin.Mac.framework\Versions\Current\lib\64bits\full\Xamarin.Mac.dll</XamMacPath>
<XamMacPath Condition="Exists('$(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\Framework\Xamarin.Mac\v2.0\Xamarin.Mac.dll')">$(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\Framework\Xamarin.Mac\v2.0\Xamarin.Mac.dll</XamMacPath>
<XamMacPath Condition="Exists('$(MSBuildProgramFiles32)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\Xamarin.Mac\v2.0\Xamarin.Mac.dll')">$(MSBuildProgramFiles32)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\Xamarin.Mac\v2.0\Xamarin.Mac.dll</XamMacPath>
<XamMacPath Condition="Exists('$(MSBuildToolsPath)\..\..\..\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\Xamarin.Mac\v2.0\Xamarin.Mac.dll')">$(MSBuildToolsPath)\..\..\..\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\Xamarin.Mac\v2.0\Xamarin.Mac.dll</XamMacPath>
</PropertyGroup>

</Project>
1 change: 1 addition & 0 deletions TestApps/GtkOnMacTest/GtkOnMacTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>GtkOnMacTest</RootNamespace>
<AssemblyName>GtkOnMacTest</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
1 change: 1 addition & 0 deletions TestApps/GtkOnWindowsTest/GtkOnWindowsTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>GtkOnWindowsTest</RootNamespace>
<AssemblyName>GtkOnWindowsTest</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
1 change: 1 addition & 0 deletions TestApps/GtkTest/GtkTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<OutputType>Exe</OutputType>
<RootNamespace>GtkTest</RootNamespace>
<AssemblyName>GtkTest</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
Expand Down
1 change: 1 addition & 0 deletions TestApps/MixedGtkMacTest/MixedGtkMacTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<OutputType>Exe</OutputType>
<RootNamespace>MixedGtkMacTest</RootNamespace>
<AssemblyName>MixedGtkMacTest</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
Expand Down
1 change: 1 addition & 0 deletions TestApps/Samples/Samples.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<OutputType>Library</OutputType>
<RootNamespace>Samples</RootNamespace>
<AssemblyName>Samples</AssemblyName>
<TargetFrameworks>$(DotNetCoreTarget);$(DotNetFrameworkTarget)</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
Expand Down
1 change: 1 addition & 0 deletions TestApps/XamMacTest/XamMacTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<AssemblyName>MacTest</AssemblyName>
<SuppressXamMacMigration>True</SuppressXamMacMigration>
<UseXamMacFullFramework>true</UseXamMacFullFramework>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
Expand Down
1 change: 1 addition & 0 deletions Testing/GtkTestRunner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<RootNamespace>GtkTestRunner</RootNamespace>
<AssemblyName>GtkTestRunner</AssemblyName>
<TestRunnerCommand>bin\GtkTestRunner.exe</TestRunnerCommand>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
Expand Down
2 changes: 1 addition & 1 deletion Xwt.WPF/Xwt.WPF.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472</TargetFrameworks>
<TargetFrameworks>$(DotNetFrameworkTarget)</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\xwt.snk</AssemblyOriginatorKeyFile>
Expand Down
4 changes: 2 additions & 2 deletions Xwt.XamMac/Xwt.XamMac.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<AssemblyName>Xwt.XamMac</AssemblyName>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\xwt.snk</AssemblyOriginatorKeyFile>
<TargetFramework>$(MacTargetFramework)</TargetFramework>
<TargetFrameworks>$(DotNetMacosTarget);$(DotNetFrameworkTarget)</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<DisableImplicitNamespaceImports>True</DisableImplicitNamespaceImports>
<SupportedOSPlatformVersion>10.14</SupportedOSPlatformVersion>
Expand Down Expand Up @@ -47,7 +47,7 @@
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Drawing" />
<Reference Include="Xamarin.Mac">
<Reference Include="Xamarin.Mac" Condition="'$(TargetFramework)' != '$(DotNetMacosTarget)'">
<HintPath>$(XamMacPath)</HintPath>
</Reference>
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions Xwt/Xwt.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<RootNamespace>Xwt</RootNamespace>
<AssemblyName>Xwt</AssemblyName>
<DisableImplicitNamespaceImports>True</DisableImplicitNamespaceImports>
<TargetFrameworks>$(DotNetCoreTarget);$(DotNetFrameworkTarget)</TargetFrameworks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>full</DebugType>
Expand Down
90 changes: 90 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
trigger:
- main

pool:
vmImage: 'windows-latest'

variables:
- name: BuildConfiguration
value: Debug
- name: TeamName
value: XWT

steps:

#- task: MicroBuildSigningPlugin@3
# displayName: 'Install Signing Plugin'
# inputs:
# signType: 'Real'
# azureSubscription: 'MicroBuild Signing Task (DevDiv)'
# env:
# SYSTEM_ACCESSTOKEN: $(System.AccessToken)

- task: UseDotNet@2
displayName: 'Install .NET 3.1'
inputs:
packageType: 'sdk'
version: '3.1.413'

- task: UseDotNet@2
displayName: 'Install .NET 6'
inputs:
packageType: 'sdk'
version: '6.0.100'

- task: DotNetCoreCLI@2
displayName: 'Install macos workload'
inputs:
command: 'custom'
custom: 'workload'
arguments: 'install macos'

- task: DotNetCoreCLI@2
displayName: 'Build solution Xwt.sln'
inputs:
command: build
arguments: '/p:Configuration=$(BuildConfiguration)'

- task: DotNetCoreCLI@2
displayName: 'Generate packages'
inputs:
command: custom
custom: pack
projects: Xwt.sln
arguments: '/p:Configuration=$(BuildConfiguration) -o:bin'
nobuild: true
workingDirectory: $(Build.SourcesDirectory)

- task: Bash@3
displayName: 'Generate package file list'
inputs:
targetType: 'inline'
script: |
echo "<filelist>" > $(build.sourcesdirectory)/bin/files.xml
echo " <certificate certnumbers='401405'>" >> $(build.sourcesdirectory)/bin/files.xml
find $(build.sourcesdirectory)/bin -name "*.nupkg" -exec echo " <file srcpath='{}' dstpath='{}'></file>" \; >> $(build.sourcesdirectory)/bin/files.xml
echo " </certificate>" >> $(build.sourcesdirectory)/bin/files.xml
echo "</filelist>" >> $(build.sourcesdirectory)/bin/files.xml
workingDirectory: '$(build.sourcesdirectory)/bin'

#- task: DotNetCoreCLI@2
# displayName: 'Sign packages'
# inputs:
# command: 'custom'
# custom: '$(MBSIGN_APPFOLDER)/ddsignfiles.dll'
# arguments: '/filelist:$(build.sourcesdirectory)/bin/files.xml'

- task: CopyFiles@1
displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
inputs:
SourceFolder: '$(build.sourcesdirectory)/bin'
Contents: '*.nupkg'
TargetFolder: '$(build.artifactstagingdirectory)'
condition: succeededOrFailed()

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
condition: succeededOrFailed()