|
1 | 1 | jobs:
|
| 2 | + - job: build |
| 3 | + strategy: |
| 4 | + matrix: |
| 5 | + linux: |
| 6 | + osName: 'Linux' |
| 7 | + imageName: 'ubuntu-22.04' |
| 8 | + mac: |
| 9 | + osName: 'macOS' |
| 10 | + imageName: 'macOS-latest' |
| 11 | + windows: |
| 12 | + osName: 'Windows' |
| 13 | + imageName: 'windows-latest' |
2 | 14 |
|
3 |
| -################################################################################ |
4 |
| -- job: Windows |
5 |
| -################################################################################ |
6 |
| - displayName: Windows |
7 |
| - timeoutInMinutes: 180 |
8 |
| - pool: |
9 |
| - vmImage: windows-latest |
10 |
| - steps: |
11 |
| - - template: eng/steps.yml |
12 |
| - parameters: |
13 |
| - os: 'Windows' |
14 |
| - |
15 |
| -################################################################################ |
16 |
| -- job: Linux |
17 |
| -################################################################################ |
18 |
| - displayName: Linux (Ubuntu) |
19 |
| - timeoutInMinutes: 180 |
20 |
| - pool: |
21 |
| - vmImage: ubuntu-22.04 |
22 |
| - steps: |
23 |
| - - template: eng/steps.yml |
24 |
| - parameters: |
25 |
| - os: 'Linux' |
26 |
| - |
27 |
| -################################################################################ |
28 |
| -- job: macOS |
29 |
| -################################################################################ |
30 |
| - displayName: macOS |
31 |
| - timeoutInMinutes: 180 |
32 |
| - pool: |
33 |
| - vmImage: macOS-latest |
34 |
| - steps: |
35 |
| - - template: eng/steps.yml |
36 |
| - parameters: |
37 |
| - os: 'macOS' |
| 15 | + displayName: Build |
| 16 | + timeoutInMinutes: 180 |
| 17 | + pool: |
| 18 | + vmImage: $(imageName) |
| 19 | + |
| 20 | + steps: |
| 21 | + - checkout: self |
| 22 | + submodules: true |
| 23 | + |
| 24 | + - task: UseDotNet@2 |
| 25 | + displayName: Install .NET 9.0 SDK for build |
| 26 | + inputs: |
| 27 | + packageType: 'sdk' |
| 28 | + version: '9.0.x' |
| 29 | + |
| 30 | + # Dump version info |
| 31 | + - task: PowerShell@2 |
| 32 | + displayName: Version Information |
| 33 | + inputs: |
| 34 | + targetType: inline |
| 35 | + script: | |
| 36 | + dotnet --info |
| 37 | + try { msbuild -version } catch { } |
| 38 | + try { mono --version } catch { } |
| 39 | +
|
| 40 | + - powershell: ./make.ps1 |
| 41 | + displayName: Build |
| 42 | + |
| 43 | + - powershell: ./make.ps1 package |
| 44 | + displayName: Package |
| 45 | + |
| 46 | + - task: CopyFiles@2 |
| 47 | + displayName: Copy Packages |
| 48 | + inputs: |
| 49 | + SourceFolder: '$(Build.Repository.LocalPath)/Package/Release/Packages' |
| 50 | + Contents: | |
| 51 | + **/*.nupkg |
| 52 | + **/*.snupkg |
| 53 | + **/*.zip |
| 54 | + **/*.msi |
| 55 | + **/*.deb |
| 56 | + **/*.pkg |
| 57 | + TargetFolder: '$(Build.ArtifactStagingDirectory)' |
| 58 | + condition: and(succeededOrFailed(), eq(variables['system.pullrequest.isfork'], false)) |
| 59 | + |
| 60 | + - task: CopyFiles@2 |
| 61 | + displayName: Copy Build Logs |
| 62 | + inputs: |
| 63 | + Contents: '*.binlog' |
| 64 | + TargetFolder: '$(Build.ArtifactStagingDirectory)' |
| 65 | + condition: and(succeededOrFailed(), eq(variables['system.pullrequest.isfork'], false)) |
| 66 | + |
| 67 | + - task: PublishBuildArtifacts@1 |
| 68 | + displayName: Publish Artifacts |
| 69 | + inputs: |
| 70 | + ArtifactName: '$(osName) Artifacts' |
| 71 | + condition: and(succeededOrFailed(), eq(variables['system.pullrequest.isfork'], false)) |
| 72 | + |
| 73 | + - job: test |
| 74 | + strategy: |
| 75 | + matrix: |
| 76 | + linux_net462: |
| 77 | + osName: Linux |
| 78 | + imageName: ubuntu-22.04 |
| 79 | + framework: net462 |
| 80 | + linux_net6_0: |
| 81 | + osName: Linux |
| 82 | + imageName: ubuntu-22.04 |
| 83 | + framework: net6.0 |
| 84 | + linux_net8_0: |
| 85 | + osName: Linux |
| 86 | + imageName: ubuntu-22.04 |
| 87 | + framework: net8.0 |
| 88 | + macos_net462: |
| 89 | + osName: macOS |
| 90 | + imageName: macOS-latest |
| 91 | + framework: net462 |
| 92 | + macos_net6_0: |
| 93 | + osName: macOS |
| 94 | + imageName: macOS-latest |
| 95 | + framework: net6.0 |
| 96 | + macos_net8_0: |
| 97 | + osName: macOS |
| 98 | + imageName: macOS-latest |
| 99 | + framework: net8.0 |
| 100 | + windows_net462: |
| 101 | + osName: Windows |
| 102 | + imageName: windows-latest |
| 103 | + framework: net462 |
| 104 | + windows_net6_0: |
| 105 | + osName: Windows |
| 106 | + imageName: windows-latest |
| 107 | + framework: net6.0 |
| 108 | + windows_net8_0: |
| 109 | + osName: Windows |
| 110 | + imageName: windows-latest |
| 111 | + framework: net8.0 |
| 112 | + |
| 113 | + condition: false |
| 114 | + displayName: Test |
| 115 | + timeoutInMinutes: 180 |
| 116 | + pool: |
| 117 | + vmImage: $(imageName) |
| 118 | + |
| 119 | + steps: |
| 120 | + # Prerequisites |
| 121 | + - checkout: self |
| 122 | + submodules: true |
| 123 | + |
| 124 | + # Setup .NET |
| 125 | + - task: UseDotNet@2 |
| 126 | + displayName: Install .NET 6.0 runtime for testing |
| 127 | + inputs: |
| 128 | + packageType: 'runtime' |
| 129 | + version: '6.0.x' |
| 130 | + - task: UseDotNet@2 |
| 131 | + displayName: Install .NET 8.0 runtime for testing |
| 132 | + inputs: |
| 133 | + packageType: 'runtime' |
| 134 | + version: '8.0.x' |
| 135 | + - task: UseDotNet@2 |
| 136 | + displayName: Install .NET 9.0 SDK for build |
| 137 | + inputs: |
| 138 | + packageType: 'sdk' |
| 139 | + version: '9.0.x' |
| 140 | + |
| 141 | + # Build & Test |
| 142 | + - powershell: ./make.ps1 |
| 143 | + displayName: Build |
| 144 | + - powershell: ./make.ps1 -frameworks $(framework) test-all |
| 145 | + displayName: Test ($(framework)) |
| 146 | + |
| 147 | + - task: PublishTestResults@2 |
| 148 | + displayName: Publish Test Results |
| 149 | + inputs: |
| 150 | + testRunner: VSTest |
| 151 | + testResultsFiles: '**/*.trx' |
| 152 | + mergeTestResults: true |
| 153 | + testRunTitle: $(osName) - $(framework) |
| 154 | + condition: succeededOrFailed() |
0 commit comments