Skip to content

Commit

Permalink
WIP: enabled CI test using llvmpipe.
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe2933 committed Aug 31, 2024
1 parent 6407520 commit 2103945
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 36 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build-presets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"version": 6,
"configurePresets": [
{
"name": "clang",
"inherits": "vcpkg",
"cacheVariables": {
"CMAKE_C_COMPILER": "/usr/bin/clang-18",
"CMAKE_CXX_COMPILER": "/usr/bin/clang++-18"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
}
},
{
"name": "clang-libcxx",
"displayName": "Clang + libc++",
"inherits": "clang",
"cacheVariables": {
"CMAKE_CXX_FLAGS": "-stdlib=libc++",
"CMAKE_EXE_LINKER_FLAGS": "-stdlib=libc++ -lc++abi"
}
},
{
"name": "msvc",
"displayName": "MSVC",
"inherits": "vcpkg",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
}
],
"buildPresets": [
{
"name": "clang",
"configurePreset": "clang"
},
{
"name": "clang-libcxx",
"configurePreset": "clang-libcxx"
},
{
"name": "msvc",
"configurePreset": "msvc"
}
]
}
5 changes: 3 additions & 2 deletions .github/workflows/linux-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ jobs:
- name: Apply patch for vcpkg-based dependency management
run: git apply vcpkg-deps.patch .github/workflows/ci-fix.patch

- name: Configure and Run CTest
- name: Configure, Build and Run CTest
run: |
mv .github/workflows/CMakeUserPresets.json .
mv .github/workflows/test-presets.json CMakeUserPresets.json
cmake --preset=clang-libcxx-test \
-DVKU_USE_STD_MODULE=ON
cmake --build --preset=clang-libcxx
ctest --preset=clang-libcxx
8 changes: 3 additions & 5 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,10 @@ jobs:
- name: Apply patch for vcpkg-based dependency management
run: git apply vcpkg-deps.patch .github/workflows/ci-fix.patch

- name: Configure
- name: Configure and Build
run: |
mv .github/workflows/CMakeUserPresets.json .
mv .github/workflows/build-presets.json CMakeUserPresets.json
cmake --preset=${{ matrix.use_std_module == 'ON' && 'clang-libcxx' || 'clang' }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build }} \
-DVKU_USE_STD_MODULE=${{ matrix.use_std_module }}
- name: Install
run: cmake --build --preset=${{ matrix.use_std_module == 'ON' && 'clang-libcxx' || 'clang' }} --target install
cmake --build --preset=${{ matrix.use_std_module == 'ON' && 'clang-libcxx' || 'clang' }} --target install
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@
"version": 6,
"configurePresets": [
{
"name": "clang",
"name": "ci-test",
"hidden": true,
"inherits": "vcpkg",
"cacheVariables": {
"VKU_ENABLE_TEST": "ON"
}
},
{
"name": "clang",
"inherits": "ci-test",
"cacheVariables": {
"CMAKE_C_COMPILER": "/usr/bin/clang-18",
"CMAKE_CXX_COMPILER": "/usr/bin/clang++-18"
Expand All @@ -26,33 +34,12 @@
{
"name": "msvc",
"displayName": "MSVC",
"inherits": "vcpkg",
"inherits": "ci-test",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "clang-test",
"inherits": "clang",
"cacheVariables": {
"VKU_ENABLE_TEST": "ON"
}
},
{
"name": "clang-libcxx-test",
"inherits": "clang-libcxx",
"cacheVariables": {
"VKU_ENABLE_TEST": "ON"
}
},
{
"name": "msvc-test",
"inherits": "msvc",
"cacheVariables": {
"VKU_ENABLE_TEST": "ON"
}
}
],
"buildPresets": [
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:

- name: Configure and Run CTest
run: |
mv .github\workflows\CMakeUserPresets.json .\
mv .github\workflows\test-presets.json CMakeUserPresets.json
cmake --preset=msvc `
-DVKU_USE_STD_MODULE=ON
ctest --preset=msvc
8 changes: 3 additions & 5 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,10 @@ jobs:
- name: Apply patch for vcpkg-based dependency management
run: git apply vcpkg-deps.patch .github/workflows/ci-fix.patch --whitespace=fix

- name: Configure
- name: Configure and Build
run: |
mv .github\workflows\CMakeUserPresets.json .\
mv .github\workflows\build-presets.json CMakeUserPresets.json
cmake --preset=msvc `
-DCMAKE_BUILD_TYPE=${{ matrix.build }} `
-DVKU_USE_STD_MODULE=${{ matrix.use_std_module }}
- name: Install
run: cmake --build --preset=msvc --target install
cmake --build --preset=msvc --target install

0 comments on commit 2103945

Please sign in to comment.