Use windows-2019

Update

Use absolute path for other YML

User relative path for other YAML

Use expression to evaluate $(RunUnitTests)

Update

Update

Update

Update

Update

Update

Update

Update

Update

Update

Update

Update

Update

Update

Update

Shorten job description

Add variable-verifying task

Clean up pull-request.yml

Disable PR validation until merging

Use dependencies to pass NuGetId

Update

Use matrix for NuGet job

Remove parameter runUnitTests

Uncomment triggers
This commit is contained in:
Julio C. Rocha 2020-10-22 21:52:40 -07:00
Родитель 13a288505a
Коммит 43c12ebef3
5 изменённых файлов: 248 добавлений и 103 удалений

Просмотреть файл

@ -1,7 +1,7 @@
# Expected variables:
# RunUnitTests
parameters:
- name: runUnitTests
default: true
type: boolean
- name: appPlatform
type: string
- name: outputPath
@ -58,7 +58,7 @@ steps:
publishRunAttachments: true
collectDumpOn: onAbortOnly
vsTestVersion: latest
condition: and(succeeded(), not(startsWith(variables.BuildPlatform, 'arm')), eq('${{ parameters.runUnitTests }}', true))
condition: and(succeeded(), not(startsWith(variables.BuildPlatform, 'arm')), eq(variables.RunUnitTests, true))
- task: PublishBuildArtifacts@1
displayName: "Publish artifacts"

141
.ado/pull-request.yml Normal file
Просмотреть файл

@ -0,0 +1,141 @@
name: v8jsi_0.0.$(Date:yyMM.d)$(Rev:rrr)
trigger:
- master
- "*-stable"
pr:
- master
- "*-stable"
pool:
vmImage: 'windows-2019'
jobs:
- job: V8JsiBuild
timeoutInMinutes: 180
displayName: Build and publish v8jsi.dll
strategy:
matrix:
Desktop|x64|Debug:
BuildConfiguration: Debug
BuildPlatform: x64
AppPlatform: win32
Desktop|x86|Debug:
BuildConfiguration: Debug
BuildPlatform: x86
AppPlatform: win32
Desktop|ARM64|Debug:
BuildConfiguration: Debug
BuildPlatform: arm64
AppPlatform: win32
Desktop|x64|Release:
BuildConfiguration: Release
BuildPlatform: x64
AppPlatform: win32
Desktop|x86|Release:
BuildConfiguration: Release
BuildPlatform: x86
AppPlatform: win32
Desktop|ARM64|Release:
BuildConfiguration: Release
BuildPlatform: arm64
AppPlatform: win32
Universal|x64|Debug:
BuildConfiguration: Debug
BuildPlatform: x64
AppPlatform: uwp
Universal|x86|Debug:
BuildConfiguration: Debug
BuildPlatform: x86
AppPlatform: uwp
Universal|ARM64|Debug:
BuildConfiguration: Debug
BuildPlatform: arm64
AppPlatform: uwp
Universal|x64|Release:
BuildConfiguration: Release
BuildPlatform: x64
AppPlatform: uwp
Universal|x86|Release:
BuildConfiguration: Release
BuildPlatform: x86
AppPlatform: uwp
Universal|ARM64|Release:
BuildConfiguration: Release
BuildPlatform: arm64
AppPlatform: uwp
steps:
- pwsh: |
$vars = @{
'win32' = @{
'RunUnitTests' = $true
};
'uwp' = @{
'RunUnitTests' = $false
}
}
Write-Host "Setting variables for app platform ${env:AppPlatform}"
Write-Host "##vso[task.setvariable variable=RunUnitTests]$($vars[$env:AppPlatform]['RunUnitTests'])"
name: setvarStep
displayName: Set AppPlatform-dependent variables
- task: UsePythonVersion@0
inputs:
versionSpec: '2.x'
addToPath: true
architecture: 'x64'
- template: build-dll.yml
parameters:
outputPath: $(Build.ArtifactStagingDirectory)
appPlatform: $(AppPlatform)
- job: V8JsiPublishNuget
dependsOn:
- V8JsiBuild
displayName: Publish Nuget
strategy:
matrix:
Desktop:
NuGetId: ReactNative.V8Jsi.Windows
Universal:
NuGetId: ReactNative.V8Jsi.Windows.UWP
steps:
- checkout: none
- task: NuGetToolInstaller@0
inputs:
versionSpec: ">=4.6.0"
- task: DownloadBuildArtifacts@0
displayName: Download Build outputs
inputs:
artifactName: V8Jsi
downloadPath: $(System.DefaultWorkingDirectory)
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
$config = Get-Content (Join-Path $(System.DefaultWorkingDirectory) "V8Jsi\config.json") | ConvertFrom-Json
$Version = $config.version
Write-Host "##vso[task.setvariable variable=Version]$Version"
displayName: Retrieve V8 version
- task: NuGetCommand@2
displayName: 'NuGet Pack'
inputs:
command: pack
packagesToPack: $(System.DefaultWorkingDirectory)\V8Jsi\$(NuGetId).nuspec
packDestination: $(System.DefaultWorkingDirectory)\NugetRootFinal
buildProperties: Id=$(NuGetId);CommitId=$(Build.SourceVersion);nugetroot=$(System.DefaultWorkingDirectory)\V8Jsi;RepoUri=$(Build.Repository.Uri)
versioningScheme: byEnvVar
versionEnvVar: Version
includeSymbols: true
- task: PublishBuildArtifacts@1
displayName: "Publish final nuget artifacts"
inputs:
PathtoPublish: $(System.DefaultWorkingDirectory)\NugetRootFinal
ArtifactName: "V8Jsi-final-nuget"

