Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre-commit workflow #318

Merged
merged 2 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .conan/profiles/arch/armv8
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[settings]
arch=armv8
arch=armv8
14 changes: 14 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: pre-commit

on:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.0
2 changes: 1 addition & 1 deletion cmake/morpheus_add_library.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ function(morpheus_add_library)
EXPORT morpheus-export-set
NAMESPACE morpheus::
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/morpheus"
)
)

endfunction()
12 changes: 6 additions & 6 deletions cmake/morpheus_add_target.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function(morpheus_add_target)
add_executable(${MORPHEUS_ALIAS} ALIAS ${MORPHEUS_NAME})
endif()
else()
add_library(${MORPHEUS_NAME} ${isInterface})
add_library(${MORPHEUS_NAME} ${isInterface})
add_library(${MORPHEUS_ALIAS} ALIAS ${MORPHEUS_NAME})
endif()

Expand Down Expand Up @@ -132,15 +132,15 @@ function(morpheus_add_target_properties)
set(oneValueArgs NAME FOLDER)
set(multiValueArgs)
cmake_parse_arguments(MORPHEUS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

if(${MORPHEUS_INTERFACE})
set(scope "INTERFACE")
else()
set(scope "PUBLIC")
set(scope "PUBLIC")
endif()

target_compile_features(${MORPHEUS_NAME} ${scope} cxx_std_23)
target_compile_features(${MORPHEUS_NAME} ${scope} cxx_std_23)

set_target_properties(${MORPHEUS_NAME}
PROPERTIES
CXX_STANDARD 23
Expand All @@ -160,7 +160,7 @@ function(morpheus_add_target_properties)

# Create an empty header set here so that the subsequent install step finds it.
target_sources(${MORPHEUS_NAME} ${scope} FILE_SET HEADERS FILES)

install(TARGETS ${MORPHEUS_NAME}
EXPORT morpheus-export-set
FILE_SET HEADERS
Expand Down
3 changes: 1 addition & 2 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ def package_info(self):
self.cpp_info.components["vulkan"].set_property("cmake_file_name", "MorpheusGfxVulkan")
self.cpp_info.components["vulkan"].set_property("cmake_target_name", "morpheus::gfx::vulkan")
self.cpp_info.components["vulkan"].requires.append("vulkan-headers::vulkan-headers")

if (self.settings.os in ["Macos", "iOS", "tvOS"]):
self.cpp_info.components["vulkan"].requires.append("moltenvk::moltenvk")

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
target_sources(MorpheusGfxNVidia
PUBLIC
FILE_SET HEADERS
FILES
FILES
adapter.hpp
driver.hpp
functions.hpp
Expand Down
Loading