Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try to fix tests in ci by building the needed apidefinitions.
Browse files Browse the repository at this point in the history
mandel-macaque committed Jan 21, 2025
1 parent 9c2815b commit 8705fb3
Showing 2 changed files with 54 additions and 43 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using System.Collections.Immutable;
using System.Runtime.CompilerServices;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
Original file line number Diff line number Diff line change
@@ -1,50 +1,62 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net$(BundledNETCoreAppTargetFrameworkVersion)</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net$(BundledNETCoreAppTargetFrameworkVersion)</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
</ItemGroup>
<!-- Ensure we do have the api-definitions -->
<RootDirectory>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\..\..'))</RootDirectory>
<DotnetBuildDirectory>$(RootDirectory)/src/build/dotnet</DotnetBuildDirectory>
</PropertyGroup>

<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.2"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0"/>
<PackageReference Include="xunit" Version="2.9.0"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2"/>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\src\rgen\Microsoft.Macios.Transformer\Microsoft.Macios.Transformer.csproj" />
<ProjectReference Include="..\..\..\src\rgen\Microsoft.Macios.Binding.Common\Microsoft.Macios.Binding.Common.csproj" />
</ItemGroup>
<ItemGroup>
<Using Include="Xunit"/>
</ItemGroup>

<ItemGroup>
<Compile Include="..\..\common\Configuration.cs" >
<Link>external\Configuration.cs</Link>
</Compile>
<Compile Include="..\..\common\ConfigurationXUnit.cs" >
<Link>external\ConfigurationXUnit.cs</Link>
</Compile>
<Compile Include="..\..\common\Profile.cs">
<Link>external\Profile.cs</Link>
</Compile>
<Compile Include="..\..\common\ExecutionHelper.cs">
<Link>external\ExecutionHelper.cs</Link>
</Compile>
<Compile Include="..\..\..\tools\common\StringUtils.cs">
<Link>external\StringUtils.cs</Link>
</Compile>
<Compile Include="..\..\..\tools\common\Execution.cs">
<Link>external\Execution.cs</Link>
</Compile>
<Compile Include="..\..\mtouch\Cache.cs">
<Link>external\Cache.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\rgen\Microsoft.Macios.Transformer\Microsoft.Macios.Transformer.csproj"/>
<ProjectReference Include="..\..\..\src\rgen\Microsoft.Macios.Binding.Common\Microsoft.Macios.Binding.Common.csproj"/>
</ItemGroup>

<ItemGroup>
<Compile Include="..\..\common\Configuration.cs">
<Link>external\Configuration.cs</Link>
</Compile>
<Compile Include="..\..\common\ConfigurationXUnit.cs">
<Link>external\ConfigurationXUnit.cs</Link>
</Compile>
<Compile Include="..\..\common\Profile.cs">
<Link>external\Profile.cs</Link>
</Compile>
<Compile Include="..\..\common\ExecutionHelper.cs">
<Link>external\ExecutionHelper.cs</Link>
</Compile>
<Compile Include="..\..\..\tools\common\StringUtils.cs">
<Link>external\StringUtils.cs</Link>
</Compile>
<Compile Include="..\..\..\tools\common\Execution.cs">
<Link>external\Execution.cs</Link>
</Compile>
<Compile Include="..\..\mtouch\Cache.cs">
<Link>external\Cache.cs</Link>
</Compile>
</ItemGroup>

<Target Name="BuildTestLibraries" BeforeTargets="BeforeBuild">
<Message Text="Processing platform: %(Platform.Identity)" />
<Exec Command="make -j8 -C $(RootDirectory) $(DotnetBuildDirectory)/ios/apidefinition-ios.dll"/>
<Exec Command="make -j8 -C $(RootDirectory) $(DotnetBuildDirectory)/macos/apidefinition-macos.dll"/>
<Exec Command="make -j8 -C $(RootDirectory) $(DotnetBuildDirectory)/tvos/apidefinition-tvos.dll"/>
<Exec Command="make -j8 -C $(RootDirectory) $(DotnetBuildDirectory)/maccatalyst/apidefinition-maccatalyst.dll"/>
</Target>

</Project>

0 comments on commit 8705fb3

Please sign in to comment.