Skip to content

Commit

Permalink
github: actions: Add CI tests for push
Browse files Browse the repository at this point in the history
Signed-off-by: Matheus Castello <[email protected]>
  • Loading branch information
microhobby committed Sep 2, 2023
1 parent 02df566 commit 108955b
Show file tree
Hide file tree
Showing 4 changed files with 255 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build-debug-python.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Python Debug Containers

Check failure on line 1 in .github/workflows/build-debug-python.yaml

View workflow job for this annotation

GitHub Actions / Python3 Container Debug (python3Console, python3-console)

.github/workflows/build-debug-python.yaml#L1

This run was manually canceled.
on:
- push

jobs:
python3-debug:
runs-on: ubuntu-latest
name: Python3 Container Debug
strategy:
matrix:
project:
- {
folder: python3Console,
container: python3-console
}

steps:
- uses: actions/checkout@v3

- name: Build ${{ matrix.project.folder }} Dockerfile.debug
shell: pwsh
env:
PROJECT_FOLDER: ${{ matrix.project.folder }}
PROJECT_CONTAINER: ${{ matrix.project.container }}

run: |
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"
./.vscode/tasks.ps1 run build-container-torizon-debug-arm64
39 changes: 39 additions & 0 deletions .github/workflows/build-python.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Python Containers
on:
- push

jobs:
python3-debug:
runs-on: ubuntu-latest
name: Python3 Container
strategy:
matrix:
project:
- {
name: python3Console,
container: python3-console
}

steps:
- uses: actions/checkout@v3

- name: Build ${{ matrix.project.folder }} Dockerfile
shell: pwsh
env:
PROJECT_FOLDER: ${{ matrix.project.folder }}
PROJECT_CONTAINER: ${{ matrix.project.container }}

run: |
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"
./.vscode/tasks.ps1 run build-container-torizon-arm64
21 changes: 21 additions & 0 deletions .github/workflows/ci-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Sanity Check
on:
- push

jobs:
spell-check:
runs-on: ubuntu-latest
container:
image: node:16
name: Spell Check
steps:
- uses: actions/checkout@v3

- name: cspell CLI Lint

shell: bash

run: |
npm install git+https://github.com/streetsidesoftware/cspell-cli
npx cspell-cli lint --relative
156 changes: 156 additions & 0 deletions assets/tasks/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,45 @@
"color": "terminal.ansiYellow"
}
},
{
"label": "build-container-torizon-arm64",
"detail": "",
"hide": true,
"command": "DOCKER_HOST=",
"type": "shell",
"options": {
"env": {
"LOCAL_REGISTRY": "localhost",
"TAG": "arm64",
"GPU": "${config:torizon_gpu}",
"SSH_DEBUG_PORT": "${config:torizon_debug_ssh_port}",
"DEBUG_PORT": "${config:torizon_debug_port}",
"DEBUG_PORT2": "${config:torizon_debug_port2}",
"DEBUG_PORT3": "${config:torizon_debug_port3}"
}
},
"args": [
"docker",
"compose",
"build",
"--pull",
"--build-arg",
"SSHUSERNAME=${config:torizon_run_as}",
"--build-arg",
"IMAGE_ARCH=arm64",
"--build-arg",
"SSH_DEBUG_PORT=${config:torizon_debug_ssh_port}",
"--build-arg",
"GPU=${config:torizon_gpu}",
"__container__"
],
"dependsOrder": "sequence",
"problemMatcher": "$msCompile",
"icon": {
"id": "flame",
"color": "terminal.ansiYellow"
}
},
{
"label": "build-container-torizon-debug-arm64",
"detail": "",
Expand Down Expand Up @@ -724,6 +763,45 @@
"color": "terminal.ansiYellow"
}
},
{
"label": "build-container-torizon-arm",
"detail": "",
"hide": true,
"command": "DOCKER_HOST=",
"type": "shell",
"options": {
"env": {
"LOCAL_REGISTRY": "localhost",
"TAG": "arm",
"GPU": "${config:torizon_gpu}",
"SSH_DEBUG_PORT": "${config:torizon_debug_ssh_port}",
"DEBUG_PORT": "${config:torizon_debug_port}",
"DEBUG_PORT2": "${config:torizon_debug_port2}",
"DEBUG_PORT3": "${config:torizon_debug_port3}"
}
},
"args": [
"docker",
"compose",
"build",
"--pull",
"--build-arg",
"SSHUSERNAME=${config:torizon_run_as}",
"--build-arg",
"IMAGE_ARCH=arm",
"--build-arg",
"SSH_DEBUG_PORT=${config:torizon_debug_ssh_port}",
"--build-arg",
"GPU=${config:torizon_gpu}",
"__container__"
],
"dependsOrder": "sequence",
"problemMatcher": "$msCompile",
"icon": {
"id": "flame",
"color": "terminal.ansiYellow"
}
},
{
"label": "build-container-torizon-debug-arm",
"detail": "",
Expand Down Expand Up @@ -763,6 +841,45 @@
"color": "terminal.ansiYellow"
}
},
{
"label": "build-container-torizon-amd64",
"detail": "",
"hide": true,
"command": "DOCKER_HOST=",
"type": "shell",
"options": {
"env": {
"LOCAL_REGISTRY": "localhost",
"TAG": "amd64",
"GPU": "${config:torizon_gpu}",
"SSH_DEBUG_PORT": "${config:torizon_debug_ssh_port}",
"DEBUG_PORT": "${config:torizon_debug_port}",
"DEBUG_PORT2": "${config:torizon_debug_port2}",
"DEBUG_PORT3": "${config:torizon_debug_port3}"
}
},
"args": [
"docker",
"compose",
"build",
"--pull",
"--build-arg",
"SSHUSERNAME=${config:torizon_run_as}",
"--build-arg",
"IMAGE_ARCH=amd64",
"--build-arg",
"SSH_DEBUG_PORT=${config:torizon_debug_ssh_port}",
"--build-arg",
"GPU=${config:torizon_gpu}",
"__container__"
],
"dependsOrder": "sequence",
"problemMatcher": "$msCompile",
"icon": {
"id": "flame",
"color": "terminal.ansiYellow"
}
},
{
"label": "build-container-torizon-debug-amd64",
"detail": "",
Expand Down Expand Up @@ -802,6 +919,45 @@
"color": "terminal.ansiYellow"
}
},
{
"label": "build-container-torizon-riscv64",
"detail": "",
"hide": true,
"command": "DOCKER_HOST=",
"type": "shell",
"options": {
"env": {
"LOCAL_REGISTRY": "localhost",
"TAG": "riscv64",
"GPU": "${config:torizon_gpu}",
"SSH_DEBUG_PORT": "${config:torizon_debug_ssh_port}",
"DEBUG_PORT": "${config:torizon_debug_port}",
"DEBUG_PORT2": "${config:torizon_debug_port2}",
"DEBUG_PORT3": "${config:torizon_debug_port3}"
}
},
"args": [
"docker",
"compose",
"build",
"--pull",
"--build-arg",
"SSHUSERNAME=${config:torizon_run_as}",
"--build-arg",
"IMAGE_ARCH=riscv64",
"--build-arg",
"SSH_DEBUG_PORT=${config:torizon_debug_ssh_port}",
"--build-arg",
"GPU=${config:torizon_gpu}",
"__container__"
],
"dependsOrder": "sequence",
"problemMatcher": "$msCompile",
"icon": {
"id": "flame",
"color": "terminal.ansiYellow"
}
},
{
"label": "build-container-torizon-debug-riscv64",
"detail": "",
Expand Down

0 comments on commit 108955b

Please sign in to comment.