Skip to content

Commit

Permalink
Merge pull request #1222 from microsoft/main
Browse files Browse the repository at this point in the history
Merge 'main' into 'release_mdd'
  • Loading branch information
WardenGnaw authored Sep 17, 2021
2 parents ad29e47 + a0a3729 commit 20323a7
Show file tree
Hide file tree
Showing 70 changed files with 1,572 additions and 204 deletions.
36 changes: 12 additions & 24 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ jobs:
- name: Setup NuGet.exe for use with actions
uses: NuGet/[email protected]

- name: Restore the application
run: NuGet.exe restore ${{ github.workspace }}\src\MIDebugEngine.sln

- name: Build the application
run: msbuild ${{ github.workspace }}\src\MIDebugEngine.sln /p:Configuration=$env:Configuration
- name: Build MIDebugEngine
run: |
${{ github.workspace }}/eng/Scripts/CI-Build.cmd -c $env:Configuration -t vs
env:
Configuration: ${{ matrix.configuration }}

Expand Down Expand Up @@ -63,17 +61,12 @@ jobs:
- name: Setup NuGet.exe for use with actions
uses: NuGet/[email protected]

- name: Restore the application
run: NuGet.exe restore ${{ github.workspace }}\src\MIDebugEngine.sln

- name: Build the application
run: msbuild ${{ github.workspace }}\src\MIDebugEngine.sln /p:Configuration=Debug
- name: Build MIDebugEngine
run: |
${{ github.workspace }}/eng/Scripts/CI-Build.cmd -t vscode
- name: Build OpenDebugAD7
- name: Copy Test Configuration
run: |
dotnet publish ${{ github.workspace }}\src\OpenDebugAD7\OpenDebugAD7.csproj -c Debug -r win-x64 --self-contained -o ${{ github.workspace }}\bin\DebugAdapterProtocolTests\Debug\extension\debugAdapters
copy ${{ github.workspace }}\bin\Debug\Microsoft.MIDebugEngine.dll ${{ github.workspace }}\bin\DebugAdapterProtocolTests\Debug\extension\debugAdapters/.
copy ${{ github.workspace }}\bin\Debug\Microsoft.MICore.dll ${{ github.workspace }}\bin\DebugAdapterProtocolTests\Debug\extension\debugAdapters\.
copy ${{ github.workspace }}\bin\DebugAdapterProtocolTests\Debug\CppTests\TestConfigurations\config_msys_gdb.xml ${{ github.workspace }}\bin\DebugAdapterProtocolTests\Debug\CppTests\config.xml
- name: Setup MSYS2
Expand Down Expand Up @@ -120,12 +113,12 @@ jobs:
# echo 1 | sudo tee /proc/sys/kernel/core_uses_pid
# ulimit -S -c unlimited
# sudo sysctl -w kernel.core_pattern=${{ github.workspace }}/core.%e
- run: |
${{ github.workspace }}/PublishOpenDebugAD7.sh -c Debug -o ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/extension/debugAdapters
cp ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/TestConfigurations/config_gdb.xml ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/config.xml
${{ github.workspace }}/eng/Scripts/CI-Build.sh
- run: |
dotnet test ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/CppTests.dll --logger "trx;LogFileName=${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/results.trx"
${{ github.workspace }}/eng/Scripts/CI-Test.sh
- name: 'Upload Test Results'
uses: actions/upload-artifact@v2
Expand All @@ -151,15 +144,10 @@ jobs:
run: dotnet build ${{ github.workspace }}/src/MIDebugEngine-Unix.sln

- run: |
${{ github.workspace }}/PublishOpenDebugAD7.sh -c Debug -o ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/extension/debugAdapters
cp ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/TestConfigurations/config_lldb.xml ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/config.xml
- name: Download LLDB-MI
run: |
${{ github.workspace }}/tools/DownloadLldbMI.sh ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/extension/debugAdapters
${{ github.workspace }}/eng/Scripts/CI-Build.sh
- run: |
dotnet test ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/CppTests.dll --logger "trx;LogFileName=${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/results.trx"
${{ github.workspace }}/eng/Scripts/CI-Test.sh
- name: 'Upload Test Results'
uses: actions/upload-artifact@v2
Expand Down
15 changes: 15 additions & 0 deletions eng/Scripts/CI-Build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@echo off
setlocal

if "%~1"=="/?" goto Help
if "%~1"=="-?" goto Help
if "%~1"=="-h" goto Help

@SET Args= %*
@SET Args=%Args: /= -%
powershell -NoProfile -ExecutionPolicy bypass -File %~dp0CI-Build.ps1 %Args%
@exit /B %ERRORLEVEL%
goto :EOF

:Help
call powershell -NoProfile -ExecutionPolicy ByPass -Command "get-help %~dp0CI-Build.ps1 -detailed"
54 changes: 54 additions & 0 deletions eng/Scripts/CI-Build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
param(
[ValidateSet("Debug", "Release")]
[Alias("c")]
[string]$Configuration="Debug",

[ValidateSet("win-x86", "win10-arm64")]
[Alias("r")]
[string]$RID="win-x86",

[ValidateSet("vs", "vscode")]
[Alias("t")]
[string]$TargetPlatform="vs"
)

