Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
CompileFlags:
CompilationDatabase: build/vscode-desktop

Index:
Background: Build

Diagnostics:
UnusedIncludes: Strict

If:
PathMatch: platforms/tab5/.*
CompileFlags:
CompilationDatabase: platforms/tab5/build
70 changes: 70 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Build and test

on:
push:
pull_request:

permissions:
contents: read

concurrency:
group: build-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
desktop:
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Install desktop build tools
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build libsdl2-dev python3 git
- name: Test dependency fetching without network fixtures
run: python3 tests/test_fetch_repos.py
- name: Fetch and verify pinned dependencies
run: |
python3 fetch_repos.py
python3 fetch_repos.py --verify
- name: Configure and build
run: |
cmake --preset desktop
cmake --build --preset desktop --parallel 2
- name: Check immediate incremental rebuild
run: |
cmake --build --preset desktop --parallel 2 2>&1 | tee /tmp/desktop-rebuild.log
if grep -E 'Building .* object|Linking |premature end' /tmp/desktop-rebuild.log; then
echo 'Unchanged build unexpectedly rebuilt targets or recovered a damaged Ninja log.'
exit 1
fi
- name: Run project tests and headless UI journeys
env:
SDL_VIDEODRIVER: dummy
run: ctest --preset desktop

firmware:
runs-on: ubuntu-24.04
timeout-minutes: 40
container:
# Official espressif/idf:v5.4.2 multi-platform image, pinned to its registry digest.
image: espressif/idf@sha256:4317595a911886e04cbc6d731315d5fc2918e510b6733fc7d03381ab2d270082
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Trust the mounted checkout in the build container
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Fetch and verify pinned dependencies
run: |
python3 fetch_repos.py
python3 fetch_repos.py --verify
- name: Build ESP32-P4 firmware and bootloader with ESP-IDF 5.4.2
run: |
. /opt/esp/idf/export.sh
test "$(git -C "$IDF_PATH" rev-parse HEAD)" = f5c3654a1c2d2a01f7f67def7a0dc48e691f63c0
idf.py -C platforms/tab5 build
git diff --exit-code -- platforms/tab5/dependencies.lock
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.cache
.vscode
build
dependencies
.DS_Store
__pycache__/
*.pyc
12 changes: 12 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"recommendations": [
"espressif.esp-idf-extension",
"llvm-vs-code-extensions.vscode-clangd",
"ms-vscode.cmake-tools",
"ms-python.python",
"vadimcn.vscode-lldb"
],
"unwantedRecommendations": [
"platformio.platformio-ide"
]
}
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug desktop demo",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/build/vscode-desktop/app_desktop_build",
"cwd": "${workspaceFolder}",
"preLaunchTask": "Desktop: build",
"args": []
}
]
}
66 changes: 66 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"cmake.useCMakePresets": "always",
"cmake.configureOnOpen": false,
"cmake.buildDirectory": "${workspaceFolder}/build/vscode-desktop",
"cmake.configureArgs": [
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
],

"C_Cpp.intelliSenseEngine": "disabled",

"clangd.arguments": [
"--background-index",
"--completion-style=detailed",
"--header-insertion=never",
"--query-driver=${env:HOME}/.espressif/tools/**/bin/*gcc,${env:HOME}/.espressif/tools/**/bin/*g++,${env:HOME}/esp/**/bin/*gcc,${env:HOME}/esp/**/bin/*g++"
],

"idf.espIdfPath": "${env:IDF_PATH}",
"idf.buildPath": "${workspaceFolder}/platforms/tab5/build",
"idf.sdkconfigFilePath": "${workspaceFolder}/platforms/tab5/sdkconfig",
"idf.flashType": "UART",
"idf.flashBaudRate": "921600",
"idf.monitorEnableTimestamps": true,
"idf.saveBeforeBuild": true,
"idf.enableCCache": true,
"idf.enableSizeTaskAfterBuildTask": true,
"idf.notificationMode": "Notifications",
"idf.telemetry": false,

"files.associations": {
"*.h": "cpp",
"*.hpp": "cpp",
"*.hh": "cpp",
"*.c": "c",
"*.cpp": "cpp",
"CMakeLists.txt": "cmake",
"Kconfig*": "kconfig",
"sdkconfig*": "kconfig"
},

"files.exclude": {
"**/.DS_Store": true,
"**/build/**": true,
"**/platforms/tab5/build/**": true,
"**/platforms/tab5/managed_components/**": true
},

"search.exclude": {
"**/build/**": true,
"**/platforms/tab5/build/**": true,
"**/platforms/tab5/managed_components/**": true,
"**/dependencies/**": true
},

"files.watcherExclude": {
"**/build/**": true,
"**/platforms/tab5/build/**": true,
"**/platforms/tab5/managed_components/**": true,
"**/dependencies/**": true
},

