-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.ps1
30 lines (24 loc) · 853 Bytes
/
test.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
if (${env:GITHUB_WORKSPACE} -eq ${null}) {
${env:GITHUB_WORKSPACE}=${pwd}
}
if (${env:BUILD_TYPE} -eq ${null}) {
${env:BUILD_TYPE}="debug"
}
if (${env:VCPKG_TARGET_TRIPLET} -eq ${null}) {
${env:VCPKG_TARGET_TRIPLET}="x64-windows"
}
if ("x64-windows-static" -eq "${env:VCPKG_TARGET_TRIPLET}") {
${msvc_runtime_dynamic}="Off"
} else {
${msvc_runtime_dynamic}="On"
}
$vcpkgPrefix="${env:GITHUB_WORKSPACE}/build/vcpkg_installed/${env:VCPKG_TARGET_TRIPLET}/"
if ($env:BUILD_TYPE -eq "Debug") {
${vcpkgPrefix}="${vcpkgPrefix}/debug"
}
if (${msvc_runtime_dynamic} -eq "On") {
${env:PATH}="${vcpkgPrefix}/bin;${env:PATH}"
${env:QT_PLUGIN_PATH}="${vcpkgPrefix}/Qt6/plugins"
}
cd "${env:GITHUB_WORKSPACE}/build"
ctest --test-dir "${env:GITHUB_WORKSPACE}/build" -C "${env:BUILD_TYPE}" --output-junit "${env:GITHUB_WORKSPACE}/build/ctest.xml"