Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .config/1espt/PipelineAutobaseliningConfig.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 1ES Pipeline Template auto-baselining configuration.
# Pipeline IDs will be populated automatically once pipelines are registered in Azure DevOps.
#
# See 1ES Pipeline Templates SDL analysis documentation for details.
pipelines: {}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ obj
/packages/
.vs/
*.nupkg
artifacts/
.packages/
28 changes: 18 additions & 10 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
<Project>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<RepositoryUrl>https://github.com/dotnet/macios-devtools</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>

<PropertyGroup>
<BaseOutputPath>$(MSBuildThisFileDirectory)bin\</BaseOutputPath>
<ToolOutputFullPath>$(BaseOutputPath)$(Configuration)\</ToolOutputFullPath>
<TestOutputFullPath>$(BaseOutputPath)Test$(Configuration)\</TestOutputFullPath>
</PropertyGroup>
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />

<PropertyGroup>
<Copyright>$(CopyrightNetFoundation)</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/dotnet/macios-devtools</PackageProjectUrl>
<RepositoryUrl>https://github.com/dotnet/macios-devtools</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType>embedded</DebugType>
<DebugSymbols>true</DebugSymbols>
<LangVersion>latest</LangVersion>
<!-- Set to true for packages that ship publicly on NuGet.org -->
<IsShipping>true</IsShipping>
<!-- Suppress NU1507: official builds inject internal feeds not covered by packageSourceMapping -->
<NoWarn>$(NoWarn);NU1507</NoWarn>
</PropertyGroup>

</Project>
27 changes: 13 additions & 14 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="GitInfo" Version="2.1.2" PrivateAssets="all" />
</ItemGroup>
<PropertyGroup>
<GitThisAssembly>false</GitThisAssembly>
<GitDefaultBranch>main</GitDefaultBranch>
</PropertyGroup>
<Project>

<Target Name="SetVersion" BeforeTargets="GetAssemblyVersion;GetPackageVersion;GenerateNuspec" DependsOnTargets="GitVersion">
<PropertyGroup>
<Version>$(GitSemVerMajor).$(GitSemVerMinor).$(GitSemVerPatch)</Version>
<PackageVersion>$(Version)$(PackageVersionSuffix)</PackageVersion>
<InformationalVersion>$(Version); git-rev-head:$(GitCommit); git-branch:$(GitBranch)</InformationalVersion>
</PropertyGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />

<!-- Workaround for dotnet/arcade#16611: WiX 5 tools path missing platform subdirectories.
Remove once the upstream fix is available. -->
<Target Name="CreateWixToolsPathWorkaround"
BeforeTargets="Build"
Condition="Exists('$(RepoRoot).packages\microsoft.wixtoolset.sdk\$(MicrosoftWixToolsetSdkVersion)')">
<MakeDir Directories="$(RepoRoot).packages\microsoft.wixtoolset.sdk\$(MicrosoftWixToolsetSdkVersion)\tools\net472\x64"
Condition="!Exists('$(RepoRoot).packages\microsoft.wixtoolset.sdk\$(MicrosoftWixToolsetSdkVersion)\tools\net472\x64')" />
<MakeDir Directories="$(RepoRoot).packages\microsoft.wixtoolset.sdk\$(MicrosoftWixToolsetSdkVersion)\tools\net472\arm64"
Condition="!Exists('$(RepoRoot).packages\microsoft.wixtoolset.sdk\$(MicrosoftWixToolsetSdkVersion)\tools\net472\arm64')" />
</Target>

<Import
Project="$([System.IO.Path]::GetDirectoryName($(MSBuildThisFileDirectory))).override.targets"
Condition=" Exists('$([System.IO.Path]::GetDirectoryName($(MSBuildThisFileDirectory))).override.targets') "
/>

</Project>
1 change: 0 additions & 1 deletion GitInfo.txt

This file was deleted.

2 changes: 0 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
Xamarin SDK

The MIT License (MIT)

