From 497284ca33b64c022ad42a1282cb4d84b833e2d8 Mon Sep 17 00:00:00 2001 From: Lukas Maywald Date: Thu, 6 Jun 2024 17:09:03 +0200 Subject: [PATCH 1/3] scripts: add "-Ordered" Flag to ConvertFrom-Yaml this keeps the docker-compose.prod.yml from getting scrambled up on every write Signed-off-by: Lukas Maywald --- scripts/createDockerComposeMultiProduction.ps1 | 2 +- scripts/createDockerComposeProduction.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/createDockerComposeMultiProduction.ps1 b/scripts/createDockerComposeMultiProduction.ps1 index 2c766ee18..d6ac711b2 100644 --- a/scripts/createDockerComposeMultiProduction.ps1 +++ b/scripts/createDockerComposeMultiProduction.ps1 @@ -39,7 +39,7 @@ foreach ($project in $codeWorkspace.folders) { "Reading $path/docker-compose.prod.yml" $yamlFile = Get-Content ("$path/docker-compose.prod.yml") | Out-String - $yamlObj = ConvertFrom-Yaml $yamlFile -AllDocuments + $yamlObj = ConvertFrom-Yaml $yamlFile -AllDocuments -Ordered if ($null -eq $retYaml) { $retYaml = $yamlObj diff --git a/scripts/createDockerComposeProduction.ps1 b/scripts/createDockerComposeProduction.ps1 index 1a22cbbd7..74fbd1ecb 100644 --- a/scripts/createDockerComposeProduction.ps1 +++ b/scripts/createDockerComposeProduction.ps1 @@ -166,7 +166,7 @@ Write-Host -ForegroundColor DarkGreen "✅ powershell-yaml loaded" # read the yaml file Write-Host "Reading docker-compose.yml file ..." $composeContent = Get-Content ("$compoFilePath/docker-compose.yml") | Out-String -$composeLoad = ConvertFrom-Yaml $composeContent -AllDocuments +$composeLoad = ConvertFrom-Yaml $composeContent -AllDocuments -Ordered $composeServices = $composeLoad.Services $removeKeys = New-Object Collections.Generic.List[String] $prodKeys = New-Object Collections.Generic.List[String] From 65e64a33ea928309f11b4ca91444b9d77a3d04db Mon Sep 17 00:00:00 2001 From: Andre Riesco Date: Thu, 4 Jul 2024 10:25:40 -0300 Subject: [PATCH 2/3] python3: Missing requirements files on update.json Signed-off-by: Andre Riesco --- python3Console/.conf/update.json | 12 ++++++++++++ python3Pyside2QML/.conf/update.json | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/python3Console/.conf/update.json b/python3Console/.conf/update.json index 1da61ec5c..fad425331 100644 --- a/python3Console/.conf/update.json +++ b/python3Console/.conf/update.json @@ -2,5 +2,17 @@ { "source": ".vscode/launch.json", "target": ".vscode/launch.json" + }, + { + "source": "requirements-local.txt", + "target": "requirements-local.txt" + }, + { + "source": "requirements-debug.txt", + "target": "requirements-debug.txt" + }, + { + "source": "requirements-release.txt", + "target": "requirements-release.txt" } ] diff --git a/python3Pyside2QML/.conf/update.json b/python3Pyside2QML/.conf/update.json index 1da61ec5c..fad425331 100644 --- a/python3Pyside2QML/.conf/update.json +++ b/python3Pyside2QML/.conf/update.json @@ -2,5 +2,17 @@ { "source": ".vscode/launch.json", "target": ".vscode/launch.json" + }, + { + "source": "requirements-local.txt", + "target": "requirements-local.txt" + }, + { + "source": "requirements-debug.txt", + "target": "requirements-debug.txt" + }, + { + "source": "requirements-release.txt", + "target": "requirements-release.txt" } ] From f31c8d7920bfee2d00a92ac993653790f531a368 Mon Sep 17 00:00:00 2001 From: Matheus Castello Date: Thu, 4 Jul 2024 16:16:09 -0300 Subject: [PATCH 3/3] cmakeConsole: Add support for Torizon AMD64 This is using commontorizon/debian only by the ease of the use of the same image tags: - AMD64 -> torizon/debian-upstream:3 == commontorizon/debian:3.3.0-bookworm - ARM64 -> torizon/debian:3 == commontorizon/debian:3.3.0-bookworm - ARM -> torizon/debian:3 == commontorizon/debian:3.3.0-bookworm Signed-off-by: Matheus Castello --- cmakeConsole/.vscode/launch.json | 46 +++++++++++++ cmakeConsole/.vscode/tasks.json | 115 +++++++++++++++++++++++++++++++ cmakeConsole/Dockerfile | 12 +++- cmakeConsole/Dockerfile.debug | 8 ++- 4 files changed, 178 insertions(+), 3 deletions(-) diff --git a/cmakeConsole/.vscode/launch.json b/cmakeConsole/.vscode/launch.json index 6bd9dc246..ae97ecfed 100644 --- a/cmakeConsole/.vscode/launch.json +++ b/cmakeConsole/.vscode/launch.json @@ -26,6 +26,52 @@ ], "preLaunchTask": "build-debug-amd64-local" }, + { + "name": "Torizon AMD64", + "type": "cppdbg", + "request": "launch", + "program": "${config:torizon_app_root}/__change__", + "args": [], + "stopAtEntry": false, + "cwd": "${config:torizon_app_root}", + "environment": [], + "externalConsole": false, + "internalConsoleOptions": "openOnSessionStart", + "sourceFileMap": { + "${config:torizon_app_root}": "${workspaceFolder}" + }, + "pipeTransport": { + "debuggerPath": "/usr/bin/gdb", + "pipeProgram": "ssh", + "pipeArgs": [ + "-T", + "-q", + "-p", + "${config:torizon_debug_ssh_port}", + "-i", + "${workspaceFolder}/.conf/id_rsa", // ssh key path + "-o", + "StrictHostKeyChecking=no", + "-o", + "UserKnownHostsFile /dev/null", + "${config:torizon_run_as}@${config:torizon_ip}" // user@device + ] + }, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + }, + { + "description": "Set Disassembly Flavor to Intel", + "text": "-gdb-set disassembly-flavor intel", + "ignoreFailures": true + } + ], + "preLaunchTask": "deploy-torizon-amd64" + }, { "name": "Torizon ARMv7", "type": "cppdbg", diff --git a/cmakeConsole/.vscode/tasks.json b/cmakeConsole/.vscode/tasks.json index a0d079ee7..8fcb7abe4 100644 --- a/cmakeConsole/.vscode/tasks.json +++ b/cmakeConsole/.vscode/tasks.json @@ -288,6 +288,121 @@ "build-container-image-sdk-arm64" ] }, + { + "label": "build-configure-amd64", + "hide": true, + "command": "DOCKER_HOST=", + "type": "shell", + "args": [ + "docker", + "run", + "--rm", + "-v", + "${workspaceFolder}:${config:torizon_app_root}", + "cross-toolchain-amd64-__container__", + "cmake", + "-DCMAKE_BUILD_TYPE=Debug", + "-DCMAKE_CXX_COMPILER=x86_64-linux-gnu-g++", + "-DCMAKE_C_COMPILER=x86_64-linux-gnu-gcc", + "-Bbuild-amd64" + ], + "problemMatcher": [ + "$gcc" + ], + "icon": { + "id": "flame", + "color": "terminal.ansiYellow" + }, + "dependsOrder": "sequence", + "dependsOn": [ + "build-container-image-sdk-amd64" + ] + }, + { + "label": "build-debug-amd64", + "detail": "Build a debug version of the application for amd64 using\nthe toolchain from the SDK container.", + "command": "DOCKER_HOST=", + "type": "shell", + "args": [ + "docker", + "run", + "--rm", + "-v", + "${workspaceFolder}:${config:torizon_app_root}", + "cross-toolchain-amd64-__container__", + "cmake", + "--build", + "build-amd64" + ], + "problemMatcher": [ + "$gcc" + ], + "icon": { + "id": "flame", + "color": "terminal.ansiYellow" + }, + "dependsOrder": "sequence", + "dependsOn": [ + "build-configure-amd64" + ] + }, + { + "label": "deploy-torizon-amd64", + "detail": "", + "hide": true, + "command": "sleep", + "type": "process", + "args": [ + "1" + ], + "dependsOn": [ + "validate-settings", + "validate-arch-amd64", + "copy-docker-compose", + "pre-cleanup", + "build-debug-amd64", + "build-container-torizon-debug-amd64", + "push-container-torizon-debug-amd64", + "pull-container-torizon-debug-amd64", + "run-container-torizon-debug-amd64" + ], + "dependsOrder": "sequence", + "problemMatcher": "$msCompile", + "icon": { + "id": "flame", + "color": "terminal.ansiYellow" + } + }, + { + "label": "clean-amd64", + "detail": "Clean the build folder for amd64 using the\ncontainer SDK toolchain.", + "command": "DOCKER_HOST=", + "type": "shell", + "args": [ + "docker", + "run", + "--rm", + "-v", + "${workspaceFolder}:${config:torizon_app_root}", + "cross-toolchain-amd64-__container__", + "cmake", + "--build", + "build-amd64", + "--target", + "clean" + ], + "problemMatcher": [ + "$gcc" + ], + "icon": { + "id": "trash", + "color": "terminal.ansiYellow" + }, + "dependsOrder": "sequence", + "dependsOn": [ + "build-container-image-sdk-arm64" + ] + }, ], "inputs": [] } diff --git a/cmakeConsole/Dockerfile b/cmakeConsole/Dockerfile index 8d4c145da..eca3cc868 100644 --- a/cmakeConsole/Dockerfile +++ b/cmakeConsole/Dockerfile @@ -49,8 +49,16 @@ RUN cmake --build build-${IMAGE_ARCH} # BUILD ------------------------------------------------------------------------ -# DEPLOY ----------------------------------------------------------------------- -FROM --platform=linux/${IMAGE_ARCH} torizon/debian:${BASE_VERSION} AS Deploy +## +# Deploy Step +# +# This is using commontorizon/debian only by the ease of the use of the +# same image tags for x86_64 architectures: +# - AMD64 -> torizon/debian-upstream:3 == commontorizon/debian:3.3.0-bookworm +# - ARM64 -> torizon/debian:3 == commontorizon/debian:3.3.0-bookworm +# - ARM -> torizon/debian:3 == commontorizon/debian:3.3.0-bookworm +## +FROM --platform=linux/${IMAGE_ARCH} commontorizon/debian:${BASE_VERSION} AS Deploy ARG IMAGE_ARCH ARG APP_ROOT diff --git a/cmakeConsole/Dockerfile.debug b/cmakeConsole/Dockerfile.debug index cefdeb88b..80c89a3fc 100644 --- a/cmakeConsole/Dockerfile.debug +++ b/cmakeConsole/Dockerfile.debug @@ -29,9 +29,15 @@ ARG APP_ROOT= # BUILD ------------------------------------------------------------------------ ## # Deploy Step +# +# This is using commontorizon/debian only by the ease of the use of the +# same image tags for x86_64 architectures: +# - AMD64 -> torizon/debian-upstream:3 == commontorizon/debian:3.3.0-bookworm +# - ARM64 -> torizon/debian:3 == commontorizon/debian:3.3.0-bookworm +# - ARM -> torizon/debian:3 == commontorizon/debian:3.3.0-bookworm ## FROM --platform=linux/${IMAGE_ARCH} \ - torizon/debian:${BASE_VERSION} AS Debug + commontorizon/debian:${BASE_VERSION} AS Debug ARG IMAGE_ARCH ARG SSH_DEBUG_PORT