Skip to content
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

Custom Host For Linux/Mac #4152

Open
wants to merge 28 commits into
base: feature/oop-host
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a4ddd76
addressing comments and initial changes for generating artifacts
aishwaryabh Nov 7, 2024
4d2fe13
osx change
aishwaryabh Nov 7, 2024
335be05
deleting extra directory
aishwaryabh Nov 7, 2024
3754409
change order of extract directories
aishwaryabh Nov 7, 2024
4a6d9e7
logging artifact directory
aishwaryabh Nov 7, 2024
e5e2162
skipping flakey e2e test
aishwaryabh Nov 7, 2024
5676716
fixed version bug
aishwaryabh Nov 7, 2024
352eef7
addressing comments
aishwaryabh Nov 7, 2024
6c2bdb6
core tools host windows should still sign
aishwaryabh Nov 7, 2024
5885c82
adding exe to comment
aishwaryabh Nov 7, 2024
a34407d
removing self-contained arg
aishwaryabh Nov 7, 2024
60b0d5d
addding logging statement
aishwaryabh Nov 7, 2024
8a33b96
adding assembly path logging
aishwaryabh Nov 8, 2024
ad4f550
removing not needed nethost logging
aishwaryabh Nov 8, 2024
81449fc
more logging!
aishwaryabh Nov 8, 2024
0cf6a86
adding signing back
aishwaryabh Nov 20, 2024
edf988f
removing sign step
aishwaryabh Nov 20, 2024
54f3c76
adding path var
aishwaryabh Nov 20, 2024
bfc780f
adding variable to path
aishwaryabh Nov 20, 2024
22ad754
install net8
aishwaryabh Nov 21, 2024
6cce9b3
seperating net9 task to seperate job
aishwaryabh Nov 21, 2024
28d8d33
forgot quote
aishwaryabh Nov 21, 2024
5261a31
add core tools host
aishwaryabh Nov 21, 2024
a3522ea
adding mac signing
aishwaryabh Nov 21, 2024
e7c4b37
changing mac folder back
aishwaryabh Nov 21, 2024
ecb9206
changing signing path back
aishwaryabh Nov 21, 2024
eb31c00
trying 3rd party sign
aishwaryabh Nov 21, 2024
0c97b8e
trying to notarize
aishwaryabh Nov 21, 2024
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
183 changes: 116 additions & 67 deletions eng/ci/templates/official/jobs/build-core-tools-host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,89 +35,138 @@ jobs:
arguments: -c Release -r win-arm64 -o $(Build.SourcesDirectory)/pkg_output/windows/win-arm64 --self-contained
workingDirectory: $(Build.SourcesDirectory)/host/src/CoreToolsHost

- template: ci/sign-files.yml@eng
parameters:
displayName: 'Authenticode signing (dll) (win-arm64)'
folderPath: '$(Build.SourcesDirectory)/pkg_output/windows/win-arm64'
pattern: '*.dll, *.exe'
signType: inline
inlineOperation: |
[
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolSign",
"Parameters": {
"OpusName": "Microsoft",
"OpusInfo": "http://www.microsoft.com",
"FileDigest": "/fd \"SHA256\"",
"PageHash": "/NPH",
"TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
},
"ToolName": "sign",
"ToolVersion": "1.0"
},
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolVerify",
"Parameters": {},
"ToolName": "sign",
"ToolVersion": "1.0"
}
]

- template: ci/sign-files.yml@eng
parameters:
displayName: 'Authenticode signing (dll) (win-x64)'
folderPath: '$(Build.SourcesDirectory)/pkg_output/windows/win-x64'
pattern: '*.dll, *.exe'
signType: inline
inlineOperation: |
[
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolSign",
"Parameters": {
"OpusName": "Microsoft",
"OpusInfo": "http://www.microsoft.com",
"FileDigest": "/fd \"SHA256\"",
"PageHash": "/NPH",
"TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
},
"ToolName": "sign",
"ToolVersion": "1.0"
},
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolVerify",
"Parameters": {},
"ToolName": "sign",
"ToolVersion": "1.0"
}
]

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

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

TargetFolder: $(Build.ArtifactStagingDirectory)/_coreToolsHostPackages/win-arm64

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

- job: BuildCoreToolsHostLinux
displayName: '[Linux] Build CoreToolsHost'
pool:
name: 1es-pool-azfunc
image: 1es-ubuntu-22.04
os: linux

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

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

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

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

- 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: UseDotNet@2
inputs:
version: 6.x
displayName: Install .NET 6

- 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 --self-contained
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 --self-contained
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)/_coreToolsHostPackagesWindows
artifact: drop-coretools-host-windows
path: $(Build.ArtifactStagingDirectory)/_coreToolsHostPackages
artifact: drop-coretools-host-osx
Loading
Loading