forked from torizon/vscode-torizon-templates
-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (44 loc) · 1.66 KB
/
build-debug-python.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Python Debug Containers
on:
push:
branches:
- dev
- bookworm
jobs:
python3-debug:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/bookworm' || github.ref == 'refs/heads/dev'
name: Python3 Container Debug
strategy:
matrix:
project:
- folder: python3Console
container: python3-console
vendor: "{ arch: 'arm64', torizon_arch: 'aarch64' }"
steps:
- uses: actions/checkout@v3
- name: Build ${{ matrix.project.folder }} Dockerfile
shell: pwsh
env:
PROJECT_FOLDER: ${{ matrix.project.folder }}
PROJECT_CONTAINER: ${{ matrix.project.container }}
VENDOR: ${{ matrix.project.vendor }}
DOCKER_LOGIN: localhost:5002
run: |
$_vendor = ($env:VENDOR | ConvertFrom-Json)
$env:TORIZON_ARCH = $_vendor.torizon_arch
$env:PROJECT_ARCH = $_vendor.arch
docker run --rm --privileged torizon/binfmt
scripts/createFromTemplate.ps1 `
$env:GITHUB_WORKSPACE/$env:PROJECT_FOLDER `
"${env:PROJECT_FOLDER}CITest" `
"${env:PROJECT_CONTAINER}-ci-test" `
$env:GITHUB_WORKSPACE `
$env:PROJECT_FOLDER `
false `
false
cd "${env:GITHUB_WORKSPACE}/${env:PROJECT_FOLDER}CITest"
$_settingsJson = Get-Content -Path ".vscode/settings.json" | ConvertFrom-Json
$_settingsJson.torizon_arch = $env:TORIZON_ARCH
Set-Content -Path ".vscode/settings.json" -Value ($_settingsJson | ConvertTo-Json) -Encoding UTF8
./.vscode/tasks.ps1 run build-container-torizon-debug-${env:PROJECT_ARCH}