"editor.formatOnSave": false,
"editor.rulers": [100],
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true
}
139 changes: 139 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Tab5: fetch dependencies",
"type": "shell",
"command": "python3 ./fetch_repos.py",
"options": {
"cwd": "${workspaceFolder}",
"shell": {
"executable": "/bin/zsh",
"args": ["-lc"]
}
},
"problemMatcher": []
},
{
"label": "Tab5: ESP-IDF reconfigure",
"type": "shell",
"command": "set -e; if [ -f ../esp-idf/export.sh ]; then . ../esp-idf/export.sh; elif [ -f \"$HOME/esp/esp-idf/export.sh\" ]; then . \"$HOME/esp/esp-idf/export.sh\"; elif [ -n \"$IDF_PATH\" ] && [ -f \"$IDF_PATH/export.sh\" ]; then . \"$IDF_PATH/export.sh\"; else echo 'ESP-IDF export.sh not found. Put esp-idf next to this repo or set IDF_PATH.'; exit 1; fi; cd platforms/tab5; idf.py reconfigure",
"options": {
"cwd": "${workspaceFolder}",
"shell": {
"executable": "/bin/zsh",
"args": ["-lc"]
}
},
"problemMatcher": []
},
{
"label": "Tab5: ESP-IDF build",
"type": "shell",
"command": "set -e; if [ -f ../esp-idf/export.sh ]; then . ../esp-idf/export.sh; elif [ -f \"$HOME/esp/esp-idf/export.sh\" ]; then . \"$HOME/esp/esp-idf/export.sh\"; elif [ -n \"$IDF_PATH\" ] && [ -f \"$IDF_PATH/export.sh\" ]; then . \"$IDF_PATH/export.sh\"; else echo 'ESP-IDF export.sh not found. Put esp-idf next to this repo or set IDF_PATH.'; exit 1; fi; cd platforms/tab5; idf.py build",
"options": {
"cwd": "${workspaceFolder}",
"shell": {
"executable": "/bin/zsh",
"args": ["-lc"]
}
},
"group": "build",
"problemMatcher": ["$gcc"]
},
{
"label": "Tab5: ESP-IDF flash",
"type": "shell",
"command": "set -e; if [ -f ../esp-idf/export.sh ]; then . ../esp-idf/export.sh; elif [ -f \"$HOME/esp/esp-idf/export.sh\" ]; then . \"$HOME/esp/esp-idf/export.sh\"; elif [ -n \"$IDF_PATH\" ] && [ -f \"$IDF_PATH/export.sh\" ]; then . \"$IDF_PATH/export.sh\"; else echo 'ESP-IDF export.sh not found. Put esp-idf next to this repo or set IDF_PATH.'; exit 1; fi; cd platforms/tab5; idf.py flash",
"options": {
"cwd": "${workspaceFolder}",
"shell": {
"executable": "/bin/zsh",
"args": ["-lc"]
}
},
"problemMatcher": []
},
{
"label": "Tab5: ESP-IDF monitor",
"type": "shell",
"command": "set -e; if [ -f ../esp-idf/export.sh ]; then . ../esp-idf/export.sh; elif [ -f \"$HOME/esp/esp-idf/export.sh\" ]; then . \"$HOME/esp/esp-idf/export.sh\"; elif [ -n \"$IDF_PATH\" ] && [ -f \"$IDF_PATH/export.sh\" ]; then . \"$IDF_PATH/export.sh\"; else echo 'ESP-IDF export.sh not found. Put esp-idf next to this repo or set IDF_PATH.'; exit 1; fi; cd platforms/tab5; idf.py monitor",
"options": {
"cwd": "${workspaceFolder}",
"shell": {
"executable": "/bin/zsh",
"args": ["-lc"]
}
},
"problemMatcher": []
},
{
"label": "Tab5: ESP-IDF menuconfig",
"type": "shell",
"command": "set -e; if [ -f ../esp-idf/export.sh ]; then . ../esp-idf/export.sh; elif [ -f \"$HOME/esp/esp-idf/export.sh\" ]; then . \"$HOME/esp/esp-idf/export.sh\"; elif [ -n \"$IDF_PATH\" ] && [ -f \"$IDF_PATH/export.sh\" ]; then . \"$IDF_PATH/export.sh\"; else echo 'ESP-IDF export.sh not found. Put esp-idf next to this repo or set IDF_PATH.'; exit 1; fi; cd platforms/tab5; idf.py menuconfig",
"options": {
"cwd": "${workspaceFolder}",
"shell": {
"executable": "/bin/zsh",
"args": ["-lc"]
}
},
"problemMatcher": []
},
{
"label": "Desktop: configure",
"type": "shell",
"command": "cmake --preset desktop",
"options": {
"cwd": "${workspaceFolder}",
"shell": {
"executable": "/bin/zsh",
"args": ["-lc"]
}
},
"problemMatcher": []
},
{
"label": "Desktop: build",
"type": "shell",
"command": "cmake --build --preset desktop",
"options": {
"cwd": "${workspaceFolder}",
"shell": {
"executable": "/bin/zsh",
"args": ["-lc"]
}
},
"dependsOn": ["Desktop: configure"],
"problemMatcher": ["$gcc"]
},
{
"label": "Desktop: test",
"type": "shell",
"command": "ctest --preset desktop",
"options": {
"cwd": "${workspaceFolder}",
"shell": {
"executable": "/bin/zsh",
"args": ["-lc"]
}
},
"dependsOn": ["Desktop: build"],
"problemMatcher": ["$gcc"]
},
{
"label": "Desktop: run",
"type": "shell",
"command": "./build/vscode-desktop/app_desktop_build",
"options": {
"cwd": "${workspaceFolder}",
"shell": {
"executable": "/bin/zsh",
"args": ["-lc"]
}
},
"dependsOn": ["Desktop: build"],
"problemMatcher": []
}
]
}
Loading