Skip to content

Commit

Permalink
improvement: added test pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
BartSte committed Dec 30, 2023
1 parent 3e2b24a commit bfc8f15
Show file tree
Hide file tree
Showing 8 changed files with 2,925 additions and 6 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
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 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: ctest --test-dir ./build --verbose
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ Ensure the following dependencies are installed:
| Dependency | Version |
| ------------------------------------------------------------- | -------- |
| [Qt6](https://www.qt.io/download): base & multimedia (ffmpeg) | ≥ 6.6.0 |
| [cxxopts](https://github.com/jarro2783/cxxopts) | ≥ 3.1.1 |
| [boost](https://www.boost.org/) | ≥ 1.83 |
| [spdlog](https://github.com/gabime/spdlog) | ≥ 1.12.0 |

Expand All @@ -68,6 +67,10 @@ For building the project, the following dependencies are required:
- [CMake](https://cmake.org/download/)
- [Ninja](https://ninja-build.org/)

`cxxopts` and `googletest` are also dependencies, but they are included in the
project. The former as a header file in the `extern` directory, and the latter
is installed using `cmake`.

## Installation

The following sections explain how to install the project. You have two
Expand Down
Loading

0 comments on commit bfc8f15

Please sign in to comment.