From fbd56cdf4356e00dcb607314e62800e90722906a Mon Sep 17 00:00:00 2001 From: ArthurSonzogni Date: Sat, 17 Aug 2024 10:57:13 +0200 Subject: [PATCH] Fix CQ failures. --- .github/workflows/build.yaml | 24 +++++++++++++--------- src/ftxui/component/screen_interactive.cpp | 3 +-- src/ftxui/screen/color.cpp | 2 ++ 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 68e240a..3bcca1e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,8 +2,6 @@ name: Build on: create: - tags: - -v* push: branches: - main @@ -28,10 +26,11 @@ jobs: compiler: llvm gcov_executable: "llvm-cov gcov" - - name: MacOS clang - os: macos-latest - compiler: llvm - gcov_executable: "llvm-cov gcov" + # https://github.com/aminya/setup-cpp/issues/246 + #- name: MacOS clang + #os: macos-latest + #compiler: llvm + #gcov_executable: "llvm-cov gcov" - name: Windows MSVC os: windows-latest @@ -44,7 +43,7 @@ jobs: id: cpu-cores - name: "Checkout repository" - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: "Setup Cpp" uses: aminya/setup-cpp@v1 @@ -79,11 +78,16 @@ jobs: cmake --build ./build - - name: Unix - Test and coverage + - name: Unix - Test if: runner.os != 'Windows' working-directory: ./build run: > ctest -C Debug --rerun-failed --output-on-failure; + + - name: Unix - coverage + if: runner.os != 'Windows' + working-directory: ./build + run: > gcovr -j ${{env.nproc}} --delete @@ -155,7 +159,7 @@ jobs: id: cpu-cores - name: "Checkout repository" - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: "Install cmake" uses: lukka/get-cmake@latest @@ -186,7 +190,7 @@ jobs: runs-on: ubuntu-latest steps: - name: "Checkout repository" - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: "Install cmake" uses: lukka/get-cmake@latest diff --git a/src/ftxui/component/screen_interactive.cpp b/src/ftxui/component/screen_interactive.cpp index 12c9caa..b5643ed 100644 --- a/src/ftxui/component/screen_interactive.cpp +++ b/src/ftxui/component/screen_interactive.cpp @@ -46,7 +46,6 @@ #error Must be compiled in UNICODE mode #endif #else -#include #include // for select, FD_ISSET, FD_SET, FD_ZERO, fd_set, timeval #include // for tcsetattr, termios, tcgetattr, TCSANOW, cc_t, ECHO, ICANON, VMIN, VTIME #include // for STDIN_FILENO, read @@ -163,7 +162,7 @@ void ftxui_on_resize(int columns, int rows) { #else // POSIX (Linux & Mac) int CheckStdinReady(int usec_timeout) { - timeval tv = {0, usec_timeout}; + timeval tv = {0, usec_timeout}; // NOLINT fd_set fds; FD_ZERO(&fds); // NOLINT FD_SET(STDIN_FILENO, &fds); // NOLINT diff --git a/src/ftxui/screen/color.cpp b/src/ftxui/screen/color.cpp index 14e2863..43e7898 100644 --- a/src/ftxui/screen/color.cpp +++ b/src/ftxui/screen/color.cpp @@ -69,6 +69,8 @@ std::string Color::Print(bool is_background_color) const { ";" + std::to_string(blue_); } } + // NOTREACHED(); + return ""; } /// @brief Build a transparent color.