diff --git a/.github/workflows/branch-build.yml b/.github/workflows/branch-build.yml index a303edf..d96c3e2 100644 --- a/.github/workflows/branch-build.yml +++ b/.github/workflows/branch-build.yml @@ -21,3 +21,6 @@ jobs: - name: Build run: cmake --build ${{github.workspace}}/build + + - name: Test + run: cmake --build ${{github.workspace}}/build --target test diff --git a/.github/workflows/master-release.yml b/.github/workflows/master-release.yml index fe94e0f..9a1e20c 100644 --- a/.github/workflows/master-release.yml +++ b/.github/workflows/master-release.yml @@ -32,6 +32,9 @@ jobs: - name: Build run: cmake --build ${{github.workspace}}/build + - name: Test + run: cmake --build ${{github.workspace}}/build --target test + - name: Create Release uses: softprops/action-gh-release@v1 if: steps.tag_version.outputs.new_tag diff --git a/CMakeLists.txt b/CMakeLists.txt index efbba9a..75a6157 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,9 @@ -cmake_minimum_required(VERSION 3.12) - -project(gifscript CXX C) +cmake_minimum_required(VERSION 3.22) set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED ON) +project(gifscript CXX C) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}) find_package(RAGEL REQUIRED) diff --git a/core/include/types.hpp b/core/include/types.hpp index b5b27ee..049e093 100644 --- a/core/include/types.hpp +++ b/core/include/types.hpp @@ -1,8 +1,8 @@ #pragma once #include -#include +#include #include -#include +#include static std::vector vec_split(const std::string& s) { diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 93c800e..f6b07a0 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,6 +1,9 @@ set(CMAKE_CXX_CLANG_TIDY "") -cmake_policy(SET CMP0135 NEW) +if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.24) + cmake_policy(SET CMP0135 NEW) +endif() + FetchContent_Declare( googletest URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip diff --git a/tests/type_tests.cpp b/tests/type_tests.cpp index 4af9a73..9109963 100644 --- a/tests/type_tests.cpp +++ b/tests/type_tests.cpp @@ -1,6 +1,6 @@ #include #include - +#include #include "types.hpp"