Skip to content

Commit

Permalink
remove custom host mac
Browse files Browse the repository at this point in the history
  • Loading branch information
aishwaryabh committed Nov 25, 2024
1 parent 0c97b8e commit a7f65ef
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 138 deletions.
130 changes: 1 addition & 129 deletions eng/ci/templates/official/jobs/build-core-tools-host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,132 +225,4 @@ jobs:
outputs:
- output: pipelineArtifact
path: $(Build.ArtifactStagingDirectory)/_coreToolsHostPackages
artifact: drop-coretools-host-linux-signed

- job: BuildCoreToolsHostMac
displayName: '[Mac] Build CoreToolsHost'
pool:
name: Azure Pipelines
image: 'macOS-latest'
os: macOS

steps:
- task: UseDotNet@2
inputs:
version: 9.x
includePreviewVersions: true
displayName: Install .NET 9

- task: DotnetCoreCLI@2
displayName: Dotnet Publish (osx-x64)
inputs:
command: publish
publishWebProjects: false
zipAfterPublish: false
arguments: -c Release -r osx-x64 -o $(Build.SourcesDirectory)/pkg_output/osx/osx-x64
workingDirectory: $(Build.SourcesDirectory)/host/src/CoreToolsHost

- task: DotnetCoreCLI@2
displayName: Dotnet Publish (osx-arm64)
inputs:
command: publish
publishWebProjects: false
zipAfterPublish: false
arguments: -c Release -r osx-arm64 -o $(Build.SourcesDirectory)/pkg_output/osx/osx-arm64
workingDirectory: $(Build.SourcesDirectory)/host/src/CoreToolsHost

- task: CopyFiles@2
displayName: Copy files (osx-x64)
inputs:
SourceFolder: $(Build.SourcesDirectory)/pkg_output/osx/osx-x64
# Publish output will include many other files. We only need func & nethost.dll
Contents: |
func
libnethost.dylib
libnethost.a
TargetFolder: $(Build.ArtifactStagingDirectory)/_coreToolsHostPackages/osx-x64

- task: CopyFiles@2
displayName: Copy files (osx-arm64)
inputs:
SourceFolder: $(Build.SourcesDirectory)/pkg_output/osx/osx-arm64
# Publish output will include many other files. We only need func & nethost.dll
Contents: |
func
libnethost.dylib
libnethost.a
TargetFolder: $(Build.ArtifactStagingDirectory)/_coreToolsHostPackages/osx-arm64

templateContext:
outputParentDirectory: $(Build.ArtifactStagingDirectory)
outputs:
- output: pipelineArtifact
path: $(Build.ArtifactStagingDirectory)/_coreToolsHostPackages
artifact: drop-coretools-host-osx

- job: SignCoreToolsHostMac
displayName: '[Mac] Sign CoreToolsHost'
dependsOn: BuildCoreToolsHostMac
pool:
name: Azure Pipelines
image: 'macOS-latest'
os: macOS

steps:
- task: UseDotNet@2
inputs:
version: 8.x
displayName: Install .NET 8

- task: DownloadPipelineArtifact@2
inputs:
artifact: drop-coretools-host-osx
path: $(Build.SourcesDirectory)/drop-coretools-host-osx

- template: ci/sign-files.yml@eng
parameters:
displayName: 'Sign'
folderPath: '$(Build.SourcesDirectory)/drop-coretools-host-osx'
pattern: 'func, libnethost.dylib, libnethost.a'
signType: inline
inlineOperation: |
[
{
"KeyCode": "CP-401337-Apple",
"OperationCode": "MacAppNotarize",
"ToolName": "sign",
"ToolVersion": "1.0",
"Parameters": {
"BundleId": "com.microsoft.esrp"
}
}
]
- task: CopyFiles@2
displayName: Copy files (osx-x64)
inputs:
SourceFolder: $(Build.SourcesDirectory)/drop-coretools-host-osx/osx-x64
# Publish output will include many other files. We only need func & nethost.dll
Contents: |
func
libnethost.dylib
libnethost.a
TargetFolder: $(Build.ArtifactStagingDirectory)/_coreToolsHostPackages/osx-x64

- task: CopyFiles@2
displayName: Copy files (osx-arm64)
inputs:
SourceFolder: $(Build.SourcesDirectory)/drop-coretools-host-osx/osx-arm64
# Publish output will include many other files. We only need func & nethost.dll
Contents: |
func
libnethost.dylib
libnethost.a
TargetFolder: $(Build.ArtifactStagingDirectory)/_coreToolsHostPackages/osx-arm64

templateContext:
outputParentDirectory: $(Build.ArtifactStagingDirectory)
outputs:
- output: pipelineArtifact
path: $(Build.ArtifactStagingDirectory)/_coreToolsHostPackages
artifact: drop-coretools-host-osx
artifact: drop-coretools-host-linux-signed
9 changes: 1 addition & 8 deletions src/Azure.Functions.ArtifactAssembler/ArtifactAssembler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ internal sealed class ArtifactAssembler
{
{ "Azure.Functions.Cli.min.win-x64", "win-x64" },
{ "Azure.Functions.Cli.min.win-arm64", "win-arm64" },
{ "Azure.Functions.Cli.linux-x64", "linux-x64" },
{ "Azure.Functions.Cli.osx-x64", "osx-x64" },
{ "Azure.Functions.Cli.osx-arm64", "osx-arm64" }
{ "Azure.Functions.Cli.linux-x64", "linux-x64" }
};