$ErrorActionPreference="Stop"

$RootPath = Resolve-Path -Path "$PSScriptRoot\..\.."

$msbuildPath = (Get-Command msbuild.exe -ErrorAction Ignore).Path

if (!$msbuildPath) {
throw "Please run the script from a developer command prompt or have msbuild.exe in your PATH"
}

msbuild /t:Restore $RootPath\src\MIDebugEngine.sln /p:Configuration=$Configuration
if ($lastexitcode -ne 0)
{
throw "Failed to restore packages for MIDebugEngine.sln"
}
msbuild $RootPath\src\MIDebugEngine.sln /p:Configuration=$Configuration
if ($lastexitcode -ne 0)
{
throw "Failed to build MIDebugEngine.sln"
}


if ($TargetPlatform -eq "vscode")
{
$dotnetPath = (Get-Command dotnet.exe -ErrorAction Ignore).Path;

if (!$dotnetPath) {
throw "Missing .NET SDK. Please install the SDK at https://dotnet.microsoft.com/download"
}

dotnet publish $RootPath\src\OpenDebugAD7\OpenDebugAD7.csproj -c $Configuration -r $RID --self-contained -o $RootPath\bin\DebugAdapterProtocolTests\$Configuration\extension\debugAdapters
if ($lastexitcode -ne 0)
{
throw "Failed to publish OpenDebugAD7"
}

Copy-Item $RootPath\bin\$Configuration\Microsoft.MIDebugEngine.dll $RootPath\bin\DebugAdapterProtocolTests\$Configuration\extension\debugAdapters/.
Copy-Item $RootPath\bin\$Configuration\Microsoft.MICore.dll $RootPath\bin\DebugAdapterProtocolTests\$Configuration\extension\debugAdapters\.
Copy-Item $RootPath\bin\$Configuration\vscode\WindowsDebugLauncher.exe $RootPath\bin\DebugAdapterProtocolTests\$Configuration\extension\debugAdapters\.
}
21 changes: 21 additions & 0 deletions eng/Scripts/CI-Build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

ScriptDir=$(dirname "$0")
RootDir=$ScriptDir/../..

if [ "$(which dotnet)" == "" ]; then
echo "ERROR: Missing .NET SDK. Please install the SDK at https://dotnet.microsoft.com/download"
exit 1
fi

if ! dotnet build "$RootDir"/src/MIDebugEngine-Unix.sln; then
echo "ERROR: Failed to build MIDebugEngine-Unix.sln"
exit 1
fi

if ! "$RootDir"/PublishOpenDebugAD7.sh -c Debug -o "$RootDir"/bin/DebugAdapterProtocolTests/Debug/extension/debugAdapters; then
echo "ERROR: Failed to build MIDebugEngine-Unix.sln"
exit 1
fi

exit 0
22 changes: 22 additions & 0 deletions eng/Scripts/CI-Test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

ScriptDir=$(dirname "$0")
RootDir=$ScriptDir/../..

if [ "$(which dotnet)" == "" ]; then
echo "ERROR: Missing .NET SDK. Please install the SDK at https://dotnet.microsoft.com/download"
fi

if [ ! -f "$RootDir/bin/DebugAdapterProtocolTests/Debug/CppTests/config.xml" ]; then
if [ "$(uname)" = "Darwin" ]; then
if ! "$RootDir"/tools/DownloadLldbMI.sh "$RootDir"/bin/DebugAdapterProtocolTests/Debug/extension/debugAdapters; then
echo "ERROR: Failed to download lldb-mi"
exit 1
fi
cp "$RootDir"/bin/DebugAdapterProtocolTests/Debug/CppTests/TestConfigurations/config_lldb.xml "$RootDir"/bin/DebugAdapterProtocolTests/Debug/CppTests/config.xml
else
cp "$RootDir"/bin/DebugAdapterProtocolTests/Debug/CppTests/TestConfigurations/config_gdb.xml "$RootDir"/bin/DebugAdapterProtocolTests/Debug/CppTests/config.xml
fi
fi

dotnet test "$RootDir"/bin/DebugAdapterProtocolTests/Debug/CppTests/CppTests.dll --logger "trx;LogFileName=$RootDir/bin/DebugAdapterProtocolTests/Debug/CppTests/results.trx"
4 changes: 2 additions & 2 deletions eng/pipelines/MIDebugEngine-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ stages:
- name: TeamName
value: MDDDebugger
jobs:
- template: ./jobs/VSEngSS-MicroBuild2019.job.yml
- template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml
parameters:
DisplayName: 'Lab.Debug'
JobTemplate:
- template: ../templates/Build.template.yml
parameters:
Configuration: 'Lab.Debug'

