From e5d4a7fbc0b55005dc3b6981be56b6ea7bd3e72e Mon Sep 17 00:00:00 2001 From: "Stefan J. Wernli" Date: Wed, 7 Apr 2021 22:43:31 -0700 Subject: [PATCH] Include QIR Runtime binaries and headers in drops This updates the build script to copy the QIR Runtime binaries and headers into the drops folder. This will ensure that during PR builds (non-e2e) the corresponding cross-platform binaries are still produced as build artifacts. --- src/Qir/Runtime/build-qir-runtime.ps1 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Qir/Runtime/build-qir-runtime.ps1 b/src/Qir/Runtime/build-qir-runtime.ps1 index d9e8f6e06df..f9c1ee2aa06 100644 --- a/src/Qir/Runtime/build-qir-runtime.ps1 +++ b/src/Qir/Runtime/build-qir-runtime.ps1 @@ -6,3 +6,18 @@ if (-not (Build-CMakeProject $PSScriptRoot "QIR Runtime")) { throw "At least one project failed to compile. Check the logs." } + +# Copy the results of runtime compilation and the corresponding headers to the drops folder so +# they can be included in pipeline artifacts. +$qirDropsFolder = (Join-Path $Env:DROPS_DIR QIR) +$qirDropsBin = (Join-Path $qirDropsFolder bin) +$qirDropsInclude = (Join-Path $qirDropsFolder include) +if (-not (Test-Path $qirDropsFolder)) { + New-Item -Path $qirDropsFolder -ItemType "directory" + New-Item -Path $qirDropsBin -ItemType "directory" + New-Item -Path $qirDropsInclude -ItemType "directory" +} +$qirBinaries = (Join-Path $PSScriptRoot build $Env:BUILD_CONFIGURATION bin *) +$qirIncludes = (Join-Path $PSScriptRoot public *) +Copy-Item $qirBinaries $qirDropsBin +Copy-Item $qirIncludes $qirDropsInclude \ No newline at end of file