From fe66697ad8eddaa91feb19ea92cfe6a7226ea9b0 Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Wed, 4 Oct 2023 13:52:14 -0700 Subject: Fix CI Ubuntu-22.04 (which is what ubuntu-latest is at the time of writing) now has clang++-14/clang-format-14 instead of 12. Update those and reformat files. Also, make our github action based on ubuntu-22.04 explicetly so that when latest changes we don't break again. (Although in scenarios like this we would still break) Also change a forward declaration to an include to resolve a build failure. --- .github/workflows/cpp-ci.yml | 6 +++--- src/file_cache.h | 2 +- src/func.cc | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cpp-ci.yml b/.github/workflows/cpp-ci.yml index 7807a93..ca262a6 100644 --- a/.github/workflows/cpp-ci.yml +++ b/.github/workflows/cpp-ci.yml @@ -11,11 +11,11 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 env: - CXX: clang++-12 - CLANG_FORMAT: clang-format-12 + CXX: clang++-14 + CLANG_FORMAT: clang-format-14 steps: - uses: actions/checkout@v2 diff --git a/src/file_cache.h b/src/file_cache.h index ce3be6a..a17c861 100644 --- a/src/file_cache.h +++ b/src/file_cache.h @@ -18,7 +18,7 @@ #include #include -class Makefile; +#include "file.h" class MakefileCacheManager { public: diff --git a/src/func.cc b/src/func.cc index b7e1b24..75a7cb6 100644 --- a/src/func.cc +++ b/src/func.cc @@ -1086,7 +1086,9 @@ void ExtraFileDepsFunc(const std::vector& args, #define ENTRY(name, args...) \ { \ - name, { name, args } \ + name, { \ + name, args \ + } \ } static const std::unordered_map g_func_info_map = { -- cgit v1.2.3