Skip to content

Commit

Permalink
Add actions workflow (Yao-class-cpp-studio#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyJazz authored Dec 30, 2023
1 parent f61d815 commit 883964e
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 3 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build&test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name: CMake Build and Test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
build:
runs-on: [self-hosted, Linux, Vulkan]

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Configure CMake Clang Debug
run: cmake -G "Ninja" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang-14 -DCMAKE_CXX_COMPILER=clang++-14

- name: Build Clang Debug
run: cmake --build ${{github.workspace}}/build -j

- name: Run Tests
run: ${{github.workspace}}/build/test/GameXTest
2 changes: 1 addition & 1 deletion src/GameX/application/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ file(GLOB_RECURSE SOURCES *.cpp *.h)
add_library(${LIB_NAME} ${SOURCES})

target_include_directories(${LIB_NAME} PUBLIC ${COMMON_INCLUDE_DIRS})
target_link_libraries(${LIB_NAME} PUBLIC grassland)
target_link_libraries(${LIB_NAME} PUBLIC grassland GameXRenderer)

list(APPEND GAMEX_LIBS ${LIB_NAME})
set(GAMEX_LIBS ${GAMEX_LIBS} PARENT_SCOPE)
Expand Down
2 changes: 1 addition & 1 deletion src/GameX/physics/world.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <random>
#include <vector>

#include "Gamex/physics/collision.h"
#include "GameX/physics/collision.h"

namespace GameX::Physics {
World::World() {
Expand Down
2 changes: 1 addition & 1 deletion src/GameX/renderer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ file(GLOB_RECURSE SOURCES *.cpp *.h)
add_library(${LIB_NAME} ${SOURCES})

target_include_directories(${LIB_NAME} PUBLIC ${COMMON_INCLUDE_DIRS})
target_link_libraries(${LIB_NAME} PUBLIC grassland GameXShaders)
target_link_libraries(${LIB_NAME} PUBLIC grassland GameXShaders GameXUtils)

list(APPEND GAMEX_LIBS ${LIB_NAME})
set(GAMEX_LIBS ${GAMEX_LIBS} PARENT_SCOPE)
Expand Down

0 comments on commit 883964e

Please sign in to comment.