diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8567b4c9..b8499b90 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: fail-fast: false matrix: os: - - ubuntu-18.04 + - ubuntu-20.04 - macos-latest - windows-latest @@ -61,9 +61,8 @@ jobs: - name: Upload variables uses: actions/upload-artifact@v1 with: - name: variables + name: variables-${{ runner.os }} path: obj/_artifacts/variables - if: runner.os == 'Windows' continue-on-error: true - name: Upload build_logs if: always() @@ -89,16 +88,15 @@ jobs: - name: Upload symbols uses: actions/upload-artifact@v1 with: - name: symbols + name: symbols-${{ runner.os }} path: obj/_artifacts/symbols - if: runner.os == 'Windows' continue-on-error: true - name: Upload deployables uses: actions/upload-artifact@v1 with: - name: deployables + name: deployables-${{ runner.os }} path: obj/_artifacts/deployables - if: always() && runner.os == 'Windows' + if: always() - name: Publish code coverage results to codecov.io run: bash <(curl -s https://codecov.io/bash) shell: bash diff --git a/azure-pipelines/Convert-PDB.ps1 b/azure-pipelines/Convert-PDB.ps1 index 7a20305d..2d394e72 100644 --- a/azure-pipelines/Convert-PDB.ps1 +++ b/azure-pipelines/Convert-PDB.ps1 @@ -18,13 +18,19 @@ [string]$OutputPath ) + if ($IsMacOS -or $IsLinux) { + Write-Error "This script only works on Windows" + return + } + $version = '1.1.0-beta2-21101-01' - $baseDir = "$PSScriptRoot\..\obj\tools" - $pdb2pdbpath = "$baseDir\Microsoft.DiaSymReader.Pdb2Pdb.$version\tools\Pdb2Pdb.exe" + $baseDir = "$PSScriptRoot/../obj/tools" + $pdb2pdbpath = "$baseDir/Microsoft.DiaSymReader.Pdb2Pdb.$version/tools/Pdb2Pdb.exe" if (-not (Test-Path $pdb2pdbpath)) { if (-not (Test-Path $baseDir)) { New-Item -Type Directory -Path $baseDir | Out-Null } $baseDir = (Resolve-Path $baseDir).Path # Normalize it - & (& $PSScriptRoot\Get-NuGetTool.ps1) install Microsoft.DiaSymReader.Pdb2Pdb -version $version -PackageSaveMode nuspec -OutputDirectory $baseDir -Source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json | Out-Null + Write-Verbose "& (& $PSScriptRoot/Get-NuGetTool.ps1) install Microsoft.DiaSymReader.Pdb2Pdb -version $version -PackageSaveMode nuspec -OutputDirectory $baseDir -Source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json | Out-Null" + & (& $PSScriptRoot/Get-NuGetTool.ps1) install Microsoft.DiaSymReader.Pdb2Pdb -version $version -PackageSaveMode nuspec -OutputDirectory $baseDir -Source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json | Out-Null } $args = $DllPath,'/out',$OutputPath,'/nowarn','0021' diff --git a/azure-pipelines/Get-SymbolFiles.ps1 b/azure-pipelines/Get-SymbolFiles.ps1 index bba177f1..45afe7c2 100644 --- a/azure-pipelines/Get-SymbolFiles.ps1 +++ b/azure-pipelines/Get-SymbolFiles.ps1 @@ -17,7 +17,7 @@ $WindowsPdbSubDirName = "symstore" $ActivityName = "Collecting symbols from $Path" Write-Progress -Activity $ActivityName -CurrentOperation "Discovery PDB files" -$PDBs = Get-ChildItem -rec "$Path\*.pdb" |? { $_.FullName -notmatch "\W$WindowsPdbSubDirName\W" } +$PDBs = Get-ChildItem -rec "$Path/*.pdb" |? { $_.FullName -notmatch "\W$WindowsPdbSubDirName\W" } # Filter PDBs to product OR test related. $testregex = "unittest|tests" @@ -44,8 +44,8 @@ $PDBs |% { } } |% { # Collect the DLLs/EXEs as well. - $dllPath = "$($_.Directory)\$($_.BaseName).dll" - $exePath = "$($_.Directory)\$($_.BaseName).exe" + $dllPath = "$($_.Directory)/$($_.BaseName).dll" + $exePath = "$($_.Directory)/$($_.BaseName).exe" if (Test-Path $dllPath) { $BinaryImagePath = $dllPath } elseif (Test-Path $exePath) { @@ -54,14 +54,16 @@ $PDBs |% { Write-Output $BinaryImagePath - # Convert the PDB to legacy Windows PDBs - Write-Host "Converting PDB for $_" -ForegroundColor DarkGray - $WindowsPdbDir = "$($_.Directory.FullName)\$WindowsPdbSubDirName" - if (!(Test-Path $WindowsPdbDir)) { mkdir $WindowsPdbDir | Out-Null } - & "$PSScriptRoot\Convert-PDB.ps1" -DllPath $BinaryImagePath -PdbPath $_ -OutputPath "$WindowsPdbDir\$($_.BaseName).pdb" - if ($LASTEXITCODE -ne 0) { - Write-Warning "PDB conversion of `"$_`" failed." - } + if (-not ($IsMacOS -or $IsLinux)) { + # Convert the PDB to legacy Windows PDBs + Write-Host "Converting PDB for $_" -ForegroundColor DarkGray + $WindowsPdbDir = "$($_.Directory.FullName)\$WindowsPdbSubDirName" + if (!(Test-Path $WindowsPdbDir)) { mkdir $WindowsPdbDir | Out-Null } + & "$PSScriptRoot\Convert-PDB.ps1" -DllPath $BinaryImagePath -PdbPath $_ -OutputPath "$WindowsPdbDir\$($_.BaseName).pdb" + if ($LASTEXITCODE -ne 0) { + Write-Warning "PDB conversion of `"$_`" failed." + } - Write-Output "$WindowsPdbDir\$($_.BaseName).pdb" + Write-Output "$WindowsPdbDir\$($_.BaseName).pdb" + } } diff --git a/azure-pipelines/artifacts/symbols.ps1 b/azure-pipelines/artifacts/symbols.ps1 index b3451ce1..8704571e 100644 --- a/azure-pipelines/artifacts/symbols.ps1 +++ b/azure-pipelines/artifacts/symbols.ps1 @@ -1,11 +1,5 @@ -# This doesn't work off Windows, nor do we need to convert symbols on multiple OS agents -if ($IsMacOS -or $IsLinux) { - return; -} - -$BinPath = [System.IO.Path]::GetFullPath("$PSScriptRoot\..\..\bin") -if (!(Test-Path $BinPath)) { return } -$symbolfiles = & "$PSScriptRoot\..\Get-SymbolFiles.ps1" -Path $BinPath | Get-Unique +$BinPath = [System.IO.Path]::GetFullPath("$PSScriptRoot/../../bin") +$symbolfiles = & "$PSScriptRoot/../Get-SymbolFiles.ps1" -Path $BinPath | Get-Unique @{ "$BinPath" = $SymbolFiles;