Skip to content

Commit 20323a7

Browse files
authored
Merge pull request #1222 from microsoft/main
Merge 'main' into 'release_mdd'
2 parents ad29e47 + a0a3729 commit 20323a7

File tree

70 files changed

+1572
-204
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1572
-204
lines changed

.github/workflows/pull-request.yml

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,9 @@ jobs:
2929
- name: Setup NuGet.exe for use with actions
3030
uses: NuGet/setup-nuget@v1.0.5
3131

32-
- name: Restore the application
33-
run: NuGet.exe restore ${{ github.workspace }}\src\MIDebugEngine.sln
34-
35-
- name: Build the application
36-
run: msbuild ${{ github.workspace }}\src\MIDebugEngine.sln /p:Configuration=$env:Configuration
32+
- name: Build MIDebugEngine
33+
run: |
34+
${{ github.workspace }}/eng/Scripts/CI-Build.cmd -c $env:Configuration -t vs
3735
env:
3836
Configuration: ${{ matrix.configuration }}
3937

@@ -63,17 +61,12 @@ jobs:
6361
- name: Setup NuGet.exe for use with actions
6462
uses: NuGet/setup-nuget@v1.0.5
6563

66-
- name: Restore the application
67-
run: NuGet.exe restore ${{ github.workspace }}\src\MIDebugEngine.sln
68-
69-
- name: Build the application
70-
run: msbuild ${{ github.workspace }}\src\MIDebugEngine.sln /p:Configuration=Debug
64+
- name: Build MIDebugEngine
65+
run: |
66+
${{ github.workspace }}/eng/Scripts/CI-Build.cmd -t vscode
7167
72-
- name: Build OpenDebugAD7
68+
- name: Copy Test Configuration
7369
run: |
74-
dotnet publish ${{ github.workspace }}\src\OpenDebugAD7\OpenDebugAD7.csproj -c Debug -r win-x64 --self-contained -o ${{ github.workspace }}\bin\DebugAdapterProtocolTests\Debug\extension\debugAdapters
75-
copy ${{ github.workspace }}\bin\Debug\Microsoft.MIDebugEngine.dll ${{ github.workspace }}\bin\DebugAdapterProtocolTests\Debug\extension\debugAdapters/.
76-
copy ${{ github.workspace }}\bin\Debug\Microsoft.MICore.dll ${{ github.workspace }}\bin\DebugAdapterProtocolTests\Debug\extension\debugAdapters\.
7770
copy ${{ github.workspace }}\bin\DebugAdapterProtocolTests\Debug\CppTests\TestConfigurations\config_msys_gdb.xml ${{ github.workspace }}\bin\DebugAdapterProtocolTests\Debug\CppTests\config.xml
7871
7972
- name: Setup MSYS2
@@ -120,12 +113,12 @@ jobs:
120113
# echo 1 | sudo tee /proc/sys/kernel/core_uses_pid
121114
# ulimit -S -c unlimited
122115
# sudo sysctl -w kernel.core_pattern=${{ github.workspace }}/core.%e
116+
123117
- run: |
124-
${{ github.workspace }}/PublishOpenDebugAD7.sh -c Debug -o ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/extension/debugAdapters
125-
cp ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/TestConfigurations/config_gdb.xml ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/config.xml
118+
${{ github.workspace }}/eng/Scripts/CI-Build.sh
126119
127120
- run: |
128-
dotnet test ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/CppTests.dll --logger "trx;LogFileName=${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/results.trx"
121+
${{ github.workspace }}/eng/Scripts/CI-Test.sh
129122
130123
- name: 'Upload Test Results'
131124
uses: actions/upload-artifact@v2
@@ -151,15 +144,10 @@ jobs:
151144
run: dotnet build ${{ github.workspace }}/src/MIDebugEngine-Unix.sln
152145

153146
- run: |
154-
${{ github.workspace }}/PublishOpenDebugAD7.sh -c Debug -o ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/extension/debugAdapters
155-
cp ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/TestConfigurations/config_lldb.xml ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/config.xml
156-
157-
- name: Download LLDB-MI
158-
run: |
159-
${{ github.workspace }}/tools/DownloadLldbMI.sh ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/extension/debugAdapters
147+
${{ github.workspace }}/eng/Scripts/CI-Build.sh
160148
161149
- run: |
162-
dotnet test ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/CppTests.dll --logger "trx;LogFileName=${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/results.trx"
150+
${{ github.workspace }}/eng/Scripts/CI-Test.sh
163151
164152
- name: 'Upload Test Results'
165153
uses: actions/upload-artifact@v2

