Skip to content

Commit 0183545

Browse files
Added Linux CI build
1 parent d47cf43 commit 0183545

File tree

3 files changed

+66
-5
lines changed

3 files changed

+66
-5
lines changed

.github/workflows/linux.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Build code on Linux
2+
3+
on:
4+
push:
5+
pull_request:
6+
types: [opened]
7+
8+
jobs:
9+
linux:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
cxx: [g++-12, clang++-15]
15+
build_type: [Debug, Release]
16+
include:
17+
- cxx: g++-12
18+
install: sudo apt install g++-12
19+
- cxx: clang++-15
20+
cxxflags: -stdlib=libc++
21+
install: sudo apt install clang-15 libc++-15-dev libc++abi-15-dev
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Create Build Environment
27+
run: |
28+
sudo apt update
29+
${{matrix.install}}
30+
cmake -E make_directory ${{runner.workspace}}/build
31+
32+
- name: Prepare Vulkan SDK
33+
shell: bash
34+
run: |
35+
curl -LS -o vulkansdk.tar.xz https://sdk.lunarg.com/sdk/download/1.4.309.0/linux/vulkansdk-linux-x86_64-1.4.309.0.tar.xz
36+
mkdir -p vulkan_sdk
37+
tar xf vulkansdk.tar.xz -C vulkan_sdk
38+
rm -rf vulkansdk.tar.xz
39+
40+
export VULKAN_SDK=$GITHUB_WORKSPACE/vulkan_sdk/1.4.309.0/x86_64
41+
export PATH=$VULKAN_SDK/bin:$PATH
42+
export LD_LIBRARY_PATH=$VULKAN_SDK/lib:$LD_LIBRARY_PATH
43+
export VK_ICD_FILENAMES=$VULKAN_SDK/etc/vulkan/icd.d
44+
export VK_LAYER_PATH=$VULKAN_SDK/etc/vulkan/layer.d
45+
46+
echo "VULKAN_SDK=$VULKAN_SDK" >> $GITHUB_ENV
47+
echo "PATH=$VULKAN_SDK/bin:$PATH" >> $GITHUB_ENV
48+
echo "LD_LIBRARY_PATH=$VULKAN_SDK/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
49+
echo "VK_ICD_FILENAMES=$VULKAN_SDK/etc/vulkan/icd.d" >> $GITHUB_ENV
50+
echo "VK_LAYER_PATH=$VULKAN_SDK/etc/vulkan/layer.d" >> $GITHUB_ENV
51+
52+
- name: Configure
53+
working-directory: ${{runner.workspace}}/build
54+
env:
55+
CXX: ${{matrix.cxx}}
56+
CXXFLAGS: ${{matrix.cxxflags}}
57+
run: |
58+
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
59+
-DVMA_BUILD_SAMPLES=YES \
60+
$GITHUB_WORKSPACE
61+
62+
- name: Build
63+
working-directory: ${{runner.workspace}}/build
64+
run: |
65+
threads=`nproc`
66+
cmake --build . --config ${{matrix.build_type}} --parallel $threads
File renamed without changes.

src/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@
2020
# THE SOFTWARE.
2121
#
2222

23-
if (NOT WIN32)
24-
message(STATUS "VmaSample application is only supported on Windows")
25-
return()
26-
endif()
27-
2823
option(VMA_STATIC_VULKAN_FUNCTIONS "Link statically with Vulkan API" ON)
2924
option(VMA_DYNAMIC_VULKAN_FUNCTIONS "Fetch pointers to Vulkan functions internally (no static linking)" OFF)
3025
option(VMA_DEBUG_ALWAYS_DEDICATED_MEMORY "Every allocation will have its own memory block" OFF)

0 commit comments

Comments
 (0)