-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a simple compilation test and linux CI
Compilation test is required because the smaple is windows-specific. Linux CI is needed because pull requests must stop breaking linux builds.
- Loading branch information
Showing
5 changed files
with
99 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: linux | ||
|
||
on: [push, pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
cxx: [g++-12, clang++-15] | ||
build_type: [Debug, Release] | ||
include: | ||
- cxx: g++-12 | ||
install: sudo apt install g++-12 | ||
- cxx: clang++-15 | ||
cxxflags: -stdlib=libc++ | ||
install: sudo apt install clang-15 libc++-15-dev libc++abi-15-dev | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Prepare Vulkan SDK | ||
uses: humbletim/[email protected] | ||
with: | ||
version: 1.3.290.0 | ||
cache: true | ||
|
||
- name: Create Build Environment | ||
run: | | ||
sudo apt update | ||
${{matrix.install}} | ||
cmake -E make_directory ${{runner.workspace}}/build | ||
- name: Configure | ||
working-directory: ${{runner.workspace}}/build | ||
env: | ||
CXX: ${{matrix.cxx}} | ||
CXXFLAGS: ${{matrix.cxxflags}} | ||
run: | | ||
cmake -DCPM_SOURCE_CACHE=~/cpm-cache \ | ||
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \ | ||
-DVMA_BUILD_SAMPLES=YES \ | ||
$GITHUB_WORKSPACE | ||
- name: Build | ||
working-directory: ${{runner.workspace}}/build | ||
run: | | ||
threads=`nproc` | ||
cmake --build . --target VmaCompilationTest --config ${{matrix.build_type}} --parallel $threads |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# | ||
# Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All rights reserved. | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in | ||
# all copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
# THE SOFTWARE. | ||
# | ||
|
||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
||
find_package(Vulkan REQUIRED) | ||
|
||
add_library(VmaCompilationTest) | ||
target_sources(VmaCompilationTest PRIVATE vma_impl.cpp) | ||
|
||
target_link_libraries(VmaCompilationTest PRIVATE GPUOpen::VulkanMemoryAllocator) | ||
|
||
target_link_libraries(VmaCompilationTest PUBLIC Vulkan::Vulkan) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#define VMA_IMPLEMENTATION | ||
#include <vk_mem_alloc.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters