Skip to content

Fix Alpine SB legs #19623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 1, 2024
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
2 changes: 0 additions & 2 deletions eng/pipelines/templates/stages/vmr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ stages:
artifactsRid: alpine.3.19-x64
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.alpine319Container }}
targetOS: linux-musl
buildFromArchive: false # 🚫
buildSourceOnly: true # ✅
enablePoison: true # ✅
Expand All @@ -144,7 +143,6 @@ stages:
architecture: x64
pool: ${{ parameters.pool_Linux }}
container: ${{ variables.alpine319Container }}
targetOS: linux-musl
buildFromArchive: false # 🚫
buildSourceOnly: true # ✅
enablePoison: false # 🚫
Expand Down
2 changes: 1 addition & 1 deletion src/SourceBuild/content/test/tests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<!-- Skip scenario tests if the portable OS (determined from the host machine) is different from the target OS
since the tests require the ability to execute the built SDK. An example of where this would be disabled is
cross-build of using Mariner to build for Alpine (linux vs linux-musl). -->
<_RunScenarioTests Condition="'$(BuildOS)' != 'windows' and '$(__PortableTargetOS.ToLowerInvariant())' != '$(TargetOS.ToLowerInvariant())'">false</_RunScenarioTests>
<_RunScenarioTests Condition="'$(BuildOS)' != 'windows' and '$(DotNetBuildSourceOnly)' == 'false' and '$(__PortableTargetOS.ToLowerInvariant())' != '$(TargetOS.ToLowerInvariant())'">false</_RunScenarioTests>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can someone help me understand why __PortableTargetOS is initialized to linux-musl on alpine while targetOS is linux? I'm trying to understand if the PortableTargetOS comparison against TargetOS is correct.

Given this is blocking. We should merge and circle back if necessary.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you asking in the context of SB?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you asking in the context of SB?

No, in general.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's look at an example. In UB cross build scenarios of building Alpine from Mariner, __PortableTargetOS is set to linux here: https://github.com/dotnet/arcade/blob/be933308b9024d798a9a22c0b8f3c8e3616ffbd8/eng/common/native/init-distro-rid.sh#L111

And TargetOS is set to linux-musl as a build property here:

extraBuildProperties="$extraBuildProperties /p:TargetOS=${{ parameters.targetOS }}"

This build property doesn't impact the value of targetOS in the init script that __PortableTargetOS is derived from.

/cc @ViktorHofer

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we ever set DotNetBuildSourceOnly to false. This should probably be changed to '$(DotNetBuildSourceOnly)' != 'true'".


<!-- The scenario tests are not supported when unofficial build versioning is used. -->
<_RunScenarioTests Condition="'$(UseOfficialBuildVersioning)' == 'false'">false</_RunScenarioTests>
Expand Down