Skip to content

Commit

Permalink
WIP: Add CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe2933 committed Jul 21, 2024
1 parent 9577b10 commit 0a369db
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 35 deletions.
20 changes: 2 additions & 18 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,14 @@ jobs:
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install vku
run: |
git clone https://github.com/stripe2933/vku.git
cd vku
git checkout module
git apply vcpkg-deps.patch
cmake -S . -B build -G Ninja \
-DCMAKE_C_COMPILER="/usr/bin/clang-18" \
-DCMAKE_CXX_COMPILER="/usr/bin/clang++-18" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" \
-DVCPKG_OVERLAY_PORTS=overlays \
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
-DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++ -lc++abi" \
-DVKU_USE_STD_MODULE=ON
sudo cmake --build build --target install --config release
- name: Configure
run: |
mkdir build
cmake --preset=vcpkg \
-DCMAKE_C_COMPILER="/usr/bin/clang-18" \
-DCMAKE_CXX_COMPILER="/usr/bin/clang++-18" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" \
-DVCPKG_OVERLAY_PORTS=overlays \
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
-DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++ -lc++abi"
Expand Down
18 changes: 3 additions & 15 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,12 @@ jobs:
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install vku
run: |
git clone https://github.com/stripe2933/vku.git
cd vku
git checkout module
git apply vcpkg-deps.patch
cmake -S . -B build -G Ninja `
-DCMAKE_BUILD_TYPE=Release `
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" `
-DVCPKG_OVERLAY_PORTS=overlays `
-DVKU_USE_STD_MODULE=ON
cmake --build build --target install --config release
- name: Configure
run: |
mkdir build
cmake --preset=vcpkg `
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
-DCMAKE_BUILD_TYPE=Release `
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" `
-DVCPKG_OVERLAY_PORTS=overlays
- name: Build
run: cmake --build build --config release
13 changes: 12 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,18 @@ set(CMAKE_CXX_MODULE_STD 1)

find_package(glfw3 CONFIG REQUIRED)
find_package(glm CONFIG REQUIRED)
find_package(vku CONFIG REQUIRED)

include(FetchContent)

set(VKU_USE_STD_MODULE ON)
FetchContent_Declare(
vku
GIT_REPOSITORY https://github.com/stripe2933/vku.git
GIT_TAG module
PATCH_COMMAND git apply ${CMAKE_CURRENT_BINARY_DIR}/_deps/vku-src/vcpkg-deps.patch
UPDATE_DISCONNECTED 1
)
FetchContent_MakeAvailable(vku)

# ----------------
# Module configurations for external dependencies.
Expand Down
3 changes: 2 additions & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"dependencies": [
"glfw3",
"glm",
"glfw3"
"vulkan-memory-allocator-hpp"
]
}

0 comments on commit 0a369db

Please sign in to comment.