/// <summary>
Expand All @@ -43,7 +41,6 @@ internal sealed class ArtifactAssembler
private readonly string _inProc8ArtifactName;
private readonly string _coreToolsHostWindowsArtifactName;
private readonly string _coreToolsHostLinuxArtifactName;
private readonly string _coreToolsHostMacArtifactName;
private readonly string _outOfProcArtifactName;
private readonly string _rootWorkingDirectory;
private readonly string _stagingDirectory;
Expand All @@ -63,7 +60,6 @@ internal ArtifactAssembler(string rootWorkingDirectory)
_inProc8ArtifactName = GetRequiredEnvironmentVariable(EnvironmentVariables.InProc8ArtifactName);
_coreToolsHostWindowsArtifactName = GetRequiredEnvironmentVariable(EnvironmentVariables.CoreToolsHostWindowsArtifactName);
_coreToolsHostLinuxArtifactName = GetRequiredEnvironmentVariable(EnvironmentVariables.CoreToolsHostLinuxArtifactName);
_coreToolsHostMacArtifactName = GetRequiredEnvironmentVariable(EnvironmentVariables.CoreToolsHostOsxArtifactName);
_outOfProcArtifactName = GetRequiredEnvironmentVariable(EnvironmentVariables.OutOfProcArtifactName);

_rootWorkingDirectory = rootWorkingDirectory;
Expand Down Expand Up @@ -95,14 +91,12 @@ private async Task ExtractDownloadedArtifactsAsync()

var coreToolsHostWindowsArtifactDirPath = Path.Combine(coreToolsHostArtifactDownloadDir, _coreToolsHostWindowsArtifactName);
var coreToolsHostLinuxArtifactDirPath = Path.Combine(coreToolsHostArtifactDownloadDir, _coreToolsHostLinuxArtifactName);
var coreToolsHostMacArtifactDirPath = Path.Combine(coreToolsHostArtifactDownloadDir, _coreToolsHostMacArtifactName);

EnsureArtifactDirectoryExist(inProc6ArtifactDirPath);
EnsureArtifactDirectoryExist(inProc8ArtifactDirPath);
EnsureArtifactDirectoryExist(outOfProcArtifactDirPath);
EnsureArtifactDirectoryExist(coreToolsHostWindowsArtifactDirPath);
EnsureArtifactDirectoryExist(coreToolsHostLinuxArtifactDirPath);
EnsureArtifactDirectoryExist(coreToolsHostMacArtifactDirPath);

_inProc6ExtractedRootDir = await MoveArtifactsToStagingDirectoryAndExtractIfNeeded(inProc6ArtifactDirPath, Path.Combine(_stagingDirectory, Constants.InProc6DirectoryName));
_inProc8ExtractedRootDir = await MoveArtifactsToStagingDirectoryAndExtractIfNeeded(inProc8ArtifactDirPath, Path.Combine(_stagingDirectory, Constants.InProc8DirectoryName));
Expand All @@ -111,7 +105,6 @@ private async Task ExtractDownloadedArtifactsAsync()

_coreToolsHostExtractedRootDir = await MoveArtifactsToStagingDirectoryAndExtractIfNeeded(coreToolsHostWindowsArtifactDirPath, Path.Combine(_stagingDirectory, Constants.CoreToolsHostDirectoryName));
await MoveArtifactsToStagingDirectoryAndExtractIfNeeded(coreToolsHostLinuxArtifactDirPath, Path.Combine(_stagingDirectory, Constants.CoreToolsHostDirectoryName));
await MoveArtifactsToStagingDirectoryAndExtractIfNeeded(coreToolsHostMacArtifactDirPath, Path.Combine(_stagingDirectory, Constants.CoreToolsHostDirectoryName));
Directory.Delete(coreToolsHostArtifactDownloadDir, true);

_outOfProcExtractedRootDir = await MoveArtifactsToStagingDirectoryAndExtractIfNeeded(outOfProcArtifactDirPath, Path.Combine(_stagingDirectory, Constants.OutOfProcDirectoryName));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ internal static class EnvironmentVariables
internal const string InProc8ArtifactName = "IN_PROC8_ARTIFACT_NAME";
internal const string CoreToolsHostWindowsArtifactName = "CORETOOLS_HOST_WINDOWS_ARTIFACT_NAME";
internal const string CoreToolsHostLinuxArtifactName = "CORETOOLS_HOST_LINUX_ARTIFACT_NAME";
internal const string CoreToolsHostOsxArtifactName = "CORETOOLS_HOST_OSX_ARTIFACT_NAME";
internal const string OutOfProcArtifactName = "OUT_OF_PROC_ARTIFACT_NAME";
}
}

0 comments on commit a7f65ef

Please sign in to comment.