eng/Scripts/CI-Build.cmd

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@echo off
2+
setlocal
3+
4+
if "%~1"=="/?" goto Help
5+
if "%~1"=="-?" goto Help
6+
if "%~1"=="-h" goto Help
7+
8+
@SET Args= %*
9+
@SET Args=%Args: /= -%
10+
powershell -NoProfile -ExecutionPolicy bypass -File %~dp0CI-Build.ps1 %Args%
11+
@exit /B %ERRORLEVEL%
12+
goto :EOF
13+
14+
:Help
15+
call powershell -NoProfile -ExecutionPolicy ByPass -Command "get-help %~dp0CI-Build.ps1 -detailed"

eng/Scripts/CI-Build.ps1

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
param(
2+
[ValidateSet("Debug", "Release")]
3+
[Alias("c")]
4+
[string]$Configuration="Debug",
5+
6+
[ValidateSet("win-x86", "win10-arm64")]
7+
[Alias("r")]
8+
[string]$RID="win-x86",
9+
10+
[ValidateSet("vs", "vscode")]
11+
[Alias("t")]
12+
[string]$TargetPlatform="vs"
13+
)
14+
15+
$ErrorActionPreference="Stop"
16+
17+
$RootPath = Resolve-Path -Path "$PSScriptRoot\..\.."
18+
19+
$msbuildPath = (Get-Command msbuild.exe -ErrorAction Ignore).Path
20+
21+
if (!$msbuildPath) {
22+
throw "Please run the script from a developer command prompt or have msbuild.exe in your PATH"
23+
}
24+
25+
msbuild /t:Restore $RootPath\src\MIDebugEngine.sln /p:Configuration=$Configuration
26+
if ($lastexitcode -ne 0)
27+
{
28+
throw "Failed to restore packages for MIDebugEngine.sln"
29+
}
30+
msbuild $RootPath\src\MIDebugEngine.sln /p:Configuration=$Configuration
31+
if ($lastexitcode -ne 0)
32+
{
33+
throw "Failed to build MIDebugEngine.sln"
34+
}
35+
36+
37+
if ($TargetPlatform -eq "vscode")
38+
{
39+
$dotnetPath = (Get-Command dotnet.exe -ErrorAction Ignore).Path;
40+
41+
if (!$dotnetPath) {
42+
throw "Missing .NET SDK. Please install the SDK at https://dotnet.microsoft.com/download"
43+
}
44+
45+
dotnet publish $RootPath\src\OpenDebugAD7\OpenDebugAD7.csproj -c $Configuration -r $RID --self-contained -o $RootPath\bin\DebugAdapterProtocolTests\$Configuration\extension\debugAdapters
46+
if ($lastexitcode -ne 0)
47+
{
48+
throw "Failed to publish OpenDebugAD7"
49+
}
50+
51+
Copy-Item $RootPath\bin\$Configuration\Microsoft.MIDebugEngine.dll $RootPath\bin\DebugAdapterProtocolTests\$Configuration\extension\debugAdapters/.
52+
Copy-Item $RootPath\bin\$Configuration\Microsoft.MICore.dll $RootPath\bin\DebugAdapterProtocolTests\$Configuration\extension\debugAdapters\.
53+
Copy-Item $RootPath\bin\$Configuration\vscode\WindowsDebugLauncher.exe $RootPath\bin\DebugAdapterProtocolTests\$Configuration\extension\debugAdapters\.
54+
}

eng/Scripts/CI-Build.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
ScriptDir=$(dirname "$0")
4+
RootDir=$ScriptDir/../..
5+
6+
if [ "$(which dotnet)" == "" ]; then
7+
echo "ERROR: Missing .NET SDK. Please install the SDK at https://dotnet.microsoft.com/download"
8+
exit 1
9+
fi
10+
11+
if ! dotnet build "$RootDir"/src/MIDebugEngine-Unix.sln; then
12+
echo "ERROR: Failed to build MIDebugEngine-Unix.sln"
13+
exit 1
14+
fi
15+
16+
if ! "$RootDir"/PublishOpenDebugAD7.sh -c Debug -o "$RootDir"/bin/DebugAdapterProtocolTests/Debug/extension/debugAdapters; then
17+
echo "ERROR: Failed to build MIDebugEngine-Unix.sln"
18+
exit 1
19+
fi
20+
21+
exit 0