- template: ./jobs/VSEngSS-MicroBuild2019.job.yml
- template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml
parameters:
DisplayName: 'Lab.Release'
JobTemplate:
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/VS-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: $(Date:yyyMMdd).$(Rev:r)
variables:
- group: TSDTUSR
jobs:
- template: ./jobs/VSEngSS-MicroBuild2019.job.yml
- template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml
parameters:
DisplayName: 'VS_Release'
JobTemplate:
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/VSCode-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ stages:
- stage: Windows
dependsOn: []
jobs:
- template: ./jobs/VSEngSS-MicroBuild2019.job.yml
- template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml
parameters:
DisplayName: 'VSCode_Release'
JobTemplate:
Expand All @@ -24,7 +24,7 @@ stages:
- stage: OSX_ESRPSign
dependsOn: [OSX_CodeSign]
jobs:
- template: ./jobs/VSEngSS-MicroBuild2019.job.yml
- template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml
parameters:
DisplayName: 'OSX Sign/Harden'
JobTemplate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
- job:
displayName: ${{ parameters.DisplayName }}
pool:
name: VSEngSS-MicroBuild2019
name: VSEngSS-MicroBuild2019-1ES
demands:
- msbuild
- visualstudio
Expand Down
20 changes: 13 additions & 7 deletions loc/lcl/CHS/Microsoft.SSHDebugPS.dll.lcl
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
<Str Cat="Text">
<Val><![CDATA[Unable to enumerate installed GNU/Linux distributions. wsl.exe exited with code {0} (0x{0:X8}). More information may be available in the output window.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[无法枚举安装的 GNU/Linux 分发。wsl.exe 已退出,代码为 {0} (0x{0:X8}) 。输出窗口中可能有详细信息。]]></Val>
<Val><![CDATA[无法枚举已安装的 GNU/Linux 发行版。wsl.exe 退出,代码为 {0} (0x{0:X8})。输出窗口中可能有详细信息。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
Expand All @@ -260,7 +260,7 @@
<Str Cat="Text">
<Val><![CDATA['{0} {1}' failed and wrote the following text to standard error:]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA["{0} {1}" 失败,并将以下文本写入标准错误]]></Val>
<Val><![CDATA["{0} {1}" 失败,并将以下文本写入标准错误:]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
Expand All @@ -269,7 +269,7 @@
<Str Cat="Text">
<Val><![CDATA[Unable to use the Windows Subsystem for Linux (WSL) transport. No GNU/Linux distributions are installed.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[无法将 Windows 子系统用于 Linux (WSL) 传输。未安装 GNU/Linux 分发]]></Val>
<Val><![CDATA[无法使用适用于 Linux 的 Windows 子系统(WSL)传输。未安装 GNU/Linux 分发版]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
Expand All @@ -278,7 +278,7 @@
<Str Cat="Text">
<Val><![CDATA[Windows Subsystem for Linux (WSL) is not installed on this computer.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[此计算机上未安装 Linux (WSL) 的 Windows 子系统。]]></Val>
<Val><![CDATA[此计算机上未安装适用于 Linux 的 Windows 子系统(WSL)]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
Expand Down Expand Up @@ -322,6 +322,9 @@
<Item ItemId=";TransportTitle_Args1" ItemType="0" PsrId="211" InstFlg="true" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[{0} Transport]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[{0} 传输]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
Expand All @@ -338,22 +341,25 @@
<Str Cat="Text">
<Val><![CDATA[The Windows Subsystem for Linux (WSL) connection type allows Visual Studio to attach to local GNU/Linux processes.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[适用于 Linux 的 Windows 子系统 (WSL) 连接类型允许 Visual Studio 附加到本地 GNU/Linux 进程。]]></Val>
<Val><![CDATA[适用于 Linux 的 Windows 子系统(WSL)连接类型允许 Visual Studio 附加到本地 GNU/Linux 进程。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";WSL_PSName" ItemType="0" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Windows Subsystem for Linux (WSL)]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[适用于 Linux 的 Windows 子系统(WSL)]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";WSL_V2Required" ItemType="0" PsrId="211" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[The installed version of Windows Subsystem for Linux (WSL) is incompatible with Visual Studio's attach support. Please upgrade to WSL version 2 or newer.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[用于 Linux (WSL) 的 Windows 子系统的安装版本与 Visual Studio 的连接支持不兼容。请升级到 WSL 版本2或更高版本]]></Val>
<Val><![CDATA[安装的适用于 Linux 的 Windows 子系统(WSL)版本与 Visual Studio 的附加支持不兼容。请升级到 WSL 版本 2 或更高版本]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
Expand All @@ -371,7 +377,7 @@
<Str Cat="Text">
<Val><![CDATA[Enumerating installed GNU/Linux distributions...]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[正在枚举已安装的 GNU/Linux 分发 .。。]]></Val>
<Val><![CDATA[正在枚举已安装的 GNU/Linux 发行版...]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
Expand Down
Loading

0 comments on commit 20323a7

Please sign in to comment.