Skip to content

Commit

Permalink
WIP: fix CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe2933 committed Sep 30, 2024
1 parent b0219b3 commit bb2479e
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 70 deletions.
37 changes: 0 additions & 37 deletions .github/workflows/CMakeUserPresets.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Configure
run: |
mv .github/workflows/CMakeUserPresets.json .
mv .github/workflows/scripts/* .
cmake --preset=clang
- name: Build
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/scripts/CMakeUserPresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"version": 6,
"configurePresets": [
{
"name": "linux-clang-18",
"displayName": "Linux + Clang 18",
"inherits": "default",
"cacheVariables": {
"CMAKE_C_COMPILER": "/usr/bin/clang-18",
"CMAKE_CXX_COMPILER": "/usr/bin/clang++-18",
"CMAKE_CXX_FLAGS": "-stdlib=libc++",
"CMAKE_EXE_LINKER_FLAGS": "-stdlib=libc++ -lc++abi",
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/triplets",
"VCPKG_TARGET_TRIPLET": "x64-linux-clang"
}
}
]
}
File renamed without changes.
4 changes: 1 addition & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ jobs:
toolset: 14.40

- name: Configure
run: |
mv .github\workflows\CMakeUserPresets.json .\
cmake --preset=msvc
run: cmake --preset=default

- name: Build
run: cmake --build build --config release
8 changes: 1 addition & 7 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,8 @@
"configurePresets": [
{
"name": "default",
"displayName": "Default",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build"
},
{
"name": "vcpkg",
"displayName": "vcpkg-based dependency management",
"inherits": "default",
"binaryDir": "${sourceDir}/build",
"toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"cacheVariables": {
"VCPKG_OVERLAY_PORTS": "${sourceDir}/overlays"
Expand Down
25 changes: 3 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ This project depends on:
- [Vulkan-Hpp](https://github.com/KhronosGroup/Vulkan-Hpp)
- [VulkanMemoryAllocator-Hpp](https://github.com/YaaZ/VulkanMemoryAllocator-Hpp)

### Build Steps
Dependencies will be automatically fetched using vcpkg.

### 1. Using vcpkg
### Build Steps

> [!TIP]
> This project uses GitHub Runner to ensure build compatibility on both Linux and Windows, with dependency management handled by vcpkg. You can check the workflow files in the [.github/workflows](.github/workflows) folder.
Expand All @@ -38,31 +38,12 @@ This project, along with its dependency `vku`, supports vcpkg for dependency man
```sh
git clone https://github.com/stripe2933/vk-deferred
cd vk-deferred
cmake --preset=vcpkg # Or use your own configuration preset that inherits from the "vcpkg" preset.
cmake --preset=default # Or use your own configuration preset that inherits from the "default" preset.
cmake --build build -t vk-deferred
```

The executable will be located in the build folder.

### 2. Manual Dependency Setup

If your system already has the required dependencies installed, and the following CMake commands are available:

```cmake
find_package(VulkanMemoryAllocator CONFIG REQUIRED)
find_package(VulkanMemoryAllocator-Hpp CONFIG REQUIRED)
find_package(vku CONFIG REQUIRED)
```

You can build the project with these commands:

```sh
git clone https://github.com/stripe2933/vk-deferred
cd vk-deferred
cmake --preset=default
cmake --build build -t vk-deferred
```

### Shader compilation

All shaders are located in the [shaders](/shaders) folder and need to be manually compiled into `<shader-filename>.spv` before the application launch. To make this easier, script files are available for you:
Expand Down

0 comments on commit bb2479e

Please sign in to comment.