eng/Scripts/CI-Test.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
ScriptDir=$(dirname "$0")
4+
RootDir=$ScriptDir/../..
5+
6+
if [ "$(which dotnet)" == "" ]; then
7+
echo "ERROR: Missing .NET SDK. Please install the SDK at https://dotnet.microsoft.com/download"
8+
fi
9+
10+
if [ ! -f "$RootDir/bin/DebugAdapterProtocolTests/Debug/CppTests/config.xml" ]; then
11+
if [ "$(uname)" = "Darwin" ]; then
12+
if ! "$RootDir"/tools/DownloadLldbMI.sh "$RootDir"/bin/DebugAdapterProtocolTests/Debug/extension/debugAdapters; then
13+
echo "ERROR: Failed to download lldb-mi"
14+
exit 1
15+
fi
16+
cp "$RootDir"/bin/DebugAdapterProtocolTests/Debug/CppTests/TestConfigurations/config_lldb.xml "$RootDir"/bin/DebugAdapterProtocolTests/Debug/CppTests/config.xml
17+
else
18+
cp "$RootDir"/bin/DebugAdapterProtocolTests/Debug/CppTests/TestConfigurations/config_gdb.xml "$RootDir"/bin/DebugAdapterProtocolTests/Debug/CppTests/config.xml
19+
fi
20+
fi
21+
22+
dotnet test "$RootDir"/bin/DebugAdapterProtocolTests/Debug/CppTests/CppTests.dll --logger "trx;LogFileName=$RootDir/bin/DebugAdapterProtocolTests/Debug/CppTests/results.trx"

eng/pipelines/MIDebugEngine-CI.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ stages:
2020
- name: TeamName
2121
value: MDDDebugger
2222
jobs:
23-
- template: ./jobs/VSEngSS-MicroBuild2019.job.yml
23+
- template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml
2424
parameters:
2525
DisplayName: 'Lab.Debug'
2626
JobTemplate:
2727
- template: ../templates/Build.template.yml
2828
parameters:
2929
Configuration: 'Lab.Debug'
3030

31-
- template: ./jobs/VSEngSS-MicroBuild2019.job.yml
31+
- template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml
3232
parameters:
3333
DisplayName: 'Lab.Release'
3434
JobTemplate:

eng/pipelines/VS-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: $(Date:yyyMMdd).$(Rev:r)
33
variables:
44
- group: TSDTUSR
55
jobs:
6-
- template: ./jobs/VSEngSS-MicroBuild2019.job.yml
6+
- template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml
77
parameters:
88
DisplayName: 'VS_Release'
99
JobTemplate:

eng/pipelines/VSCode-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ stages:
66
- stage: Windows
77
dependsOn: []
88
jobs:
9-
- template: ./jobs/VSEngSS-MicroBuild2019.job.yml
9+
- template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml
1010
parameters:
1111
DisplayName: 'VSCode_Release'
1212
JobTemplate:
@@ -24,7 +24,7 @@ stages:
2424
- stage: OSX_ESRPSign
2525
dependsOn: [OSX_CodeSign]
2626
jobs:
27-
- template: ./jobs/VSEngSS-MicroBuild2019.job.yml
27+
- template: ./jobs/VSEngSS-MicroBuild2019-1ES.job.yml
2828
parameters:
2929
DisplayName: 'OSX Sign/Harden'
3030
JobTemplate:

eng/pipelines/jobs/VSEngSS-MicroBuild2019.job.yml renamed to eng/pipelines/jobs/VSEngSS-MicroBuild2019-1ES.job.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
- job:
99
displayName: ${{ parameters.DisplayName }}
1010
pool:
11-
name: VSEngSS-MicroBuild2019
11+
name: VSEngSS-MicroBuild2019-1ES
1212
demands:
1313
- msbuild
1414
- visualstudio

