Pin public conformance evidence workspace
This commit is contained in:
parent
285c49abf2
commit
03011f93cf
8 changed files with 136 additions and 14 deletions
28
scripts/materialize-workspace.ps1
Normal file
28
scripts/materialize-workspace.ps1
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
param(
|
||||
[string] $WorkspaceRoot = "artifacts\workspace",
|
||||
[string] $LockPath = "conformance-workspace.lock.json"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$env:GIT_LFS_SKIP_SMUDGE = "1"
|
||||
$repoRoot = Split-Path -Parent $PSScriptRoot
|
||||
$lock = Get-Content -Raw -LiteralPath (Join-Path $repoRoot $LockPath) | ConvertFrom-Json
|
||||
$workspace = if ([IO.Path]::IsPathRooted($WorkspaceRoot)) { $WorkspaceRoot } else { Join-Path $repoRoot $WorkspaceRoot }
|
||||
New-Item -ItemType Directory -Force -Path $workspace | Out-Null
|
||||
|
||||
foreach ($repository in $lock.repositories) {
|
||||
$target = Join-Path $workspace $repository.name
|
||||
if (-not (Test-Path (Join-Path $target ".git"))) {
|
||||
git clone --filter=blob:none --no-checkout $repository.url $target
|
||||
}
|
||||
git -C $target remote set-url origin $repository.url
|
||||
git -C $target fetch --depth 1 origin $repository.commit
|
||||
git -C $target checkout --detach --force $repository.commit
|
||||
$actual = git -C $target rev-parse HEAD
|
||||
if ($actual -ne $repository.commit) {
|
||||
throw "$($repository.name) resolved $actual instead of $($repository.commit)."
|
||||
}
|
||||
Write-Host "$($repository.name) $actual"
|
||||
}
|
||||
|
||||
Write-Output (Resolve-Path $workspace).Path
|
||||
|
|
@ -1,11 +1,12 @@
|
|||
param(
|
||||
[string] $KernelRoot = $(if ($env:EVE_KERNEL_ROOT) { $env:EVE_KERNEL_ROOT } else { "E:\Projects\Eve" }),
|
||||
[string] $WorkspaceRoot = $(if ($env:EVE_WORKSPACE_ROOT) { $env:EVE_WORKSPACE_ROOT } else { Split-Path -Parent (Split-Path -Parent $PSScriptRoot) }),
|
||||
[string] $OutputDirectory = "artifacts\parity"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$repoRoot = Split-Path -Parent $PSScriptRoot
|
||||
$env:EVE_KERNEL_ROOT = (Resolve-Path $KernelRoot).Path
|
||||
$env:EVE_WORKSPACE_ROOT = (Resolve-Path $WorkspaceRoot).Path
|
||||
$env:EVE_KERNEL_ROOT = Join-Path $env:EVE_WORKSPACE_ROOT "Eve"
|
||||
$env:EVE_PARITY_OUTPUT = if ([IO.Path]::IsPathRooted($OutputDirectory)) {
|
||||
$OutputDirectory
|
||||
} else {
|
||||
|
|
@ -15,6 +16,7 @@ $env:EVE_CONFORMANCE_OUTPUT = Join-Path $repoRoot "artifacts\conformance"
|
|||
|
||||
Push-Location $repoRoot
|
||||
try {
|
||||
node .\tools\conformance\verify-workspace-lock.mjs $env:EVE_WORKSPACE_ROOT
|
||||
node .\tools\parity\run-parity.mjs
|
||||
node .\tools\conformance\consume-export.mjs .\artifacts\conformance\latest
|
||||
} finally {
|
||||
|
|
|
|||
Reference in a new issue