diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..6de20f4 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,36 @@ +name: Tests + +on: + push: + branches: + - main + - develop + pull_request: + branches: + - main + - develop + +jobs: + run-tests: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y clang ninja-build git cmake qt6-base-dev qt6-multimedia-dev libboost-all-dev libspdlog-dev libcxxopts-dev libgl1-mesa-dev + + - name: Build project + env: + CC: clang + CXX: clang++ + run: | + cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON + cmake --build build + + - name: Run tests + run: | + ./build/bin/tests diff --git a/CMakeLists.txt b/CMakeLists.txt index f30eef9..3b818f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ option(BUILD_TESTS "Build tests" OFF) message(STATUS "Build type: ${CMAKE_BUILD_TYPE}") message(STATUS "Build tests: ${BUILD_TESTS}") -set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_AUTOMOC ON) diff --git a/src/helpers/time.cpp b/src/helpers/time.cpp index 1d67c97..2058921 100644 --- a/src/helpers/time.cpp +++ b/src/helpers/time.cpp @@ -1,7 +1,6 @@ #include #include -#include #include #include #include