Single file publish support, test project and simple build CI

This also adds remote raspberry pi debugging with default install details. More testing is required as MonoMod may not be working for arm64 still

CI might not work yet either
This commit is contained in:
Luke 2021-12-03 00:07:11 +10:00
parent c159f2b388
commit 2c36dacfd2
8 changed files with 241 additions and 29 deletions

66
.vscode/launch.json vendored
View file

@ -9,9 +9,12 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/TShockAPI/bin/Debug/net5.0/TerrariaServerAPI.dll",
"program": "${workspaceFolder}/TShockLauncher/bin/Debug/net6.0/TShock.Run.dll",
"windows": {
"program": "${workspaceFolder}/TShockLauncher/bin/Debug/net6.0/TShock.dll",
},
"args": [],
"cwd": "${workspaceFolder}/TShockAPI/bin/Debug/net5.0/",
"cwd": "${workspaceFolder}/TShockLauncher/bin/Debug/net6.0/",
"console": "integratedTerminal",
"stopAtEntry": false
},
@ -19,6 +22,65 @@
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach"
},
{
// this command assumes you have:
// raspberry pi 4 b with default user/pass, SSH enabled & connected to a reliable connection
// dotnet sdk 6.0.100 (needed for breakpoints to hit)
// windows with putty installed
// vsdbg
// follow this for other OS's: https://docs.microsoft.com/en-us/dotnet/iot/debugging?tabs=self-contained&pivots=vscode
// TODO: ability to chmod +x TShock.sh && chmod +x bin/TShock.Run
"name": ".NET Remote Launch - Self-contained",
"type": "coreclr",
"request": "launch",
"program": "/home/pi/dotnet/dotnet",
"args": [
"bin/TShock.Run.dll"
],
"cwd": "/home/pi/tshockdev/publish",
"stopAtEntry": false,
"console": "integratedTerminal",
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "C:\\Program Files\\PuTTY\\PLINK.EXE",
"pipeArgs": [
"-pw",
"raspberry",
"pi@raspberrypi"
],
"debuggerPath": "/home/pi/vsdbg/vsdbg"
}
},
{
// this command assumes you have:
// raspberry pi 4 b with default user/pass, SSH enabled & connected to a reliable connection
// dotnet sdk 6.0.100 (needed for breakpoints to hit)
// windows with putty installed
// vsdbg
// follow this for other OS's: https://docs.microsoft.com/en-us/dotnet/iot/debugging?tabs=self-contained&pivots=vscode
// TODO: ability to chmod +x TShock.sh && chmod +x bin/TShock.Run
"name": ".NET Remote Publish & Launch - Self-contained",
"type": "coreclr",
"request": "launch",
"program": "/home/pi/dotnet/dotnet",
"args": [
"bin/TShock.Run.dll"
],
"cwd": "/home/pi/tshockdev/publish",
"stopAtEntry": false,
"console": "integratedTerminal",
"preLaunchTask": "Remote Publish",
"pipeTransport": {
"pipeCwd": "${workspaceRoot}",
"pipeProgram": "C:\\Program Files\\PuTTY\\PLINK.EXE",
"pipeArgs": [
"-pw",
"raspberry",
"pi@raspberrypi"
],
"debuggerPath": "/home/pi/vsdbg/vsdbg"
}
}
]
}

39
.vscode/tasks.json vendored
View file

@ -12,6 +12,45 @@
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "Publish",
"options": {
"cwd": "TShockLauncher"
},
"command": "dotnet",
"type": "process",
"args": [
"publish",
"-c",
"Debug",
"--self-contained",
"true",
"-r",
"linux-arm64",
"/nowarn:CS1591",
"/nowarn:CS1587"
],
},
{
"label": "Remote Publish",
"options": {
"cwd": "TShockLauncher/bin/Debug/net6.0/linux-arm64"
},
"command": "C:\\Program Files\\PuTTY\\pscp.exe",
"type": "process",
"args": [
"-pw",
"raspberry",
"-sftp",
"-p",
"-r",
"publish",
"pi@raspberrypi:/home/pi/tshockdev"
],
"dependsOn": [
"Publish"
]
}
]
}