Copyright (c) .NET Foundation Contributors
Expand Down
16 changes: 16 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
<packageSources>
<clear />
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
<add key="dotnet10" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet10/nuget/v3/index.json" />
</packageSources>
<disabledPackageSources>
<clear />
</disabledPackageSources>
</configuration>
4 changes: 2 additions & 2 deletions Xamarin.MacDev.sln
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Global
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{CC3D9353-20C4-467A-8522-A9DED6F0C753}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CC3D9353-20C4-467A-8522-A9DED6F0C753}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CC3D9353-20C4-467A-8522-A9DED6F0C753}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{CC3D9353-20C4-467A-8522-A9DED6F0C753}.Release|Any CPU.Build.0 = Debug|Any CPU
{CC3D9353-20C4-467A-8522-A9DED6F0C753}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CC3D9353-20C4-467A-8522-A9DED6F0C753}.Release|Any CPU.Build.0 = Release|Any CPU
{39DBAAF8-57A5-49A3-9E9A-11B545906AED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{39DBAAF8-57A5-49A3-9E9A-11B545906AED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{39DBAAF8-57A5-49A3-9E9A-11B545906AED}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
2 changes: 1 addition & 1 deletion Xamarin.MacDev/MobileProvisionIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -754,5 +754,5 @@ public static IList<MobileProvision> GetMobileProvisions (MobileProvisionPlatfor
}
}

#endregion MobileProvisionIndex
#endregion MobileProvisionIndex
}
44 changes: 6 additions & 38 deletions Xamarin.MacDev/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,46 +1,14 @@
//
// AssemblyInfo.cs
//
// Author: Jeffrey Stedfast <jeff@xamarin.com>
//
// Copyright (c) 2013 Xamarin Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using System.Reflection;
using System.Runtime.CompilerServices;

// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle ("Xamarin.Apple.Tools.MaciOS")]
[assembly: AssemblyDescription ("")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("Xamarin Inc.")]
[assembly: AssemblyProduct ("")]
[assembly: AssemblyCopyright ("Xamarin Inc.")]
[assembly: AssemblyTrademark ("Xamarin Inc.")]
[assembly: AssemblyCompany ("Microsoft Corporation")]
[assembly: AssemblyProduct ("Xamarin.Apple.Tools.MaciOS")]
[assembly: AssemblyCopyright ("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyTrademark ("")]
[assembly: AssemblyCulture ("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion ("1.0.0.0")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]
20 changes: 2 additions & 18 deletions Xamarin.MacDev/Xamarin.MacDev.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<LangVersion>latest</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
</PropertyGroup>

<!-- NuGet Package Properties -->
Expand All @@ -24,10 +25,6 @@
</PropertyGroup>

<!-- Output Path -->
<PropertyGroup>
<OutputPath>$(ToolOutputFullPath)</OutputPath>
</PropertyGroup>

<!-- Trimming/AOT for non-netstandard targets -->
<PropertyGroup Condition=" '$(TargetFramework)' != 'netstandard2.0' ">
<IsTrimmable>true</IsTrimmable>
Expand All @@ -42,19 +39,6 @@
<Compile Remove="NullableAttributes.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MicroBuild.Core" Version="0.3.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="System.Text.Json" Version="9.0.4" Condition=" '$(TargetFramework)' == 'netstandard2.0' " />
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonVersion)" Condition=" '$(TargetFramework)' == 'netstandard2.0' " />
</ItemGroup>

<Target Name="GetFilesToSign" BeforeTargets="SignFiles" Condition=" '$(Configuration)' == 'Release' ">
<ItemGroup>
<FilesToSign Include="$(OutDir)\$(AssemblyName).dll">
<Authenticode>Microsoft400</Authenticode>
</FilesToSign>
</ItemGroup>
</Target>
</Project>
157 changes: 55 additions & 102 deletions azure-pipelines.yaml
Original file line number Diff line number Diff line change
@@ -1,109 +1,62 @@
name: macios-devtools $(Rev:r)

trigger:
- main
- release/*
batch: true
branches:
include:
- main
- release/*

pr:
- main
- release/*
branches:
include:
- main
- release/*

variables:
- name: DotNetCoreVersion
value: 10.0.x

jobs:
- job: build
displayName: Build and Test
timeoutInMinutes: 60
strategy:
matrix:
macOS:
vmImage: macOS-15
windows:
vmImage: windows-2022
pool:
vmImage: $(vmImage)
workspace:
clean: all
steps:
- checkout: self
clean: true
fetchDepth: 0

- task: UseDotNet@2
displayName: Use .NET Core $(DotNetCoreVersion)
inputs:
version: $(DotNetCoreVersion)

- task: DotNetCoreCLI@2
displayName: Build Xamarin.MacDev
inputs:
command: build
projects: Xamarin.MacDev/Xamarin.MacDev.csproj
arguments: -c Release -bl:$(Build.ArtifactStagingDirectory)/build.binlog

- task: DotNetCoreCLI@2
displayName: Run Tests (Windows)
inputs:
command: test
projects: tests/tests.csproj
publishTestResults: false
arguments: -c Release --logger "console;verbosity=detailed" --logger trx --results-directory $(Build.ArtifactStagingDirectory)/test-results
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))

- task: PublishTestResults@2
displayName: Publish Test Results (Windows)
inputs:
testResultsFormat: VSTest
testResultsFiles: '**/*.trx'
searchFolder: $(Build.ArtifactStagingDirectory)/test-results
condition: and(succeededOrFailed(), eq(variables['Agent.OS'], 'Windows_NT'))

- task: DotNetCoreCLI@2
displayName: Run Tests (macOS)
inputs:
command: test
projects: tests/tests.csproj
publishTestResults: false
arguments: -c Release -f net10.0 --logger "console;verbosity=detailed" --logger trx --results-directory $(Build.ArtifactStagingDirectory)/test-results
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))

- task: PublishTestResults@2
displayName: Publish Test Results (macOS)
inputs:
testResultsFormat: VSTest
testResultsFiles: '**/*.trx'
searchFolder: $(Build.ArtifactStagingDirectory)/test-results
condition: and(succeededOrFailed(), eq(variables['Agent.OS'], 'Darwin'))

- powershell: |
$hashOfLastVersionChange = & "git" "log" "--follow" "-1" "--pretty=%H" "nuget.version"
$commitsSinceVersionChange = & "git" "rev-list" "--count" "$hashOfLastVersionChange..HEAD"
$majorMinor = Get-Content "nuget.version"
$version = "$majorMinor.$commitsSinceVersionChange"
Write-Host "##vso[task.setvariable variable=xmd.nuget.version]$version"
displayName: Calculate Version (Windows)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))

