@@ -38,40 +38,47 @@ end {
38
38
Start-PSBootstrap
39
39
Start-BuildNativeUnixBinaries
40
40
41
- $buildOutputPath = Join-Path $RepoRoot "src/powershell-unix"
42
- Compress-Archive -Path $buildOutputPath/libpsl-native.* -DestinationPath "$TargetLocation/$Arch-symbols.zip" -Verbose
41
+ if ($env:BUILD_REASON -ne 'PullRequest') {
42
+ $buildOutputPath = Join-Path $RepoRoot "src/powershell-unix"
43
+ Compress-Archive -Path $buildOutputPath/libpsl-native.* -DestinationPath "$TargetLocation/$Arch-symbols.zip" -Verbose
44
+ } else {
45
+ Write-Verbose -Verbose "Skipping artifact upload since this is a PR."
46
+ }
43
47
44
48
$testResultPath = Join-Path $RepoRoot -ChildPath 'src/libpsl-native/test/native-tests.xml'
45
49
46
50
if (Test-Path $testResultPath) {
47
- if ($Arch -eq 'linux-x64') {
48
- $name = 'linux-x64-native-tests.xml'
49
- }
50
- else {
51
- $name = 'osx-native-tests.xml'
52
- }
53
-
54
- Copy-Item $testResultPath -Destination "$TargetLocation/$name" -Verbose
51
+ Copy-Item $testResultPath -Destination $TargetLocation -Verbose -Force
55
52
}
56
53
}
57
54
elseif ($Arch -eq 'linux-arm') {
58
55
Start-PSBootstrap -BuildLinuxArm
59
56
Start-BuildNativeUnixBinaries -BuildLinuxArm
60
57
61
- $buildOutputPath = Join-Path $RepoRoot "src/powershell-unix"
62
- Compress-Archive -Path $buildOutputPath/libpsl-native.* -DestinationPath "$TargetLocation/$Arch-symbols.zip" -Verbose
58
+ if ($env:BUILD_REASON -ne 'PullRequest') {
59
+ $buildOutputPath = Join-Path $RepoRoot "src/powershell-unix"
60
+ Compress-Archive -Path $buildOutputPath/libpsl-native.* -DestinationPath "$TargetLocation/$Arch-symbols.zip" -Verbose
61
+ } else {
62
+ Write-Verbose -Verbose "Skipping artifact upload since this is a PR."
63
+ }
64
+
63
65
}
64
66
else {
65
67
Write-Verbose "Starting Start-PSBootstrap" -Verbose
66
68
Start-PSBootstrap -BuildWindowsNative
67
69
Write-Verbose "Starting Start-BuildNativeWindowsBinaries" -Verbose
68
70
Start-BuildNativeWindowsBinaries -Configuration $Configuration -Arch $Arch -Clean
69
71
Write-Verbose "Completed Start-BuildNativeWindowsBinaries" -Verbose
70
- $buildOutputPath = Join-Path $RepoRoot "src/powershell-win-core"
71
- Compress-Archive -Path "$buildOutputPath/*.dll" -DestinationPath "$TargetLocation/$Arch-symbols.zip" -Verbose
72
72
73
- if ($Symbols.IsPresent) {
74
- Compress-Archive -Path "$buildOutputPath/*.pdb" -DestinationPath "$TargetLocation/$Arch-symbols.zip" -Update -Verbose
73
+ if ($env:BUILD_REASON -ne 'PullRequest') {
74
+ $buildOutputPath = Join-Path $RepoRoot "src/powershell-win-core"
75
+ Compress-Archive -Path "$buildOutputPath/*.dll" -DestinationPath "$TargetLocation/$Arch-symbols.zip" -Verbose
76
+
77
+ if ($Symbols.IsPresent) {
78
+ Compress-Archive -Path "$buildOutputPath/*.pdb" -DestinationPath "$TargetLocation/$Arch-symbols.zip" -Update -Verbose
79
+ }
80
+ } else {
81
+ Write-Verbose -Verbose "Skipping artifact upload since this is a PR."
75
82
}
76
83
}
77
84
}
0 commit comments