Skip to content

Commit

Permalink
[build] Don't rebuild managed code on packaging time on Windows
Browse files Browse the repository at this point in the history
Rebuilding the managed code on Windows causes it to want to use
`msvcrt` instead of `c` when resolving `libc` p/invokes, which
will cause the libc calls to fail on Unix.

Download and extract the `Managed` artifact on packaging time, so
that the assemblies built on Unix are properly packaged and not
rebuilt.
  • Loading branch information
grendello committed Sep 7, 2021
1 parent e1269a5 commit 127cf9e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
13 changes: 13 additions & 0 deletions ci/azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,12 @@ stages:
artifactName: 'tvOS'
downloadPath: $(Build.ArtifactStagingDirectory)

- task: DownloadBuildArtifacts@0
displayName: Download managed build artifacts
inputs:
artifactName: 'Managed'
downloadPath: $(Build.ArtifactStagingDirectory)

- template: /ci/templates/extract-artifact.yaml
parameters:
displayName: Extract Linux host X86-64 build
Expand Down Expand Up @@ -503,6 +509,13 @@ stages:
archiveName: '$(MacTVOSSimX64ArchiveName)'
destinationFolder: '$(MacTVOSSimX64BuildDir)'

- template: templates/extract-artifact.yaml
parameters:
displayName: Extract Managed build
artifactName: 'Managed'
archiveName: '$(ManagedArchiveName)'
destinationFolder: '$(ManagedBuildDir)'

- powershell: |
& eng\common\Build.ps1 -restore -build -sign -pack -publish -ci -configuration $(_BuildConfig) -projects $(Build.SourcesDirectory)\Mono.Unix.sln /p:PackageAllNativeLibs=true $(_InternalBuildArgs)
displayName: Build
Expand Down
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VersionPrefix>7.0.0</VersionPrefix>
<PreReleaseVersionLabel>final</PreReleaseVersionLabel>
<PreReleaseVersionIteration>1</PreReleaseVersionIteration>
<VersionPrefix>7.0.1</VersionPrefix>
<!-- <PreReleaseVersionLabel>final</PreReleaseVersionLabel>
<PreReleaseVersionIteration>1</PreReleaseVersionIteration> -->
</PropertyGroup>
</Project>

0 comments on commit 127cf9e

Please sign in to comment.