Add CI on MacOS.

This commit is contained in:
asuessenbach 2021-12-08 09:34:04 +01:00 committed by Stephan Seitz
parent 86ae20eea6
commit 9e4f6812fb
6 changed files with 48 additions and 4 deletions

38
.github/workflows/ci-macos.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: CI MacOS
on: [push, pull_request]
jobs:
build:
runs-on: macos-latest
strategy:
matrix:
build_type: [Debug, Release]
cxx_compiler: [g++-11, clang++]
cxx_standard: [11, 14, 17, 20]
steps:
- uses: actions/checkout@v2
- name: Install libraries
run: |
brew install clang-format molten-vk
- name: Update Submodules
run: git submodule update --init --recursive
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build
-DSAMPLES_BUILD=ON
-DSAMPLES_BUILD_ONLY_DYNAMIC=ON
-DSAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP=ON
-DTESTS_BUILD=ON
-DTESTS_BUILD_ONLY_DYNAMIC=ON
-DTESTS_BUILD_WITH_LOCAL_VULKAN_HPP=ON
-DVULKAN_HPP_RUN_GENERATOR=ON
-DCMAKE_CXX_COMPILER=${{matrix.cxx_compiler}}
-DCMAKE_CXX_STANDARD=${{matrix.cxx_standard}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}}

View File

@ -33,6 +33,8 @@ if (CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(-DNOMINMAX -DVK_USE_PLATFORM_WIN32_KHR)
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
add_definitions(-DVK_USE_PLATFORM_XCB_KHR)
elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
add_definitions(-DVK_USE_PLATFORM_MACOS_MVK)
else()
message(FATAL_ERROR, "Vulkan-Hpp: unhandled platform for samples!")
endif()

View File

@ -27,11 +27,11 @@ set(SOURCES
source_group(headers FILES ${HEADERS})
source_group(sources FILES ${SOURCES})
add_library(RAII_utils
add_library(RAII_utils INTERFACE
${SOURCES}
${HEADERS}
)
target_link_libraries(RAII_utils PRIVATE utils)
target_compile_definitions(RAII_utils PUBLIC VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1)
target_link_libraries(RAII_utils INTERFACE utils)
target_compile_definitions(RAII_utils INTERFACE VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=1)

@ -1 +1 @@
Subproject commit 3ee5f2f1d3316e228916788b300d786bb574d337
Subproject commit bffcf209cb67f718bd8faafd43d0379f943c116f

View File

@ -33,6 +33,8 @@ if (CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(-DNOMINMAX -DVK_USE_PLATFORM_WIN32_KHR)
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
add_definitions(-DVK_USE_PLATFORM_XCB_KHR)
elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
add_definitions(-DVK_USE_PLATFORM_MACOS_MVK)
else()
message(FATAL_ERROR, "Vulkan-Hpp: unhandled platform for samples!")
endif()

View File

@ -32,6 +32,8 @@ endif(MSVC)
if (WIN32)
add_definitions(-DNOMINMAX -DVK_USE_PLATFORM_WIN32_KHR)
elseif(APPLE)
add_definitions(-DVK_USE_PLATFORM_MACOS_MVK)
elseif(UNIX)
add_definitions(-DVK_USE_PLATFORM_XLIB_KHR)
endif()