Format and more CI

This commit is contained in:
Shaun Reed 2023-04-02 12:31:23 -04:00
parent be69d2d242
commit b0e123e6dd
5 changed files with 164 additions and 163 deletions

View File

@ -8,7 +8,7 @@ on:
jobs:
Qtk:
env:
CONFIG: -DQTK_SUBMODULES=ON -DQTK_DEBUG=OFF -DQTK_CCACHE=OFF -DQTK_GUI=ON -DQTK_LIBRARY=ON -DQTK_PLUGINS=OFF -DQTK_EXAMPLE=ON
CONFIG: -DQTK_SUBMODULES=ON -DQTK_DEBUG=OFF -DQTK_CCACHE=OFF -DQTK_GUI=ON -DQTK_PLUGINS=OFF -DQTK_EXAMPLE=ON
strategy:
fail-fast: false
matrix:
@ -138,7 +138,7 @@ jobs:
Qtk-Library:
env:
CONFIG: -DQTK_SUBMODULES=ON -DQTK_DEBUG=OFF -DQTK_CCACHE=OFF -DQTK_GUI=OFF -DQTK_LIBRARY=ON -DQTK_PLUGINS=OFF -DQTK_EXAMPLE=OFF
CONFIG: -DQTK_SUBMODULES=ON -DQTK_DEBUG=OFF -DQTK_CCACHE=OFF -DQTK_GUI=OFF -DQTK_PLUGINS=OFF -DQTK_EXAMPLE=OFF
strategy:
fail-fast: false
matrix:
@ -176,7 +176,7 @@ jobs:
- name: Build Qtk Library (Windows)
if: matrix.os == 'windows-latest'
shell: bash
run: cmake --build build/ --config Release
run: cmake --build build/ --config Release --target qtk_library
# OSX / Linux
@ -254,7 +254,7 @@ jobs:
Qtk-Plugins:
env:
CONFIG: -DQTK_SUBMODULES=ON -DQTK_DEBUG=OFF -DQTK_CCACHE=OFF -DQTK_GUI=OFF -DQTK_LIBRARY=OFF -DQTK_PLUGINS=ON -DQTK_EXAMPLE=OFF
CONFIG: -DQTK_SUBMODULES=ON -DQTK_DEBUG=OFF -DQTK_CCACHE=OFF -DQTK_GUI=OFF -DQTK_PLUGINS=ON -DQTK_EXAMPLE=OFF
strategy:
fail-fast: false
matrix:

View File

@ -21,8 +21,8 @@ jobs:
- name: Build Qtk
run: |
cmake -B build -DQTK_UPDATE_SUBMODULES=OFF -DQTK_ENABLE_CCACHE=OFF
cmake --build build
cmake -B build -DQTK_SUBMODULES=OFF -DQTK_CCACHE=OFF -DQTK_PLUGINS=OFF -DQTK_GUI=ON
cmake --build build --target qtk_gui -- -j $(nproc)
- uses: cpp-linter/cpp-linter-action@v2
id: linter

View File

@ -241,7 +241,7 @@ Last we need to run `clang-format`, this can be done with the command directly.
This will reformat all the code in the repository.
```bash
clang-format -i --style=file:.clang-format src/*.cpp src/*.h app/*.cpp app/*.h
clang-format -i --style=file:.clang-format src/app/*.cpp src/app/*.h src/qtk/*.cpp src/qtk/*.h example-app/*.cpp example-app/*.h
```
`clang-format` can be run with git integration (or CLion if you prefer).

View File

@ -24,8 +24,8 @@ void ExampleScene::init() {
setSkybox(skybox);
auto spartan = new Model(
"spartan", std::string(QTK_EXAMPLE_SOURCE_DIR) +
"/../resources/models/spartan/spartan.obj");
"spartan", std::string(QTK_EXAMPLE_SOURCE_DIR)
+ "/../resources/models/spartan/spartan.obj");
addObject(spartan);
spartan->getTransform().setTranslation(-4.0f, 0.0f, 0.0f);

View File

@ -62,7 +62,8 @@ namespace Qtk {
std::string name, std::string path,
std::string vertexShader = ":/shaders/model-basic.vert",
std::string fragmentShader = ":/shaders/model-basic.frag") :
Model(name.c_str(), path.c_str(), vertexShader.c_str(),
Model(
name.c_str(), path.c_str(), vertexShader.c_str(),
fragmentShader.c_str()) {}
inline ~Model() override { mManager.remove(getName().c_str()); }