Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
713daa4
Added Garnet.Worker files to win-x64-based-readytorun.zip under the "…
darrenge Mar 5, 2025
935c2b6
Fixed bug in step that deleted runtimes
darrenge Mar 5, 2025
78de815
Setting build macvhine to Windows to windows speicific projects (Garn…
darrenge Mar 6, 2025
7e4b38d
GarnetWorker project not found in Publish task only and only in ADO p…
darrenge Mar 6, 2025
b21b489
More case sensitive issues that only fail on ADO
darrenge Mar 6, 2025
da6d11a
Accidentally put wrong files in
darrenge Mar 6, 2025
993cf27
Move build machine back to Ubuntu
darrenge Mar 6, 2025
7d101f1
Trying specify individual GarnetWorker as wild card not working
darrenge Mar 6, 2025
5c07286
Trying to remove the build and see if publish handles it properly
darrenge Mar 7, 2025
0849e35
Trying more verbose build so can get info
darrenge Mar 7, 2025
0137032
Setting OS version to Windows to see if that will help
darrenge Mar 7, 2025
0c54cf8
Trying to debug why it is failing again
darrenge Mar 7, 2025
0c810a5
Putting the Garnet.Worker back in the publishing
darrenge Mar 8, 2025
0c57d93
Removed debug info and put pool image back to default (ubuntu)
darrenge Mar 10, 2025
a7d4f5b
Does require Windows as the OS ... putting it back
darrenge Mar 10, 2025
22959e9
Merge branch 'main' into darrenge/GarnetWorkerRelease
darrenge Mar 10, 2025
c16955d
Merge branch 'main' into darrenge/GarnetWorkerRelease
darrenge Mar 11, 2025
bc6feae
Confilct resolution from merge for publish file.
darrenge Mar 12, 2025
fe943a2
Merged main into this branch and resolved couple conflicts
darrenge Mar 12, 2025
c7527c7
Adding some checks to make sure directories are there.
darrenge Mar 12, 2025
39139c8
Tried to simplify the setting of the PublishDir into one line but can…
darrenge Mar 12, 2025
a5a2381
Clean up of the files weren't handling framework properly
darrenge Mar 13, 2025
fb823f7
Remove the code that deletes xml from the Github release zip files.
darrenge Mar 13, 2025
f8f6cfd
Merge branch 'main' into darrenge/GarnetWorkerRelease
darrenge Mar 13, 2025
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
10 changes: 9 additions & 1 deletion .azure/pipelines/azure-pipelines-external-release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
######################################
# NOTE: Before running this pipeline to generate a the GitHub Release and new nuget packages, update the VersionPrefix value in Version.props file
# NOTE: When Version.props file is modified, this pipeline will automatically get triggered
# NOTE: If this pipeline is ran against a branch that isn't main, the GitHub Release task and NuGet push task will be skipped
# NOTE: If this pipeline is manually started, a "Proof of Presence" (from a SAW machine) will be required before this pipeline can proceed.
######################################
trigger:
branches:
Expand All @@ -15,12 +17,16 @@ resources:
type: git
ref: refs/heads/main

pool:
vmImage: 'windows-latest'

jobs:
- job: Phase_1
displayName: Assessment
cancelTimeoutInMinutes: 1
pool:
name: Azure Pipelines
vmImage: 'windows-latest'
steps:
- checkout: self
clean: False
Expand Down Expand Up @@ -171,7 +177,8 @@ jobs:

- task: GitHubRelease@1
displayName: 'Create the GitHub release'
inputs:
condition: eq(variables['Build.SourceBranchName'], 'main')
inputs:
action: 'create'
gitHubConnection: ADO_to_Github_ServiceConnection
tagSource: userSpecifiedTag
Expand All @@ -196,6 +203,7 @@ jobs:

- task: NuGetCommand@2
displayName: 'Push both packages to NuGet.org'
condition: eq(variables['Build.SourceBranchName'], 'main')
inputs:
command: push
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg'
Expand Down
35 changes: 14 additions & 21 deletions .azure/pipelines/createbinaries.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,42 +35,33 @@ param (
#
######################################################
function CleanUpFiles {
param ($publishFolder, $platform, $framework)
param ($publishFolder, $platform, $framework, $deleteRunTimes = $true)

$publishPath = "$basePath/main/GarnetServer/bin/Release/$framework/publish/$publishFolder"
$garnetServerEXE = "$publishPath/GarnetServer.exe"
$excludeGarnetServerPDB = 'GarnetServer.pdb'

# Native binary is different based on OS by default
$nativeFile = "libnative_device.so"
$garnetServerEXE = "$publishPath/GarnetServer"

if ($platform -match "win-x64") {
$nativeFile = "native_device.dll"
$garnetServerEXE = "$publishPath/GarnetServer.exe"
}

$nativeRuntimePathFile = "$publishPath/runtimes/$platform/native/$nativeFile"

if (Test-Path $garnetServerEXE) {
Get-ChildItem -Path $publishPath -Filter '*.xml' | Remove-Item -Force

if (Test-Path -Path $publishPath) {
Get-ChildItem -Path $publishPath -Filter '*.pfx' | Remove-Item -Force
Get-ChildItem -Path $publishPath -Filter *.pdb | Where-Object { $_.Name -ne $excludeGarnetServerPDB } | Remove-Item
Get-ChildItem -Path $publishPath -Filter '*.pdb' | Where-Object { $_.Name -ne $excludeGarnetServerPDB } | Remove-Item

# Copy proper native run time to publish directory
Copy-Item -Path $nativeRuntimePathFile -Destination $publishPath

# Confirm the files are there
if (Test-Path "$publishPath/$nativeFile") {

# Delete RunTimes folder
Remove-Item -Path "$publishPath/runtimes" -Recurse -Force

} else {
Write-Error "$publishPath/$nativeFile does not exist."
}
} else {
Write-Error "$garnetServerEXE was not found."
Write-Host "Publish Path not found: $publishPath"
}

# Delete the runtimes folder
if ($deleteRunTimes -eq $true) {
Remove-Item -Path "$publishPath/runtimes" -Recurse -Force
}
}

Expand Down Expand Up @@ -106,6 +97,7 @@ if ($mode -eq 0 -or $mode -eq 1) {
CleanUpFiles "osx-arm64" "linux-x64" "net8.0"
CleanUpFiles "osx-x64" "linux-x64" "net8.0"
#CleanUpFiles "portable" "win-x64" "net8.0" # don't clean up all files for portable ... leave as is
CleanUpFiles "win-x64\Service" "win-x64" "net8.0" $false
CleanUpFiles "win-x64" "win-x64" "net8.0"
CleanUpFiles "win-arm64" "win-x64" "net8.0"

Expand All @@ -114,6 +106,7 @@ if ($mode -eq 0 -or $mode -eq 1) {
CleanUpFiles "osx-arm64" "linux-x64" "net9.0"
CleanUpFiles "osx-x64" "linux-x64" "net9.0"
#CleanUpFiles "portable" "win-x64" "net9.0" # don't clean up all files for portable ... leave as is
CleanUpFiles "win-x64\Service" "win-x64" "net9.0" $false
CleanUpFiles "win-x64" "win-x64" "net9.0"
CleanUpFiles "win-arm64" "win-x64" "net9.0"
}
Expand Down Expand Up @@ -165,7 +158,7 @@ if ($mode -eq 0 -or $mode -eq 2) {
Copy-Item -Path "$sourcePath\*" -Destination $destVersionPath -Recurse -Force
}
}

# Compress the files - both net80 and net90 in the same zip file
Write-Host "** Compressing the files ... **"
7z a -mmt20 -mx5 -scsWIN -r win-x64-based-readytorun.zip ../win-x64/*
Expand All @@ -182,4 +175,4 @@ if ($mode -eq 0 -or $mode -eq 2) {
}

Write-Host "** DONE! **"
Set-Location $lastPwd
Set-Location $lastPwd
4 changes: 4 additions & 0 deletions libs/host/Garnet.host.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,8 @@
<None Include="..\..\README.md" Pack="true" PackagePath="/"/>
</ItemGroup>

<PropertyGroup>
<NoWarn>$(NoWarn);NU5118</NoWarn>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,39 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<PublishSingleFile>true</PublishSingleFile>
<PublishReadyToRun>true</PublishReadyToRun>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PublishDir>bin\Release\net8.0\publish\win-x64\</PublishDir>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PublishDir>bin\Release\net9.0\publish\win-x64\</PublishDir>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\hosting\Windows\Garnet.worker\Garnet.worker.csproj" />
</ItemGroup>
<Target Name="CopyWorkerDll" AfterTargets="Publish">
<ItemGroup>
<DependantDLLFiles Include="..\..\hosting\Windows\Garnet.worker\bin\$(Configuration)\$(TargetFramework)\*.dll" />
<DependantXMLFiles Include="..\..\hosting\Windows\Garnet.worker\bin\$(Configuration)\$(TargetFramework)\*.xml" />
<RuntimeFilesWinx64 Include="..\..\hosting\Windows\Garnet.worker\bin\$(Configuration)\$(TargetFramework)\runtimes\win-x64\native\*" />
<RuntimeFilesWin Include="..\..\hosting\Windows\Garnet.worker\bin\$(Configuration)\$(TargetFramework)\runtimes\win\lib\net8.0\*" />
<GWRunTimeConfigFiles Include="..\..\hosting\Windows\Garnet.worker\bin\$(Configuration)\$(TargetFramework)\Garnet.worker.runtimeconfig.json" />
<GWDepsFiles Include="..\..\hosting\Windows\Garnet.worker\bin\$(Configuration)\$(TargetFramework)\Garnet.worker.deps.json" />
<GWEXEFiles Include="..\..\hosting\Windows\Garnet.worker\bin\$(Configuration)\$(TargetFramework)\Garnet.worker.exe" />
</ItemGroup>
<Copy SourceFiles="@(GWRunTimeConfigFiles)" DestinationFolder="$(PublishDir)Service" />
<Copy SourceFiles="@(DependantDLLFiles)" DestinationFolder="$(PublishDir)Service" />
<Copy SourceFiles="@(DependantXMLFiles)" DestinationFolder="$(PublishDir)Service" />
<Copy SourceFiles="@(RuntimeFilesWinx64)" DestinationFolder="$(PublishDir)Service\runtimes\win-x64\native" />
<Copy SourceFiles="@(RuntimeFilesWin)" DestinationFolder="$(PublishDir)Service\runtimes\win\lib\net8.0" />
<Copy SourceFiles="@(GWDepsFiles)" DestinationFolder="$(PublishDir)Service" />
<Copy SourceFiles="@(GWEXEFiles)" DestinationFolder="$(PublishDir)Service" />
<Copy SourceFiles="@(GWRunTimeConfigFiles)" DestinationFolder="$(PublishDir)Service" />
</Target>
<Target Name="DeleteWorkerFiles" AfterTargets="CopyWorkerDll">
<Delete Files="$(PublishDir)Garnet.worker.exe" />
<Delete Files="$(PublishDir)Garnet.worker.deps.json" />
<Delete Files="$(PublishDir)Garnet.worker.runtimeconfig.json" />
</Target>
</Project>