|
| 1 | +# Java.Interop Pipelines |
| 2 | + |
| 3 | +trigger: |
| 4 | + - master |
| 5 | + - d16-* |
| 6 | + |
| 7 | +# Global variables |
| 8 | +variables: |
| 9 | + DotNetCoreVersion: 2.1.701 |
| 10 | + HostedMac: Hosted Mac Internal |
| 11 | + HostedWinVS2019: Hosted Windows 2019 with VS2019 |
| 12 | + |
| 13 | +jobs: |
| 14 | +- job: windows_build |
| 15 | + displayName: Windows Build and Test |
| 16 | + pool: $(HostedWinVS2019) |
| 17 | + timeoutInMinutes: 20 |
| 18 | + workspace: |
| 19 | + clean: all |
| 20 | + steps: |
| 21 | + - checkout: self |
| 22 | + submodules: recursive |
| 23 | + |
| 24 | + - task: UseDotNet@2 |
| 25 | + displayName: Use .NET Core $(DotNetCoreVersion) |
| 26 | + inputs: |
| 27 | + version: $(DotNetCoreVersion) |
| 28 | + |
| 29 | + - task: MSBuild@1 |
| 30 | + displayName: MSBuild Java.Interop.sln /t:Prepare |
| 31 | + inputs: |
| 32 | + solution: Java.Interop.sln |
| 33 | + configuration: $(Build.Configuration) |
| 34 | + msbuildArguments: /t:Prepare |
| 35 | + |
| 36 | + - task: MSBuild@1 |
| 37 | + displayName: MSBuild Java.Interop.sln |
| 38 | + inputs: |
| 39 | + solution: Java.Interop.sln |
| 40 | + configuration: $(Build.Configuration) |
| 41 | + |
| 42 | + - task: MSBuild@1 |
| 43 | + displayName: MSBuild RunNUnitTests.targets |
| 44 | + inputs: |
| 45 | + solution: build-tools/scripts/RunNUnitTests.targets |
| 46 | + configuration: $(Build.Configuration) |
| 47 | + msbuildArguments: /p:TestAssembly="bin\Test$(Build.Configuration)\generator-Tests.dll;bin\Test$(Build.Configuration)\Java.Interop.Tools.JavaCallableWrappers-Tests.dll;bin\Test$(Build.Configuration)\LogcatParse-Tests.dll;bin\Test$(Build.Configuration)\Xamarin.Android.Tools.ApiXmlAdjuster-Tests.dll;bin\Test$(Build.Configuration)\Xamarin.Android.Tools.Bytecode-Tests.dll" |
| 48 | + condition: succeededOrFailed() |
| 49 | + |
| 50 | + - task: PublishTestResults@2 |
| 51 | + displayName: Publish Test Results |
| 52 | + inputs: |
| 53 | + testResultsFormat: NUnit |
| 54 | + testResultsFiles: TestResult-*.xml |
| 55 | + condition: succeededOrFailed() |
| 56 | + |
| 57 | +- job: mac_build |
| 58 | + displayName: Mac Build and Test |
| 59 | + pool: $(HostedMac) |
| 60 | + timeoutInMinutes: 20 |
| 61 | + workspace: |
| 62 | + clean: all |
| 63 | + steps: |
| 64 | + - checkout: self |
| 65 | + submodules: recursive |
| 66 | + |
| 67 | + - task: UseDotNet@2 |
| 68 | + displayName: Use .NET Core $(DotNetCoreVersion) |
| 69 | + inputs: |
| 70 | + version: $(DotNetCoreVersion) |
| 71 | + |
| 72 | + - script: | |
| 73 | + dotnet tool install --global boots --version 1.0.0.291 |
| 74 | + boots https://download.mono-project.com/archive/6.4.0/macos-10-universal/MonoFramework-MDK-6.4.0.198.macos10.xamarin.universal.pkg |
| 75 | + displayName: Install Mono 6.4 |
| 76 | + |
| 77 | + - script: make prepare CONFIGURATION=$(Build.Configuration) |
| 78 | + displayName: make prepare |
| 79 | + |
| 80 | + - script: make all CONFIGURATION=$(Build.Configuration) |
| 81 | + displayName: make all |
| 82 | + |
| 83 | + - script: make fxcop |
| 84 | + displayName: Run Gendarme |
| 85 | + |
| 86 | + - script: | |
| 87 | + r=0 |
| 88 | + make run-all-tests CONFIGURATION=$(Build.Configuration) || r=$? |
| 89 | + jar cf xatb.jar -C src/Xamarin.Android.Tools.Bytecode/Tests/obj/*/classes . |
| 90 | + zip -r bin.zip bin |
| 91 | + exit $r |
| 92 | + displayName: Run Tests |
| 93 | +
|
| 94 | + - task: PublishTestResults@2 |
| 95 | + displayName: Publish Test Results |
| 96 | + inputs: |
| 97 | + testResultsFormat: NUnit |
| 98 | + testResultsFiles: TestResult-*.xml |
| 99 | + condition: succeededOrFailed() |
| 100 | + |
| 101 | + - task: CopyFiles@2 |
| 102 | + displayName: 'Copy Files to: Artifact Staging Directory' |
| 103 | + inputs: |
| 104 | + SourceFolder: $(System.DefaultWorkingDirectory) |
| 105 | + Contents: | |
| 106 | + gendarme.* |
| 107 | + xatb.jar |
| 108 | + bin.zip |
| 109 | + TargetFolder: $(Build.ArtifactStagingDirectory) |
| 110 | + condition: succeededOrFailed() |
| 111 | + |
| 112 | + - task: PublishBuildArtifacts@1 |
| 113 | + displayName: 'Publish Artifact: debug' |
| 114 | + inputs: |
| 115 | + ArtifactName: debug |
| 116 | + condition: succeededOrFailed() |
0 commit comments