-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1184 from gregg-miskelly/release_mdd
Update release_mdd for 17.0 preview 3
- Loading branch information
Showing
98 changed files
with
1,541 additions
and
3,158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
name: Pull Request | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
windows_vs_build: | ||
strategy: | ||
matrix: | ||
configuration: [Debug, Release] | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 5.0.x | ||
|
||
- name: Setup MSBuild.exe | ||
uses: microsoft/[email protected] | ||
|
||
- 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 | ||
env: | ||
Configuration: ${{ matrix.configuration }} | ||
|
||
- name: Setup VSTest.console.exe | ||
uses: darenm/Setup-VSTest@v1 | ||
|
||
- name: Run VS Extension tests | ||
run: vstest.console.exe ${{ github.workspace }}\bin\${{ matrix.configuration }}\MICoreUnitTests.dll ${{ github.workspace }}\bin\${{ matrix.configuration }}\JDbgUnitTests.dll ${{ github.workspace }}\bin\${{ matrix.configuration }}\SSHDebugTests.dll | ||
|
||
windows_vscode_build: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 5.0.x | ||
|
||
- name: Setup MSBuild.exe | ||
uses: microsoft/[email protected] | ||
|
||
- 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 OpenDebugAD7 | ||
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 | ||
uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: mingw64 | ||
update: true | ||
install: >- | ||
mingw-w64-x86_64-toolchain | ||
- run: > | ||
dotnet test ${{ github.workspace }}\bin\DebugAdapterProtocolTests\Debug\CppTests\CppTests.dll --logger "trx;LogFileName=${{ github.workspace }}\bin\DebugAdapterProtocolTests\Debug\CppTests\results.trx" | ||
- name: 'Upload Test Results' | ||
uses: actions/upload-artifact@v2 | ||
if: ${{ always() }} | ||
with: | ||
name: win_msys2_x64_results | ||
path: ${{ github.workspace }}\bin\DebugAdapterProtocolTests\Debug\CppTests\results.trx | ||
|
||
linux_build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 5.0.x | ||
|
||
- name: Build | ||
run: dotnet build ${{ github.workspace }}/src/MIDebugEngine-Unix.sln | ||
|
||
- run: | | ||
sudo apt-get install gdb g++ -y | ||
which g++ | ||
which gdb | ||
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope | ||
# TODO: Try to make core dumps work | ||
# Related CoreDump Tests: https://github.com/microsoft/MIEngine/issues/1170 | ||
# 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 | ||
- run: | | ||
dotnet test ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/CppTests.dll --logger "trx;LogFileName=${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/results.trx" | ||
- name: 'Upload Test Results' | ||
uses: actions/upload-artifact@v2 | ||
if: ${{ always() }} | ||
with: | ||
name: linux_x64_results | ||
path: ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/results.trx | ||
|
||
osx_build: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 5.0.x | ||
|
||
- name: Build | ||
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 | ||
- run: | | ||
dotnet test ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/CppTests.dll --logger "trx;LogFileName=${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/results.trx" | ||
- name: 'Upload Test Results' | ||
uses: actions/upload-artifact@v2 | ||
if: ${{ always() }} | ||
with: | ||
name: osx_x64_results | ||
path: ${{ github.workspace }}/bin/DebugAdapterProtocolTests/Debug/CppTests/results.trx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
#!/bin/sh | ||
|
||
# Copyright (c) Microsoft. All rights reserved. | ||
|
||
# Working dirctory to return to | ||
__InitialCWD=$(pwd) | ||
|
||
# Location of the script | ||
__ScriptDirectory= | ||
|
||
# RuntimeID to publish | ||
__RuntimeID= | ||
|
||
# Configuration of build | ||
__Configuration=Debug | ||
|
||
# OutputFolder | ||
__OutputFolder= | ||
|
||
log_and_exec_cmd() { | ||
echo "##[command] $1" | ||
$1 | ||
} | ||
|
||
print_help() | ||
{ | ||
echo 'PublishOpenDebugAD7.sh [-h] [-c C] [-r R]' | ||
echo '' | ||
echo 'This script publishes OpenDebugAD7' | ||
echo '-h Prints usage information.' | ||
echo '-c C The configuration to publish OpenDebugAD7. Defaults to Debug.' | ||
echo '-r R The RuntimeID to publish OpenDebugAD7. Defaults to machine arch.' | ||
echo '-o O Folder to output the publish. Defaults to the `dotnet publish` folder.' | ||
} | ||
|
||
# Gets the script directory | ||
get_script_directory() | ||
{ | ||
scriptDirectory=$(dirname "$0") | ||
cd "$scriptDirectory" || fail "Command failed: 'cd \"$scriptDirectory\"'" | ||
__ScriptDirectory=$(pwd) | ||
cd "$__InitialCWD" || fail "Command failed: 'cd \"$__InitialCWD\"'" | ||
} | ||
|
||
# Parses and populates the arguments | ||
parse_and_get_arguments() | ||
{ | ||
while getopts "hc:r:o:" opt; do | ||
case $opt in | ||
c) | ||
__Configuration=$OPTARG | ||
;; | ||
r) | ||
__RuntimeID=$OPTARG | ||
;; | ||
o) | ||
__OutputFolder=$OPTARG | ||
;; | ||
h) | ||
print_help | ||
exit 1 | ||
;; | ||
:) | ||
echo "ERROR: Option expected for -$OPTARG" | ||
print_help | ||
exit 1 | ||
;; | ||
*) | ||
print_help | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
} | ||
|
||
get_dotnet_runtime_id() | ||
{ | ||
if [ "$(uname)" = "Darwin" ]; then | ||
if [ "$(uname -m)" = "arm64" ]; then | ||
__RuntimeID=osx-arm64 | ||
else | ||
__RuntimeID=osx-x64 | ||
fi | ||
elif [ "$(uname -m)" = "x86_64" ]; then | ||
__RuntimeID=linux-x64 | ||
if [ -e /etc/os-release ]; then | ||
# '.' is the same as 'source' but is POSIX compliant | ||
. /etc/os-release | ||
if [ "$ID" = "alpine" ]; then | ||
__RuntimeID=linux-musl-x64 | ||
fi | ||
fi | ||
elif [ "$(uname -m)" = "armv7l" ]; then | ||
__RuntimeID=linux-arm | ||
elif [ "$(uname -m)" = "aarch64" ]; then | ||
__RuntimeID=linux-arm64 | ||
if [ -e /etc/os-release ]; then | ||
# '.' is the same as 'source' but is POSIX compliant | ||
. /etc/os-release | ||
if [ "$ID" = "alpine" ]; then | ||
__RuntimeID=linux-musl-arm64 | ||
fi | ||
fi | ||
fi | ||
} | ||
|
||
get_script_directory | ||
|
||
if [ -z "$1" ]; then | ||
echo "ERROR: Missing arguments for PublishOpenDebugAD7.sh" | ||
print_help | ||
exit 1 | ||
else | ||
parse_and_get_arguments "$@" | ||
fi | ||
|
||
if [ -z "$__RuntimeID" ]; then | ||
get_dotnet_runtime_id | ||
fi | ||
|
||
echo "Info: Using Configuration '$__Configuration'" | ||
echo "Info: Using Runtime ID '$__RuntimeID'" | ||
|
||
__DotnetPublishArgs="-c ${__Configuration} -r ${__RuntimeID} --self-contained" | ||
|
||
if [ -n "${__OutputFolder}" ]; then | ||
__DotnetPublishArgs="${__DotnetPublishArgs} -o ${__OutputFolder}" | ||
else | ||
__OutputFolder=${__ScriptDirectory}/bin/${__Configuration}/vscode/${__RuntimeID}/publish | ||
fi | ||
|
||
log_and_exec_cmd "dotnet build ${__ScriptDirectory}/src/MIDebugEngine-Unix.sln -c ${__Configuration}" | ||
log_and_exec_cmd "dotnet publish ${__ScriptDirectory}/src/OpenDebugAD7/OpenDebugAD7.csproj ${__DotnetPublishArgs}" | ||
log_and_exec_cmd "cp ${__ScriptDirectory}/bin/${__Configuration}/Microsoft.MIDebugEngine.dll ${__OutputFolder}/." | ||
log_and_exec_cmd "cp ${__ScriptDirectory}/bin/${__Configuration}/Microsoft.MICore.dll ${__OutputFolder}/." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
## Welcome to the Visual Studio MI Debug Engine ("MIEngine") | ||
|
||
[![Build Status](https://dev.azure.com/ms/MIEngine/_apis/build/status/Microsoft.MIEngine?branchName=master)](https://dev.azure.com/ms/MIEngine/_build/latest?definitionId=98&branchName=master) | ||
[![Build Status](https://dev.azure.com/ms/MIEngine/_apis/build/status/Microsoft.MIEngine?branchName=main)](https://dev.azure.com/ms/MIEngine/_build/latest?definitionId=98&branchName=main) | ||
|
||
The Visual Studio MI Debug Engine ("MIEngine") provides an open-source Visual Studio extension that enables debugging with debuggers that support the gdb Machine Interface ("MI") | ||
specification such as [GDB](http://www.gnu.org/software/gdb/) and [LLDB](http://lldb.llvm.org/). | ||
|
@@ -25,15 +25,10 @@ This repo also includes: | |
* Debug on any platform that supports GDB, such as Linux and even [Raspberry Pi](http://blogs.msdn.com/b/vcblog/archive/2015/04/29/debug-c-code-on-linux-from-visual-studio.aspx). | ||
|
||
### Prerequisites | ||
MIEngine requires [Visual Studio](https://visualstudio.microsoft.com/downloads/) to build. | ||
MIEngine can be built with either [Visual Studio](https://visualstudio.microsoft.com/downloads/) or with the [.NET CLI](https://dotnet.microsoft.com/download/dotnet). | ||
|
||
### Get Started | ||
* Clone the sources: `git clone https://github.com/Microsoft/MIEngine.git` | ||
* Open [src/MIDebugEngine.sln](https://github.com/Microsoft/MIEngine/blob/master/src/MIDebugEngine.sln) in Visual Studio. | ||
* Debug -> Start Debugging (or F5) to to build, deploy, and start debugging the [Experimental Instance of Visual Studio](https://msdn.microsoft.com/en-us/library/bb166560.aspx). | ||
* See the [wiki](https://github.com/Microsoft/MIEngine/wiki) for more info. | ||
|
||
|
||
### Contribute! | ||
Before you contribute, please read through the contributing and developer guides to get an idea of requirements for pull requests. | ||
|
||
|
@@ -49,4 +44,4 @@ You are also encouraged to start a discussion by filing an issue or creating a g | |
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments. | ||
|
||
### License | ||
MIEngine is licensed under the [MIT License](https://github.com/Microsoft/MIEngine/blob/master/License.txt). | ||
MIEngine is licensed under the [MIT License](https://github.com/Microsoft/MIEngine/blob/main/License.txt). |
Oops, something went wrong.