* Removed old PR pipelines

* Parameterize NUSPEC

* Use PowerShell [versin] type.

* Rename PdbExtension to NuGetExcludeExtensions
This commit is contained in:
Julio César Rocha 2020-10-30 16:55:43 -07:00 коммит произвёл GitHub
Родитель 43c12ebef3
Коммит 3fea671e1a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 26 добавлений и 222 удалений

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

@ -14,7 +14,7 @@ pool:
jobs:
- job: V8JsiBuild
timeoutInMinutes: 180
displayName: Build and publish v8jsi.dll
displayName: Build v8jsi.dll
strategy:
matrix:
Desktop|x64|Debug:
@ -99,8 +99,10 @@ jobs:
matrix:
Desktop:
NuGetId: ReactNative.V8Jsi.Windows
NuGetExcludeExtensions: ipdb
Universal:
NuGetId: ReactNative.V8Jsi.Windows.UWP
NuGetExcludeExtensions: pdb
steps:
- checkout: none
@ -121,15 +123,16 @@ jobs:
$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
Write-Host "##vso[task.setvariable variable=VersionDetails]V8 version: $Version; Git revision: $(Build.SourceVersion)"
displayName: Set AppPlatform-dependent variables
- task: NuGetCommand@2
displayName: 'NuGet Pack'
inputs:
command: pack
packagesToPack: $(System.DefaultWorkingDirectory)\V8Jsi\$(NuGetId).nuspec
packagesToPack: $(System.DefaultWorkingDirectory)\V8Jsi\ReactNative.V8Jsi.Windows.nuspec
packDestination: $(System.DefaultWorkingDirectory)\NugetRootFinal
buildProperties: Id=$(NuGetId);CommitId=$(Build.SourceVersion);nugetroot=$(System.DefaultWorkingDirectory)\V8Jsi;RepoUri=$(Build.Repository.Uri)
buildProperties: Id=$(NuGetId);CommitId=$(Build.SourceVersion);nugetroot=$(System.DefaultWorkingDirectory)\V8Jsi;RepoUri=$(Build.Repository.Uri);VersionDetails=$(VersionDetails);NuGetExcludeExtensions=$(NuGetExcludeExtensions)
versioningScheme: byEnvVar
versionEnvVar: Version
includeSymbols: true

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

@ -3,15 +3,18 @@
<metadata>
<id>$Id$</id>
<version>$Version$</version>
<description>Contains a Windows implementation of the V8 JSI wrapper for ReactNative (VERSION_DETAILS)</description>
<!-- VERSION_DETAILS => [UWP,] V8 version: $v8Version; Git revision: $gitRevision -->
<description>Contains a Windows implementation of the V8 JSI wrapper for ReactNative ($VersionDetails$)</description>
<authors>Facebook, Google, Microsoft</authors>
<projectUrl>https://github.com/microsoft/v8-jsi</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<repository type="git" url="$RepoUri$" commit="$CommitId$" />
</metadata>
<files>
<file src="$nugetroot$\lib\**\*.*" target="lib" exclude="**\*.iobj;**\*.ipdb;**\*.exp;**\*.ilk" />
<file src="$nugetroot$\build\**\*.*" target="build"/>
<!-- NuGetExcludeExtensions: win32 => ipdb, uwp => pdb -->
<file src="$nugetroot$\lib\**\*.*" target="lib" exclude="**\*.iobj;**\*.$NuGetExcludeExtensions$;**\*.exp;**\*.ilk" />
<file src="$nugetroot$\build\**\*.*" target="build" exclude="**\*.targets" />
<file src="$nugetroot$\build\native\ReactNative.V8Jsi.Windows.targets" target="build\native\$Id$.targets" />
<file src="$nugetroot$\license\*.*" target="license"/>
</files>
</package>

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

@ -1,96 +0,0 @@
name: v8jsi_uwp.0.0.$(Date:yyMM.d)$(Rev:rrr)
trigger:
- master
- "*-stable"
pr:
- master
- "*-stable"
pool:
vmImage: 'windows-latest'
jobs:
- job: V8JsiBuild
timeoutInMinutes: 180
displayName: Build the UWP v8jsi.dll binary for supported architectures and flavors
strategy:
matrix:
UWPX64Debug:
BuildConfiguration: Debug
BuildPlatform: x64
AppPlatform: uwp
UWPX86Debug:
BuildConfiguration: Debug
BuildPlatform: x86
AppPlatform: uwp
UWPARM64Debug:
BuildConfiguration: Debug
BuildPlatform: arm64
AppPlatform: uwp
UWPX64Release:
BuildConfiguration: Release
BuildPlatform: x64
AppPlatform: uwp
UWPX86Release:
BuildConfiguration: Release
BuildPlatform: x86
AppPlatform: uwp
UWPARM64Release:
BuildConfiguration: Release
BuildPlatform: arm64
AppPlatform: uwp
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
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.UWP.nuspec
packDestination: $(System.DefaultWorkingDirectory)\NugetRootFinal
buildProperties: 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,101 +0,0 @@
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"

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

