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 1a51ec5 commit a85c518
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 10 deletions.
37 changes: 27 additions & 10 deletions .github/workflows/CMakeUserPresets.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
{
"version": 6,
"configurePresets": [
{
"name": "ci-test",
"hidden": true,
"inherits": "vcpkg",
"cacheVariables": {
"VKU_ENABLE_TEST": "ON"
}
},
{
"name": "clang",
"inherits": "ci-test",
"inherits": "vcpkg",
"cacheVariables": {
"CMAKE_C_COMPILER": "/usr/bin/clang-18",
"CMAKE_CXX_COMPILER": "/usr/bin/clang++-18"
Expand All @@ -34,7 +26,7 @@
{
"name": "msvc",
"displayName": "MSVC",
"inherits": "ci-test",
"inherits": "vcpkg",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
Expand All @@ -55,5 +47,30 @@
"name": "msvc",
"configurePreset": "msvc"
}
],
"testPresets": [
{
"name": "ci-test",
"hidden": true,
"inherits": "vcpkg",
"cacheVariables": {
"VKU_ENABLE_TEST": "ON"
}
},
{
"name": "clang",
"inherits": "ci-test",
"configurePreset": "clang"
},
{
"name": "clang-libcxx",
"inherits": "ci-test",
"configurePreset": "clang-libcxx"
},
{
"name": "msvc",
"inherits": "ci-test",
"configurePreset": "msvc"
}
]
}
51 changes: 51 additions & 0 deletions .github/workflows/linux-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Linux

env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"

on:
push:
paths:
- '**'
- '!README.md'
- '!LICENSE.txt'
- '!.github/workflows/*.yml'
- '.github/workflows/linux-test.yml'

jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

- name: Install Vulkan SDK
uses: humbletim/setup-vulkan-sdk@v1.2.0
with:
vulkan-query-version: latest
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true

- name: Install Ninja and build dependencies
run: |
sudo apt-get install ninja-build libc++-dev libc++abi-dev mesa-vulkan-drivers
- name: Install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg && ./bootstrap-vcpkg.sh
echo "VCPKG_ROOT=${{ github.workspace }}/vcpkg" >> $GITHUB_ENV
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Apply patch for vcpkg-based dependency management
run: git apply vcpkg-deps.patch .github/workflows/ci-fix.patch

- name: Run CTest
run: |
mv .github/workflows/CMakeUserPresets.json .
ctest --preset=clang-libcxx
55 changes: 55 additions & 0 deletions .github/workflows/windows-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Windows

env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"

on:
push:
paths:
- '**'
- '!README.md'
- '!LICENSE.txt'
- '!.github/workflows/*.yml'
- '.github/workflows/windows-test.yml'

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
with:
toolset: 14.40

- name: Install Vulkan SDK
uses: humbletim/setup-vulkan-sdk@v1.2.0
with:
vulkan-query-version: latest
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true

- name: Install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg && .\bootstrap-vcpkg.bat
echo "VCPKG_ROOT=${{ github.workspace }}/vcpkg" >> $GITHUB_ENV
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Apply patch for vcpkg-based dependency management
run: git apply vcpkg-deps.patch .github/workflows/ci-fix.patch --whitespace=fix

- name: Install Mesa Vulkan drivers (Windows)
uses: ssciwr/setup-mesa-dist-win@v2

- name: Run CTest
run: |
mv .github/workflows/CMakeUserPresets.json .
ctest --preset=msvc

0 comments on commit a85c518

Please sign in to comment.