Fix duplicated assets in official build (#89188)
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Wed, 19 Jul 2023 20:52:53 +0000 (22:52 +0200)
committerGitHub <noreply@github.com>
Wed, 19 Jul 2023 20:52:53 +0000 (22:52 +0200)
The additional osx-x64 and osx-arm64 legs added for NativeAOT in https://github.com/dotnet/runtime/pull/89018 caused the `runtime.osx-*.Microsoft.DotNet.ILCompiler` and runtime.osx-*.runtime.native.System.IO.Ports` packages to be duplicated.

This change makes sure we only publish them from one leg (the CoreCLR one).

eng/pipelines/runtime-official.yml
src/installer/pkg/projects/nativeaot-packages.proj

index 4b6f183..d89a0c3 100644 (file)
@@ -117,7 +117,7 @@ extends:
           - linux_bionic_arm64
           - linux_bionic_x64
           jobParameters:
-            buildArgs: -s clr.nativeaotlibs+clr.nativeaotruntime+libs+packs -c $(_BuildConfig) /p:BuildNativeAOTRuntimePack=true
+            buildArgs: -s clr.nativeaotlibs+clr.nativeaotruntime+libs+packs -c $(_BuildConfig) /p:BuildNativeAOTRuntimePack=true /p:SkipLibrariesNativeRuntimePackages=true
             nameSuffix: AllSubsets_NativeAOT
             isOfficialBuild: ${{ variables.isOfficialBuild }}
             extraStepsTemplate: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
index b9ec2ee..aca5d44 100644 (file)
@@ -1,9 +1,9 @@
 <Project>
   <Import Sdk="Microsoft.Build.Traversal" Project="Sdk.props" />
 
-  <ItemGroup>
+  <ItemGroup Condition="'$(BuildNativeAOTRuntimePack)' != 'true'">
     <Project Include="Microsoft.DotNet.ILCompiler\Microsoft.DotNet.ILCompiler.pkgproj" />
-    <ProjectReference Condition="'$(BuildNativeAOTRuntimePack)' != 'true'" Include="@(Project)" />
+    <ProjectReference Include="@(Project)" />
     <ProjectReference Include="@(Project)" AdditionalProperties="PackageTargetRuntime=$(OutputRID)" />
   </ItemGroup>