Skip to content

Commit

Permalink
Merge pull request #260 from andreriesco/release-2.6-hot-fixes
Browse files Browse the repository at this point in the history
common.json: apply-torizon-packages to apply-torizon-packages-<arch>
  • Loading branch information
andreriesco authored Sep 11, 2024
2 parents 76d9ee2 + 6961e73 commit dfda7e0
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 24 deletions.
106 changes: 92 additions & 14 deletions assets/tasks/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -471,15 +471,87 @@
}
},
{
"label": "apply-torizon-packages",
"label": "apply-torizon-packages-arm64",
"detail": "",
"hide": true,
"command": "pwsh",
"type": "process",
"args": [
"-nop",
"${workspaceFolder}/.conf/torizonPackages.ps1",
"${config:torizon_arch}"
"arm64"
],
"dependsOrder": "sequence",
"icon": {
"id": "gear",
"color": "terminal.ansiYellow"
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "shared",
"group": "build-execution"
}
},
{
"label": "apply-torizon-packages-arm",
"detail": "",
"hide": true,
"command": "pwsh",
"type": "process",
"args": [
"-nop",
"${workspaceFolder}/.conf/torizonPackages.ps1",
"armhf"
],
"dependsOrder": "sequence",
"icon": {
"id": "gear",
"color": "terminal.ansiYellow"
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "shared",
"group": "build-execution"
}
},
{
"label": "apply-torizon-packages-amd64",
"detail": "",
"hide": true,
"command": "pwsh",
"type": "process",
"args": [
"-nop",
"${workspaceFolder}/.conf/torizonPackages.ps1",
"amd64"
],
"dependsOrder": "sequence",
"icon": {
"id": "gear",
"color": "terminal.ansiYellow"
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "shared",
"group": "build-execution"
}
},
{
"label": "apply-torizon-packages-riscv64",
"detail": "",
"hide": true,
"command": "pwsh",
"type": "process",
"args": [
"-nop",
"${workspaceFolder}/.conf/torizonPackages.ps1",
"riscv"
],
"dependsOrder": "sequence",
"icon": {
Expand Down Expand Up @@ -846,7 +918,7 @@
],
"dependsOrder": "sequence",
"dependsOn": [
"apply-torizon-packages"
"apply-torizon-packages-arm64"
],
"problemMatcher": "$msCompile",
"icon": {
Expand Down Expand Up @@ -897,7 +969,7 @@
],
"dependsOrder": "sequence",
"dependsOn": [
"apply-torizon-packages"
"apply-torizon-packages-arm"
],
"problemMatcher": "$msCompile",
"icon": {
Expand Down Expand Up @@ -948,7 +1020,7 @@
],
"dependsOrder": "sequence",
"dependsOn": [
"apply-torizon-packages"
"apply-torizon-packages-amd64"
],
"problemMatcher": "$msCompile",
"icon": {
Expand Down Expand Up @@ -999,7 +1071,7 @@
],
"dependsOrder": "sequence",
"dependsOn": [
"apply-torizon-packages"
"apply-torizon-packages-riscv64"
],
"problemMatcher": "$msCompile",
"icon": {
Expand Down Expand Up @@ -1038,7 +1110,7 @@
],
"dependsOrder": "sequence",
"dependsOn": [
"apply-torizon-packages"
"apply-torizon-packages-arm64"
],
"problemMatcher": [
"$gcc"
Expand Down Expand Up @@ -1073,11 +1145,13 @@
"--build-arg",
"IMAGE_ARCH=arm",
"--build-arg",
"GPU=${config:torizon_gpu}",
"--build-arg",
"APP_ROOT=${config:torizon_app_root}"
],
"dependsOrder": "sequence",
"dependsOn": [
"apply-torizon-packages"
"apply-torizon-packages-arm"
],
"problemMatcher": [
"$gcc"
Expand Down Expand Up @@ -1112,11 +1186,13 @@
"--build-arg",
"IMAGE_ARCH=amd64",
"--build-arg",
"GPU=${config:torizon_gpu}",
"--build-arg",
"APP_ROOT=${config:torizon_app_root}"
],
"dependsOrder": "sequence",
"dependsOn": [
"apply-torizon-packages"
"apply-torizon-packages-amd64"
],
"problemMatcher": [
"$gcc"
Expand Down Expand Up @@ -1151,11 +1227,13 @@
"--build-arg",
"IMAGE_ARCH=riscv64",
"--build-arg",
"GPU=${config:torizon_gpu}",
"--build-arg",
"APP_ROOT=${config:torizon_app_root}"
],
"dependsOrder": "sequence",
"dependsOn": [
"apply-torizon-packages"
"apply-torizon-packages-riscv64"
],
"problemMatcher": [
"$gcc"
Expand Down Expand Up @@ -1654,7 +1732,7 @@
],
"dependsOrder": "sequence",
"dependsOn": [
"apply-torizon-packages"
"apply-torizon-packages-arm64"
],
"problemMatcher": "$msCompile",
"icon": {
Expand Down Expand Up @@ -1703,7 +1781,7 @@
],
"dependsOrder": "sequence",
"dependsOn": [
"apply-torizon-packages"
"apply-torizon-packages-arm"
],
"problemMatcher": "$msCompile",
"icon": {
Expand Down Expand Up @@ -1752,7 +1830,7 @@
],
"dependsOrder": "sequence",
"dependsOn": [
"apply-torizon-packages"
"apply-torizon-packages-amd64"
],
"problemMatcher": "$msCompile",
"icon": {
Expand Down Expand Up @@ -1801,7 +1879,7 @@
],
"dependsOrder": "sequence",
"dependsOn": [
"apply-torizon-packages"
"apply-torizon-packages-riscv64"
],
"problemMatcher": "$msCompile",
"icon": {
Expand Down
19 changes: 9 additions & 10 deletions scripts/torizonPackages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,15 @@ param()

$TORIZON_ARCH = $args[0]

if ($TORIZON_ARCH -eq "aarch64") {
$TORIZON_ARCH = "arm64"
} elseif ($TORIZON_ARCH -eq "armv7l") {
$TORIZON_ARCH = "armhf"
} elseif ($TORIZON_ARCH -eq "x86_64") {
$TORIZON_ARCH = "amd64"
} elseif ($TORIZON_ARCH -eq "riscv") {
$TORIZON_ARCH = "riscv"
} else {
Write-Host -ForegroundColor DarkRed "❌ undefined target device architecture, Set Default the device before applying packages"
$TORIZON_ARCHS = @(
"arm64",
"armhf"
"amd64",
"riscv"
)

if (!($TORIZON_ARCHS -contains $TORIZON_ARCH)) {
Write-Host -ForegroundColor DarkRed "❌ undefined target architecture"
exit 69
}

Expand Down

0 comments on commit dfda7e0

Please sign in to comment.