Просмотреть файл

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>ReactNative.V8Jsi.Windows</id>
<id>$Id$</id>
<version>$Version$</version>
<description>Contains a Windows implementation of the V8 JSI wrapper for ReactNative (VERSION_DETAILS)</description>
<authors>Facebook, Google, Microsoft</authors>

Просмотреть файл

@ -52,7 +52,6 @@ jobs:
parameters:
outputPath: $(Build.ArtifactStagingDirectory)
appPlatform: $(AppPlatform)
runUnitTests: false
- job: V8JsiPublishNuget
dependsOn:
@ -94,4 +93,4 @@ jobs:
displayName: "Publish final nuget artifacts"
inputs:
PathtoPublish: $(System.DefaultWorkingDirectory)\NugetRootFinal
ArtifactName: "V8Jsi-final-nuget"
ArtifactName: "V8Jsi-final-nuget"

Просмотреть файл

@ -1,96 +1,101 @@
name: v8jsi_win32.0.0.$(Date:yyMM.d)$(Rev:rrr)
trigger:
- master
- "*-stable"
pr:
- master
- "*-stable"
pool:
vmImage: 'windows-latest'
jobs:
- job: V8JsiBuild
timeoutInMinutes: 150
displayName: Build the Win32 v8jsi.dll binary for supported architectures and flavors
strategy:
matrix:
X64Debug:
BuildConfiguration: Debug
BuildPlatform: x64
AppPlatform: win32
X86Debug:
BuildConfiguration: Debug
BuildPlatform: x86
AppPlatform: win32
ARM64Debug:
BuildConfiguration: Debug
BuildPlatform: arm64
AppPlatform: win32
X64Release:
BuildConfiguration: Release
BuildPlatform: x64
AppPlatform: win32
X86Release:
BuildConfiguration: Release
BuildPlatform: x86
AppPlatform: win32
ARM64Release:
BuildConfiguration: Release
BuildPlatform: arm64
AppPlatform: win32
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '2.x'
addToPath: true
architecture: 'x64'
- template: .ado/build-dll.yml
parameters:
outputPath: $(Build.ArtifactStagingDirectory)
appPlatform: $(AppPlatform)
runUnitTests: true
- job: V8JsiPublishNuget
dependsOn:
- V8JsiBuild
displayName: Publish Nuget
steps:
- checkout: none
- task: NuGetToolInstaller@0
inputs:
versionSpec: ">=4.6.0"
- task: DownloadBuildArtifacts@0
displayName: Download Build outputs
inputs:
artifactName: V8Jsi
downloadPath: $(System.DefaultWorkingDirectory)
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
$config = Get-Content (Join-Path $(System.DefaultWorkingDirectory) "V8Jsi\config.json") | Out-String | ConvertFrom-Json
$Version = $config.version
Write-Host "##vso[task.setvariable variable=Version]$Version"
- task: NuGetCommand@2
displayName: 'NuGet Pack'
inputs:
command: pack
packagesToPack: $(System.DefaultWorkingDirectory)\V8Jsi\ReactNative.V8Jsi.Windows.nuspec
packDestination: $(System.DefaultWorkingDirectory)\NugetRootFinal
buildProperties: CommitId=$(Build.SourceVersion);nugetroot=$(System.DefaultWorkingDirectory)\V8Jsi;RepoUri=$(Build.Repository.Uri)
versioningScheme: byEnvVar
versionEnvVar: Version
- task: PublishBuildArtifacts@1
displayName: "Publish final nuget artifacts"
inputs:
PathtoPublish: $(System.DefaultWorkingDirectory)\NugetRootFinal
ArtifactName: "V8Jsi-final-nuget"
name: v8jsi_win32.0.0.$(Date:yyMM.d)$(Rev:rrr)
trigger:
- master
- "*-stable"
pr:
- master
- "*-stable"
pool:
vmImage: 'windows-latest'
jobs:
- job: V8JsiBuild
timeoutInMinutes: 150
displayName: Build the Win32 v8jsi.dll binary for supported architectures and flavors
strategy:
matrix:
X64Debug:
BuildConfiguration: Debug
BuildPlatform: x64
AppPlatform: win32
X86Debug:
BuildConfiguration: Debug
BuildPlatform: x86
AppPlatform: win32
ARM64Debug:
BuildConfiguration: Debug
BuildPlatform: arm64
AppPlatform: win32
X64Release:
BuildConfiguration: Release
BuildPlatform: x64
AppPlatform: win32
X86Release:
BuildConfiguration: Release
BuildPlatform: x86
AppPlatform: win32
ARM64Release:
BuildConfiguration: Release
BuildPlatform: arm64
AppPlatform: win32
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '2.x'
addToPath: true
architecture: 'x64'
- template: .ado/build-dll.yml
parameters:
outputPath: $(Build.ArtifactStagingDirectory)
appPlatform: $(AppPlatform)
- job: V8JsiPublishNuget
dependsOn:
- V8JsiBuild
displayName: Publish Nuget
strategy:
matrix:
Desktop:
NuGetId: ReactNative.V8Jsi.Windows
Universal:
NuGetId: ReactNative.V8Jsi.Windows.UWP
steps:
- checkout: none
- task: NuGetToolInstaller@0
inputs:
versionSpec: ">=4.6.0"
- task: DownloadBuildArtifacts@0
displayName: Download Build outputs
inputs:
artifactName: V8Jsi
downloadPath: $(System.DefaultWorkingDirectory)
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
$config = Get-Content (Join-Path $(System.DefaultWorkingDirectory) "V8Jsi\config.json") | Out-String | ConvertFrom-Json
$Version = $config.version
Write-Host "##vso[task.setvariable variable=Version]$Version"
- task: NuGetCommand@2
displayName: 'NuGet Pack'
inputs:
command: pack
packagesToPack: $(System.DefaultWorkingDirectory)\V8Jsi\$(NuGetId).nuspec
packDestination: $(System.DefaultWorkingDirectory)\NugetRootFinal
buildProperties: Id=$(NuGetId);CommitId=$(Build.SourceVersion);nugetroot=$(System.DefaultWorkingDirectory)\V8Jsi;RepoUri=$(Build.Repository.Uri)
versioningScheme: byEnvVar
versionEnvVar: Version
- task: PublishBuildArtifacts@1
displayName: "Publish final nuget artifacts"
inputs:
PathtoPublish: $(System.DefaultWorkingDirectory)\NugetRootFinal
ArtifactName: "V8Jsi-final-nuget"