- task: DotNetCoreCLI@2
displayName: Build NuGet (Windows)
inputs:
command: custom
projects: Xamarin.MacDev/Xamarin.MacDev.csproj
custom: pack
arguments: -c Release --no-build -p:PackageVersion=$(xmd.nuget.version) -p:PackageOutputPath=$(Build.ArtifactStagingDirectory)/packages -bl:$(Build.ArtifactStagingDirectory)/pack.binlog
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))

- task: PublishPipelineArtifact@1
displayName: Upload Build Output
inputs:
path: bin/Release
artifactName: Output - $(System.JobName)

- task: PublishPipelineArtifact@1
displayName: Upload Artifacts
inputs:
path: $(Build.ArtifactStagingDirectory)
artifactName: Artifacts - $(System.JobName)
condition: always()
- name: _TeamName
value: macios-devtools-official
- name: _BuildConfig
value: Release

stages:
- stage: build
displayName: Build
jobs:
- template: /eng/common/templates/jobs/jobs.yml
parameters:
enablePublishBuildArtifacts: true
enablePublishTestResults: true
enableTelemetry: true
jobs:
- job: Windows
pool:
name: NetCore-Public
demands: ImageOverride -equals windows.vs2022.amd64.open
steps:
- script: eng\common\cibuild.cmd -configuration $(_BuildConfig) -prepareMachine
displayName: Build and Test

- job: macOS
pool:
vmImage: macOS-15
steps:
- script: eng/common/build.sh --restore --build --pack --configuration $(_BuildConfig) --prepareMachine --ci
displayName: Build

- script: >-
dotnet test tests/tests.csproj
--configuration $(_BuildConfig)
--framework net10.0
--logger "console;verbosity=detailed"
--logger trx
--results-directory $(Build.ArtifactStagingDirectory)/test-results
displayName: Run Tests (net10.0)

- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testResultsFormat: VSTest
testResultsFiles: '**/*.trx'
searchFolder: $(Build.ArtifactStagingDirectory)/test-results
condition: succeededOrFailed()
5 changes: 5 additions & 0 deletions eng/Publishing.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<PublishingVersion>3</PublishingVersion>
</PropertyGroup>
</Project>
2 changes: 2 additions & 0 deletions eng/SignCheckExclusionsFile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
;; Exclusions for SignCheck. Corresponds to info in Signing.props.
;; Format: https://github.com/dotnet/arcade/blob/397316e195639450b6c76bfeb9823b40bee72d6d/src/SignCheck/Microsoft.SignCheck/Verification/Exclusion.cs#L23-L35
Loading