diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac4a142..d4448bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: diff --git a/poc/apps/m1_hardware/main/console_service.cc b/poc/apps/m1_hardware/main/console_service.cc index 262de24..d26091e 100644 --- a/poc/apps/m1_hardware/main/console_service.cc +++ b/poc/apps/m1_hardware/main/console_service.cc @@ -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(value.rtc.unix_seconds); - struct tm utc_time{}; + struct tm utc_time {}; if (gmtime_r(&seconds, &utc_time) != nullptr) { const unsigned year = static_cast(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(value.rtc.unix_seconds); - struct tm utc_time{}; + struct tm utc_time {}; if (gmtime_r(&seconds, &utc_time) != nullptr) { const unsigned year = static_cast(utc_time.tm_year + 1900); std::snprintf( diff --git a/poc/apps/m1_hardware/main/display_service.cc b/poc/apps/m1_hardware/main/display_service.cc index 2b5236c..cd879be 100644 --- a/poc/apps/m1_hardware/main/display_service.cc +++ b/poc/apps/m1_hardware/main/display_service.cc @@ -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(value.rtc.unix_seconds); - struct tm utc_time{}; + struct tm utc_time {}; if (gmtime_r(&seconds, &utc_time) != nullptr) { const unsigned year = static_cast(utc_time.tm_year + 1900); std::snprintf( diff --git a/poc/apps/m1_hardware/main/status_log.cc b/poc/apps/m1_hardware/main/status_log.cc index 682ac1a..f565b87 100644 --- a/poc/apps/m1_hardware/main/status_log.cc +++ b/poc/apps/m1_hardware/main/status_log.cc @@ -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(status.rtc.unix_seconds); - struct tm utc_time{}; + struct tm utc_time {}; if (gmtime_r(&seconds, &utc_time) != nullptr) { const unsigned year = static_cast(utc_time.tm_year + 1900); std::snprintf(