2019-03-06 19:00:35 +01:00
|
|
|
jobs:
|
2019-04-27 00:41:07 +02:00
|
|
|
- job: build_testartifacts
|
2020-08-10 18:07:58 +02:00
|
|
|
variables:
|
|
|
|
runCodesignValidationInjection: false
|
2019-04-27 00:41:07 +02:00
|
|
|
displayName: Build test artifacts
|
2019-03-06 19:00:35 +01:00
|
|
|
condition: succeeded()
|
2019-04-27 00:41:07 +02:00
|
|
|
pool: 'Hosted Ubuntu 1604'
|
2019-03-06 19:00:35 +01:00
|
|
|
steps:
|
|
|
|
|
|
|
|
- pwsh: |
|
|
|
|
Import-Module ./build.psm1
|
|
|
|
Start-PSBootstrap
|
|
|
|
displayName: Bootstrap
|
|
|
|
|
|
|
|
- pwsh: |
|
|
|
|
Import-Module ./build.psm1
|
|
|
|
|
2019-04-27 00:41:07 +02:00
|
|
|
function BuildTestPackage([string] $runtime)
|
2019-03-06 19:00:35 +01:00
|
|
|
{
|
2019-04-27 00:41:07 +02:00
|
|
|
Write-Verbose -Verbose "Starting to build package for $runtime"
|
2019-03-06 19:00:35 +01:00
|
|
|
|
2019-04-27 00:41:07 +02:00
|
|
|
New-TestPackage -Destination $(System.ArtifactsDirectory) -Runtime $runtime
|
|
|
|
|
|
|
|
if (-not (Test-Path $(System.ArtifactsDirectory)/TestPackage.zip))
|
|
|
|
{
|
|
|
|
throw "Test Package was not found at: $(System.ArtifactsDirectory)"
|
|
|
|
}
|
|
|
|
|
|
|
|
switch ($runtime)
|
|
|
|
{
|
|
|
|
win7-x64 { $packageName = "TestPackage-win.zip" }
|
|
|
|
linux-x64 { $packageName = "TestPackage-linux-x64.zip" }
|
|
|
|
linux-arm { $packageName = "TestPackage-linux-arm.zip" }
|
|
|
|
linux-arm64 { $packageName = "TestPackage-linux-arm64.zip" }
|
|
|
|
osx-x64 { $packageName = "TestPackage-macOS.zip" }
|
2020-01-07 21:12:19 +01:00
|
|
|
linux-musl-x64 { $packageName = "TestPackage-alpine-x64.zip"}
|
2019-04-27 00:41:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
Rename-Item $(System.ArtifactsDirectory)/TestPackage.zip $packageName
|
|
|
|
Write-Host "##vso[artifact.upload containerfolder=testArtifacts;artifactname=testArtifacts]$(System.ArtifactsDirectory)/$packageName"
|
2019-04-14 04:01:28 +02:00
|
|
|
}
|
2019-03-06 19:00:35 +01:00
|
|
|
|
2019-04-27 00:41:07 +02:00
|
|
|
BuildTestPackage -runtime win7-x64
|
|
|
|
BuildTestPackage -runtime linux-x64
|
|
|
|
BuildTestPackage -runtime linux-arm
|
|
|
|
BuildTestPackage -runtime linux-arm64
|
|
|
|
BuildTestPackage -runtime osx-x64
|
2020-01-07 21:12:19 +01:00
|
|
|
BuildTestPackage -runtime linux-musl-x64
|
2019-03-06 19:00:35 +01:00
|
|
|
|
2019-04-27 00:41:07 +02:00
|
|
|
displayName: Build test package and upload
|