ci: repair first-run workflow failures (#1)

## Root causes (run 33344835245)

| Job | Cause | Fix |
|---|---|---|
| Host GCC compatibility | Runner GCC 13.3 has no `-std=c++26`;
`poc/host` sets `CMAKE_CXX_STANDARD 26` | Install `gcc-14`/`g++-14`, set
`CC`/`CXX` |
| Host branch coverage | `llvm-profdata: command not found` (clang-18
present, LLVM tools absent) | Install `llvm-18`, prepend
`/usr/lib/llvm-18/bin` to PATH |
| ESP-IDF dev firmware | `cmake: command not found` — action overrides
container entrypoint so the IDF env is never sourced | Source `.
/opt/esp/idf/export.sh` in the build step |
| ESP-IDF M1 hardware firmware | same as above | same |
| Repository gates | clang-format v22-formatted sources vs CI
clang-format-18 (console_service.cc:260,300; display_service.cc:31;
status_log.cc:34) | Reformatted with clang-format 18.1.8 semantics; full
dry-run green |
| Gitleaks | No secret finding: the push-event scan range referenced
stale pre-rewrite revision `7bae861` (unknown revision); scan infra
failed | No change — one-time bootstrap artifact; PR/post-merge events
have valid ranges (verified by this run) |

Host Clang ASan/UBSan and Host clang-tidy were already green; `required`
is the aggregate.

Formatting diffs are formatting-only (`struct tm utc_time{}` -> `struct
tm utc_time {}`).

---------

Co-authored-by: ania-lain <[email protected]>
This commit is contained in:
Lain
2026-08-31 09:04:01 +08:00
committed by GitHub
co-authored by lain
parent 2851ac7fc5
commit d73cadbcd6
4 changed files with 21 additions and 7 deletions
+17 -3
View File
@@ -101,10 +101,15 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Install GCC 14 toolchain
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y gcc-14 g++-14
- name: Configure, build, and test
env:
CC: gcc
CXX: g++
CC: gcc-14
CXX: g++-14
run: |
set -euo pipefail
cmake -S poc/host -B .build/host-gcc
@@ -149,6 +154,11 @@ jobs:
run: |
set -euo pipefail
uv sync --frozen
- name: Install LLVM coverage tools
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y llvm-18
- name: Build and collect LLVM coverage
env:
CC: clang
@@ -156,6 +166,8 @@ jobs:
LLVM_PROFILE_FILE: ${{ github.workspace }}/.build/coverage/profile-%p.profraw
run: |
set -euo pipefail
export PATH="/usr/lib/llvm-18/bin:$PATH"
llvm-profdata --version | head -n 1
cmake -S poc/host -B .build/coverage -DENABLE_COVERAGE=ON
cmake --build .build/coverage --parallel 2
ctest --test-dir .build/coverage --output-on-failure
@@ -202,6 +214,7 @@ jobs:
persist-credentials: false
- name: Configure and build dev firmware
run: |
. /opt/esp/idf/export.sh
set -euo pipefail
cmake --preset dev
cmake --build --preset dev --parallel 2
@@ -233,6 +246,7 @@ jobs:
- name: Configure and build M1 firmware
working-directory: poc/apps/m1_hardware
run: |
. /opt/esp/idf/export.sh
set -euo pipefail
cmake --preset default
cmake --build --preset default --parallel 2
@@ -251,7 +265,7 @@ jobs:
include-hidden-files: true
required:
name: required
name: CI / required
runs-on: ubuntu-24.04
if: always()
needs:
+2 -2
View File
@@ -257,7 +257,7 @@ void console_service::print_status(bool json) const {
char utc[32]{};
if (value.rtc.valid) {
const time_t seconds = static_cast<time_t>(value.rtc.unix_seconds);
struct tm utc_time{};
struct tm utc_time {};
if (gmtime_r(&seconds, &utc_time) != nullptr) {
const unsigned year = static_cast<unsigned>(utc_time.tm_year + 1900);
std::snprintf(utc, sizeof(utc), "%04u-%02u-%02uT%02u:%02u:%02uZ", year,
@@ -297,7 +297,7 @@ void console_service::print_status(bool json) const {
char rtc_text[32]{};
if (value.rtc.valid) {
const time_t seconds = static_cast<time_t>(value.rtc.unix_seconds);
struct tm utc_time{};
struct tm utc_time {};
if (gmtime_r(&seconds, &utc_time) != nullptr) {
const unsigned year = static_cast<unsigned>(utc_time.tm_year + 1900);
std::snprintf(
+1 -1
View File
@@ -28,7 +28,7 @@ void format_rtc_time(const status_snapshot& value, char* output, std::size_t cap
return;
}
const time_t seconds = static_cast<time_t>(value.rtc.unix_seconds);
struct tm utc_time{};
struct tm utc_time {};
if (gmtime_r(&seconds, &utc_time) != nullptr) {
const unsigned year = static_cast<unsigned>(utc_time.tm_year + 1900);
std::snprintf(
+1 -1
View File
@@ -31,7 +31,7 @@ std::size_t format_status_log(const status_snapshot& status, uint64_t sequence,
char utc[32]{};
if (status.rtc.valid) {
const time_t seconds = static_cast<time_t>(status.rtc.unix_seconds);
struct tm utc_time{};
struct tm utc_time {};
if (gmtime_r(&seconds, &utc_time) != nullptr) {
const unsigned year = static_cast<unsigned>(utc_time.tm_year + 1900);
std::snprintf(