@ -137,15 +137,11 @@ Copy-Item "$jsigitpath\jsi\jsi.cpp" -Destination "$OutputPath\build\native\jsi\j
Copy-Item "$jsigitpath\jsi\instrumentation.h" -Destination "$OutputPath\build\native\jsi\jsi\"
# Miscellaneous
if ($AppPlatform -eq "uwp") {
(Get-Content "$SourcesPath\ReactNative.V8Jsi.Windows.targets") -replace ('win32</V8AppPlatform>', "uwp</V8AppPlatform>") | Set-Content "$OutputPath\build\native\ReactNative.V8Jsi.Windows.UWP.targets"
} else {
Copy-Item "$SourcesPath\ReactNative.V8Jsi.Windows.targets" -Destination "$OutputPath\build\native\"
}
Copy-Item "$SourcesPath\ReactNative.V8Jsi.Windows.targets" -Destination "$OutputPath\build\native\"
Copy-Item "$SourcesPath\config.json" -Destination "$OutputPath\"
Copy-Item "$SourcesPath\LICENSE" -Destination "$OutputPath\license\"
Copy-Item "$SourcesPath\config.json" -Destination "$OutputPath\"
Copy-Item "$SourcesPath\LICENSE" -Destination "$OutputPath\license\"
Copy-Item "$SourcesPath\LICENSE.jsi.md" -Destination "$OutputPath\license\"
Copy-Item "$SourcesPath\LICENSE.v8.md" -Destination "$OutputPath\license\"
Copy-Item "$SourcesPath\LICENSE.v8.md" -Destination "$OutputPath\license\"
Write-Host "Done!"

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

@ -45,13 +45,13 @@ Pop-Location
Pop-Location
Pop-Location
$verString = $config.version
$version = [version]$config.version
$gitRevision = ""
$v8Version = ""
$vermap = $verString.Split(".")
#TODO: Remove before merging
Write-Warning "CheckoutVersion: [$CheckoutVersion]"
$Matches = $CheckOutVersion | Select-String -Pattern 'HEAD is now at (.+) Version (.+)'
if ($Matches.Matches.Success) {
$gitRevision = $Matches.Matches.Groups[1].Value
@ -66,13 +66,12 @@ if (!(Test-Path -Path $OutputPath)) {
$buildoutput = Join-Path $workpath "v8build\v8\out\$Platform\$Configuration"
(Get-Content "$SourcesPath\src\version.rc") -replace ('V8JSIVER_MAJOR', $vermap[0]) -replace ('V8JSIVER_MINOR', $vermap[1]) -replace ('V8JSIVER_BUILD', $vermap[2]) -replace ('V8JSIVER_V8REF', $v8Version.Replace('.', '_')) | Set-Content "$SourcesPath\src\version_gen.rc"
if ($AppPlatform -eq "uwp") {
(Get-Content "$SourcesPath\ReactNative.V8Jsi.Windows.nuspec") -replace ('VERSION_DETAILS', "UWP, V8 version: $v8Version; Git revision: $gitRevision") -replace ('ipdb;', 'pdb;') -replace ('V8Jsi.Windows', 'V8Jsi.Windows.UWP') | Set-Content "$OutputPath\ReactNative.V8Jsi.Windows.UWP.nuspec"
} else {
(Get-Content "$SourcesPath\ReactNative.V8Jsi.Windows.nuspec") -replace ('VERSION_DETAILS', "V8 version: $v8Version; Git revision: $gitRevision") | Set-Content "$OutputPath\ReactNative.V8Jsi.Windows.nuspec"
}
(Get-Content "$SourcesPath\src\version.rc") `
-replace ('V8JSIVER_MAJOR', $version.Major) `
-replace ('V8JSIVER_MINOR', $version.Minor) `
-replace ('V8JSIVER_BUILD', $version.Build) `
-replace ('V8JSIVER_V8REF', $v8Version.Replace('.', '_')) |`
Set-Content "$SourcesPath\src\version_gen.rc"
Write-Host "##vso[task.setvariable variable=V8JSI_VERSION;]$verString"