|
| 1 | +trigger: none |
| 2 | + |
| 3 | +schedules: |
| 4 | + - cron: "0 9 * * *" |
| 5 | + displayName: "Nightly Garnet Tests on ADO" |
| 6 | + branches: |
| 7 | + include: |
| 8 | + - main |
| 9 | + always: true |
| 10 | +variables: |
| 11 | + solution: 'Garnet.sln' |
| 12 | + RunAzureTests: 'yes' |
| 13 | + |
| 14 | +jobs: |
| 15 | +- job: 'Windows_Latest' |
| 16 | + pool: |
| 17 | + vmImage: windows-latest |
| 18 | + displayName: 'Windows' |
| 19 | + timeoutInMinutes: '175' |
| 20 | + |
| 21 | + strategy: |
| 22 | + maxParallel: '4' |
| 23 | + matrix: |
| 24 | + AnyCPU-Debug-Net8: |
| 25 | + buildPlatform: 'Any CPU' |
| 26 | + buildConfiguration: 'Debug' |
| 27 | + buildFramework: 'net8.0' |
| 28 | + AnyCPU-Release-Net8: |
| 29 | + buildPlatform: 'Any CPU' |
| 30 | + buildConfiguration: 'Release' |
| 31 | + buildFramework: 'net8.0' |
| 32 | + AnyCPU-Debug-Net9: |
| 33 | + buildPlatform: 'Any CPU' |
| 34 | + buildConfiguration: 'Debug' |
| 35 | + buildFramework: 'net9.0' |
| 36 | + AnyCPU-Release-Net9: |
| 37 | + buildPlatform: 'Any CPU' |
| 38 | + buildConfiguration: 'Release' |
| 39 | + buildFramework: 'net9.0' |
| 40 | + |
| 41 | + steps: |
| 42 | + - task: UseDotNet@2 |
| 43 | + displayName: Use .NET 8.0 |
| 44 | + inputs: |
| 45 | + packageType: 'sdk' |
| 46 | + version: '8.0.x' |
| 47 | + |
| 48 | + - task: UseDotNet@2 |
| 49 | + displayName: Use .NET 9.0 |
| 50 | + inputs: |
| 51 | + packageType: 'sdk' |
| 52 | + version: '9.0.x' |
| 53 | + |
| 54 | + - task: NodeTool@0 |
| 55 | + displayName: Node Tool |
| 56 | + inputs: |
| 57 | + versionSpec: 14.x |
| 58 | + |
| 59 | + - script : npm install -g azurite |
| 60 | + displayName: Install Azurite |
| 61 | + |
| 62 | + - script : start /B azurite |
| 63 | + displayName: Start Azurite |
| 64 | + |
| 65 | + - task: NuGetAuthenticate@1 |
| 66 | + displayName: 'NuGet Authenticate (Force Reinstall)' |
| 67 | + inputs: |
| 68 | + forceReinstallCredentialProvider: true |
| 69 | + |
| 70 | + - task: NuGetToolInstaller@1 |
| 71 | + displayName: Nuget Tool Installer |
| 72 | + inputs: |
| 73 | + versionspec: '*' |
| 74 | + checkLatest: true |
| 75 | + |
| 76 | + - script: nuget restore |
| 77 | + displayName: Nuget Restore |
| 78 | + |
| 79 | + - task: DotNetCoreCLI@2 |
| 80 | + displayName: 'Build Garnet binaries and tests $(buildConfiguration) targeting $(buildFramework)' |
| 81 | + inputs: |
| 82 | + command: 'build' |
| 83 | + projects: '**/Garnet.test.csproj' |
| 84 | + arguments: '--configuration $(buildConfiguration) --framework $(buildFramework)' |
| 85 | + |
| 86 | + - task: DotNetCoreCLI@2 |
| 87 | + displayName: 'Run Tests for Garnet on $(buildConfiguration) targeting $(buildFramework)' |
| 88 | + inputs: |
| 89 | + command: test |
| 90 | + projects: '**/Garnet.test.csproj' |
| 91 | + arguments: '--configuration $(buildConfiguration) --framework $(buildFramework) --property:TestTfmsInParallel=false --logger:"console;verbosity=detailed" -- NUnit.DisplayName=FullName' |
| 92 | + continueOnError: true |
| 93 | + |
| 94 | + - task: DotNetCoreCLI@2 |
| 95 | + displayName: 'Build Tsavorite binaries and tests $(buildConfiguration) targeting $(buildFramework)' |
| 96 | + inputs: |
| 97 | + command: 'build' |
| 98 | + projects: '**/Tsavorite.test.csproj' |
| 99 | + arguments: '--configuration $(buildConfiguration) --framework $(buildFramework)' |
| 100 | + |
| 101 | + - task: DotNetCoreCLI@2 |
| 102 | + displayName: 'Run Tests for Tsavorite on $(buildConfiguration) targeting $(buildFramework)' |
| 103 | + inputs: |
| 104 | + command: test |
| 105 | + projects: '**/Tsavorite.test.csproj' |
| 106 | + arguments: '--configuration $(buildConfiguration) --framework $(buildFramework) --property:TestTfmsInParallel=false --logger:"console;verbosity=detailed" -- NUnit.DisplayName=FullName' |
| 107 | + continueOnError: true |
| 108 | + |
| 109 | + - task: DotNetCoreCLI@2 |
| 110 | + displayName: 'Build Garnet Cluster binaries and tests $(buildConfiguration) targeting $(buildFramework)' |
| 111 | + inputs: |
| 112 | + command: 'build' |
| 113 | + projects: '**/Garnet.test.cluster.csproj' |
| 114 | + arguments: '--configuration $(buildConfiguration) --framework $(buildFramework)' |
| 115 | + |
| 116 | + - task: DotNetCoreCLI@2 |
| 117 | + displayName: 'Run Tests for Garnet Cluster on $(buildConfiguration) targeting $(buildFramework)' |
| 118 | + inputs: |
| 119 | + command: test |
| 120 | + projects: '**/Garnet.test.cluster.csproj' |
| 121 | + arguments: '--configuration $(buildConfiguration) --framework $(buildFramework) --property:TestTfmsInParallel=false --logger:"console;verbosity=detailed" -- NUnit.DisplayName=FullName' |
| 122 | + continueOnError: true |
| 123 | + |
| 124 | + - task: NuGetCommand@2 |
| 125 | + displayName: Pack nuget package to test nuspec is correct - will not publish it though |
| 126 | + inputs: |
| 127 | + workingDirectory: $(System.DefaultWorkingDirectory) |
| 128 | + script: 'dotnet pack --no-build --no-restore --output $(Build.ArtifactStagingDirectory) -p:PackageVersion=$(Build.BuildNumber) /p:Configuration=Release libs/host/Garnet.host.csproj' |
| 129 | + |
| 130 | + - task: PublishTestResults@2 |
| 131 | + displayName: 'Publish Test Results' |
| 132 | + inputs: |
| 133 | + testRunner: VSTest |
| 134 | + testResultsFiles: '**/*.trx' |
| 135 | + searchFolder: '$(Agent.TempDirectory)' |
| 136 | + |
| 137 | +- job: 'Ubuntu_Latest' |
| 138 | + pool: |
| 139 | + vmImage: ubuntu-latest |
| 140 | + displayName: 'Ubuntu' |
| 141 | + timeoutInMinutes: '175' |
| 142 | + |
| 143 | + strategy: |
| 144 | + maxParallel: '4' |
| 145 | + matrix: |
| 146 | + AnyCPU-Debug-Net8: |
| 147 | + buildPlatform: 'Any CPU' |
| 148 | + buildConfiguration: 'Debug' |
| 149 | + buildFramework: 'net8.0' |
| 150 | + AnyCPU-Release-Net8: |
| 151 | + buildPlatform: 'Any CPU' |
| 152 | + buildConfiguration: 'Release' |
| 153 | + buildFramework: 'net8.0' |
| 154 | + AnyCPU-Debug-Net9: |
| 155 | + buildPlatform: 'Any CPU' |
| 156 | + buildConfiguration: 'Debug' |
| 157 | + buildFramework: 'net9.0' |
| 158 | + AnyCPU-Release-Net9: |
| 159 | + buildPlatform: 'Any CPU' |
| 160 | + buildConfiguration: 'Release' |
| 161 | + buildFramework: 'net9.0' |
| 162 | + |
| 163 | + steps: |
| 164 | + - task: UseDotNet@2 |
| 165 | + displayName: Use .NET 8.0 |
| 166 | + inputs: |
| 167 | + packageType: 'sdk' |
| 168 | + version: '8.0.x' |
| 169 | + |
| 170 | + - task: UseDotNet@2 |
| 171 | + displayName: Use .NET 9.0 |
| 172 | + inputs: |
| 173 | + packageType: 'sdk' |
| 174 | + version: '9.0.x' |
| 175 | + |
| 176 | + - bash: | |
| 177 | + sudo npm install -g azurite |
| 178 | + sudo mkdir azurite |
| 179 | + sudo azurite --silent --location azurite --debug azurite\debug.log & |
| 180 | + displayName: 'Install and Run Azurite' |
| 181 | + |
| 182 | + - task: NuGetAuthenticate@1 |
| 183 | + displayName: 'NuGet Authenticate (Force Reinstall)' |
| 184 | + inputs: |
| 185 | + forceReinstallCredentialProvider: true |
| 186 | + |
| 187 | + - task: UseDotNet@2 # Optional if the .NET Core SDK is already installed |
| 188 | + displayName: Use .NET |
| 189 | + |
| 190 | + - script: dotnet restore |
| 191 | + displayName: .NET Restore |
| 192 | + |
| 193 | + - task: DotNetCoreCLI@2 |
| 194 | + displayName: '.NET Core build Garnet binaries and tests $(buildConfiguration) targeting $(buildFramework)' |
| 195 | + inputs: |
| 196 | + command: 'build' |
| 197 | + projects: '**/Garnet.test.csproj' |
| 198 | + arguments: '--configuration $(buildConfiguration) --framework $(buildFramework)' |
| 199 | + |
| 200 | + - task: DotNetCoreCLI@2 |
| 201 | + displayName: 'Run Tests for Garnet on $(buildConfiguration) targeting $(buildFramework)' |
| 202 | + inputs: |
| 203 | + command: test |
| 204 | + projects: '**/Garnet.test.csproj' |
| 205 | + arguments: '--configuration $(buildConfiguration) --framework $(buildFramework) --property:TestTfmsInParallel=false --logger:"console;verbosity=detailed" -- NUnit.DisplayName=FullName' |
| 206 | + continueOnError: true |
| 207 | + |
| 208 | + - task: DotNetCoreCLI@2 |
| 209 | + displayName: '.NET Core build Tsavorite binaries and tests $(buildConfiguration) targeting $(buildFramework)' |
| 210 | + inputs: |
| 211 | + command: 'build' |
| 212 | + projects: '**/Tsavorite.test.csproj' |
| 213 | + arguments: '--configuration $(buildConfiguration) --framework $(buildFramework)' |
| 214 | + |
| 215 | + - task: DotNetCoreCLI@2 |
| 216 | + displayName: 'Run Tests for Tsavorite on $(buildConfiguration) targeting $(buildFramework)' |
| 217 | + inputs: |
| 218 | + command: test |
| 219 | + projects: '**/Tsavorite.test.csproj' |
| 220 | + arguments: '--configuration $(buildConfiguration) --framework $(buildFramework) --property:TestTfmsInParallel=false --logger:"console;verbosity=detailed" -- NUnit.DisplayName=FullName' |
| 221 | + continueOnError: true |
| 222 | + |
| 223 | + - task: DotNetCoreCLI@2 |
| 224 | + displayName: '.NET Core build Cluster binaries and tests $(buildConfiguration) targeting $(buildFramework)' |
| 225 | + inputs: |
| 226 | + command: 'build' |
| 227 | + projects: '**/Garnet.test.cluster.csproj' |
| 228 | + arguments: '--configuration $(buildConfiguration) --framework $(buildFramework)' |
| 229 | + |
| 230 | + - task: DotNetCoreCLI@2 |
| 231 | + displayName: 'Run Tests for Garnet Cluster on $(buildConfiguration) targeting $(buildFramework)' |
| 232 | + inputs: |
| 233 | + command: test |
| 234 | + projects: '**/Garnet.test.cluster.csproj' |
| 235 | + arguments: '--configuration $(buildConfiguration) --framework $(buildFramework) --property:TestTfmsInParallel=false --logger:"console;verbosity=detailed" -- NUnit.DisplayName=FullName' |
| 236 | + continueOnError: true |
| 237 | + |
| 238 | + - task: PublishTestResults@2 |
| 239 | + displayName: 'Publish Test Results' |
| 240 | + inputs: |
| 241 | + testResultsFormat: 'VSTest' |
| 242 | + testResultsFiles: '*.trx' |
| 243 | + searchFolder: '$(Agent.TempDirectory)' |
0 commit comments