loc/lcl/CHS/Microsoft.SSHDebugPS.dll.lcl

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@
251251
<Str Cat="Text">
252252
<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>
253253
<Tgt Cat="Text" Stat="Loc" Orig="New">
254-
<Val><![CDATA[无法枚举安装的 GNU/Linux 分发。wsl.exe 已退出,代码为 {0} (0x{0:X8}) 。输出窗口中可能有详细信息。]]></Val>
254+
<Val><![CDATA[无法枚举已安装的 GNU/Linux 发行版。wsl.exe 退出,代码为 {0} (0x{0:X8})。输出窗口中可能有详细信息。]]></Val>
255255
</Tgt>
256256
</Str>
257257
<Disp Icon="Str" />
@@ -260,7 +260,7 @@
260260
<Str Cat="Text">
261261
<Val><![CDATA['{0} {1}' failed and wrote the following text to standard error:]]></Val>
262262
<Tgt Cat="Text" Stat="Loc" Orig="New">
263-
<Val><![CDATA["{0} {1}" 失败,并将以下文本写入标准错误]]></Val>
263+
<Val><![CDATA["{0} {1}" 失败,并将以下文本写入标准错误:]]></Val>
264264
</Tgt>
265265
</Str>
266266
<Disp Icon="Str" />
@@ -269,7 +269,7 @@
269269
<Str Cat="Text">
270270
<Val><![CDATA[Unable to use the Windows Subsystem for Linux (WSL) transport. No GNU/Linux distributions are installed.]]></Val>
271271
<Tgt Cat="Text" Stat="Loc" Orig="New">
272-
<Val><![CDATA[无法将 Windows 子系统用于 Linux (WSL) 传输。未安装 GNU/Linux 分发]]></Val>
272+
<Val><![CDATA[无法使用适用于 Linux 的 Windows 子系统(WSL)传输。未安装 GNU/Linux 分发版]]></Val>
273273
</Tgt>
274274
</Str>
275275
<Disp Icon="Str" />
@@ -278,7 +278,7 @@
278278
<Str Cat="Text">
279279
<Val><![CDATA[Windows Subsystem for Linux (WSL) is not installed on this computer.]]></Val>
280280
<Tgt Cat="Text" Stat="Loc" Orig="New">
281-
<Val><![CDATA[此计算机上未安装 Linux (WSL) 的 Windows 子系统。]]></Val>
281+
<Val><![CDATA[此计算机上未安装适用于 Linux 的 Windows 子系统(WSL)]]></Val>
282282
</Tgt>
283283
</Str>
284284
<Disp Icon="Str" />
@@ -322,6 +322,9 @@
322322
<Item ItemId=";TransportTitle_Args1" ItemType="0" PsrId="211" InstFlg="true" Leaf="true">
323323
<Str Cat="Text">
324324
<Val><![CDATA[{0} Transport]]></Val>
325+
<Tgt Cat="Text" Stat="Loc" Orig="New">
326+
<Val><![CDATA[{0} 传输]]></Val>
327+
</Tgt>
325328
</Str>
326329
<Disp Icon="Str" />
327330
</Item>
@@ -338,22 +341,25 @@
338341
<Str Cat="Text">
339342
<Val><![CDATA[The Windows Subsystem for Linux (WSL) connection type allows Visual Studio to attach to local GNU/Linux processes.]]></Val>
340343
<Tgt Cat="Text" Stat="Loc" Orig="New">
341-
<Val><![CDATA[适用于 Linux 的 Windows 子系统 (WSL) 连接类型允许 Visual Studio 附加到本地 GNU/Linux 进程。]]></Val>
344+
<Val><![CDATA[适用于 Linux 的 Windows 子系统(WSL)连接类型允许 Visual Studio 附加到本地 GNU/Linux 进程。]]></Val>
342345
</Tgt>
343346
</Str>
344347
<Disp Icon="Str" />
345348
</Item>
346349
<Item ItemId=";WSL_PSName" ItemType="0" PsrId="211" Leaf="true">
347350
<Str Cat="Text">
348351
<Val><![CDATA[Windows Subsystem for Linux (WSL)]]></Val>
352+
<Tgt Cat="Text" Stat="Loc" Orig="New">
353+
<Val><![CDATA[适用于 Linux 的 Windows 子系统(WSL)]]></Val>
354+
</Tgt>
349355
</Str>
350356
<Disp Icon="Str" />
351357
</Item>
352358
<Item ItemId=";WSL_V2Required" ItemType="0" PsrId="211" Leaf="true">
353359
<Str Cat="Text">
354360
<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>
355361
<Tgt Cat="Text" Stat="Loc" Orig="New">
356-
<Val><![CDATA[用于 Linux (WSL) 的 Windows 子系统的安装版本与 Visual Studio 的连接支持不兼容。请升级到 WSL 版本2或更高版本]]></Val>
362+
<Val><![CDATA[安装的适用于 Linux 的 Windows 子系统(WSL)版本与 Visual Studio 的附加支持不兼容。请升级到 WSL 版本 2 或更高版本]]></Val>
357363
</Tgt>
358364
</Str>
359365
<Disp Icon="Str" />
@@ -371,7 +377,7 @@
371377
<Str Cat="Text">
372378
<Val><![CDATA[Enumerating installed GNU/Linux distributions...]]></Val>
373379
<Tgt Cat="Text" Stat="Loc" Orig="New">
374-
<Val><![CDATA[正在枚举已安装的 GNU/Linux 分发 .。。]]></Val>
380+
<Val><![CDATA[正在枚举已安装的 GNU/Linux 发行版...]]></Val>
375381
</Tgt>
376382
</Str>
377383
<Disp Icon="Str" />

0 commit comments

Comments
 (0)