Fix CQ failures.
Some checks failed
Build / Tests (cl, Windows MSVC, windows-latest) (push) Waiting to run
Build / Create release (push) Blocked by required conditions
Build / Build packages (build/ftxui*Darwin*, macos-latest) (push) Blocked by required conditions
Build / Build packages (build/ftxui*Linux*, ubuntu-latest) (push) Blocked by required conditions
Build / Build packages (build/ftxui*Win64*, windows-latest) (push) Blocked by required conditions
Build / Tests (gcc, gcov, Linux GCC, ubuntu-latest) (push) Failing after 6m44s
Build / Tests (llvm, llvm-cov gcov, Linux Clang, ubuntu-latest) (push) Successful in 6m31s
Build / documentation (push) Failing after 1m33s
CodeQL / Analyze (cpp) (push) Failing after 11s

This commit is contained in:
ArthurSonzogni 2024-08-17 10:57:13 +02:00
parent 66d1c1f61f
commit fbd56cdf43
No known key found for this signature in database
GPG Key ID: 41D98248C074CD6C
3 changed files with 17 additions and 12 deletions

View File

@ -2,8 +2,6 @@ name: Build
on: on:
create: create:
tags:
-v*
push: push:
branches: branches:
- main - main
@ -28,10 +26,11 @@ jobs:
compiler: llvm compiler: llvm
gcov_executable: "llvm-cov gcov" gcov_executable: "llvm-cov gcov"
- name: MacOS clang # https://github.com/aminya/setup-cpp/issues/246
os: macos-latest #- name: MacOS clang
compiler: llvm #os: macos-latest
gcov_executable: "llvm-cov gcov" #compiler: llvm
#gcov_executable: "llvm-cov gcov"
- name: Windows MSVC - name: Windows MSVC
os: windows-latest os: windows-latest
@ -44,7 +43,7 @@ jobs:
id: cpu-cores id: cpu-cores
- name: "Checkout repository" - name: "Checkout repository"
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: "Setup Cpp" - name: "Setup Cpp"
uses: aminya/setup-cpp@v1 uses: aminya/setup-cpp@v1
@ -79,11 +78,16 @@ jobs:
cmake cmake
--build ./build --build ./build
- name: Unix - Test and coverage - name: Unix - Test
if: runner.os != 'Windows' if: runner.os != 'Windows'
working-directory: ./build working-directory: ./build
run: > run: >
ctest -C Debug --rerun-failed --output-on-failure; ctest -C Debug --rerun-failed --output-on-failure;
- name: Unix - coverage
if: runner.os != 'Windows'
working-directory: ./build
run: >
gcovr gcovr
-j ${{env.nproc}} -j ${{env.nproc}}
--delete --delete
@ -155,7 +159,7 @@ jobs:
id: cpu-cores id: cpu-cores
- name: "Checkout repository" - name: "Checkout repository"
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: "Install cmake" - name: "Install cmake"
uses: lukka/get-cmake@latest uses: lukka/get-cmake@latest
@ -186,7 +190,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: "Checkout repository" - name: "Checkout repository"
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: "Install cmake" - name: "Install cmake"
uses: lukka/get-cmake@latest uses: lukka/get-cmake@latest

View File

@ -46,7 +46,6 @@
#error Must be compiled in UNICODE mode #error Must be compiled in UNICODE mode
#endif #endif
#else #else
#include <bits/types/struct_timeval.h>
#include <sys/select.h> // for select, FD_ISSET, FD_SET, FD_ZERO, fd_set, timeval #include <sys/select.h> // for select, FD_ISSET, FD_SET, FD_ZERO, fd_set, timeval
#include <termios.h> // for tcsetattr, termios, tcgetattr, TCSANOW, cc_t, ECHO, ICANON, VMIN, VTIME #include <termios.h> // for tcsetattr, termios, tcgetattr, TCSANOW, cc_t, ECHO, ICANON, VMIN, VTIME
#include <unistd.h> // for STDIN_FILENO, read #include <unistd.h> // for STDIN_FILENO, read
@ -163,7 +162,7 @@ void ftxui_on_resize(int columns, int rows) {
#else // POSIX (Linux & Mac) #else // POSIX (Linux & Mac)
int CheckStdinReady(int usec_timeout) { int CheckStdinReady(int usec_timeout) {
timeval tv = {0, usec_timeout}; timeval tv = {0, usec_timeout}; // NOLINT
fd_set fds; fd_set fds;
FD_ZERO(&fds); // NOLINT FD_ZERO(&fds); // NOLINT
FD_SET(STDIN_FILENO, &fds); // NOLINT FD_SET(STDIN_FILENO, &fds); // NOLINT

View File

@ -69,6 +69,8 @@ std::string Color::Print(bool is_background_color) const {
";" + std::to_string(blue_); ";" + std::to_string(blue_);
} }
} }
// NOTREACHED();
return "";
} }
/// @brief Build a transparent color. /// @brief Build a transparent color.