Added initial example for automated CI
Signed-off-by: Alejandro Saucedo <axsauze@gmail.com>
This commit is contained in:
parent
637bfb1bc0
commit
8a3d2277b7
3 changed files with 64 additions and 20 deletions
38
.github/workflows/cpp_examples.yml
vendored
Normal file
38
.github/workflows/cpp_examples.yml
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
name: C++ Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
array-multiplication-example:
|
||||
runs-on: ubuntu-latest
|
||||
container: axsauze/kompute-builder:0.4
|
||||
env:
|
||||
VK_ICD_FILENAMES: "/swiftshader/vk_swiftshader_icd.json"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: false
|
||||
- name: "[Release g++] Build & Test"
|
||||
uses: KomputeProject/action-cmake-build@master
|
||||
with:
|
||||
build-dir: ${{github.workspace}}/examples/array_multiplication/build
|
||||
source-dir: ${{github.workspace}}/examples/array_multiplication
|
||||
cc: gcc
|
||||
cxx: g++
|
||||
build-type: Debug
|
||||
run-test: false
|
||||
ctest-options: -V
|
||||
configure-options: -DKOMPUTE_OPT_USE_BUILT_IN_VULKAN_HEADER=ON KOMPUTE_OPT_FROM_SOURCE=ON
|
||||
build-options: --parallel # Given we don't build too many resources we can leverage parallel
|
||||
- name: Run tests
|
||||
run: |
|
||||
# Check that the expected output is printed
|
||||
OUTPUT=${{github.workspace}}/examples/array_multiplication/build/src/kompute_array_mult | \
|
||||
tee /dev/stdout | grep -q "Output: { 0 4 12 }"
|
||||
|
||||
|
||||
28
.github/workflows/cpp_tests.yml
vendored
28
.github/workflows/cpp_tests.yml
vendored
|
|
@ -10,9 +10,9 @@ jobs:
|
|||
cpp-tests-debug-with-debug-layers:
|
||||
runs-on: ubuntu-latest
|
||||
container: axsauze/kompute-builder:0.4
|
||||
env:
|
||||
VK_ICD_FILENAMES: "/swiftshader/vk_swiftshader_icd.json"
|
||||
steps:
|
||||
- name: Install vulkaninfo
|
||||
run: apt update -y && apt install -y vulkan-tools
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
|
|
@ -27,15 +27,15 @@ jobs:
|
|||
build-type: Debug
|
||||
run-test: false
|
||||
ctest-options: -V
|
||||
configure-options: -DKOMPUTE_OPT_BUILD_TESTS=ON -DKOMPUTE_OPT_DISABLE_VK_DEBUG_LAYERS=OFF -DKOMPUTE_OPT_DISABLE_VULKAN_VERSION_CHECK=ON -DKOMPUTE_OPT_USE_BUILT_IN_VULKAN_HEADER=ON
|
||||
configure-options: -DKOMPUTE_OPT_BUILD_TESTS=ON -DKOMPUTE_OPT_DISABLE_VK_DEBUG_LAYERS=OFF -DKOMPUTE_OPT_USE_BUILT_IN_VULKAN_HEADER=ON
|
||||
- name: Run tests
|
||||
env:
|
||||
VK_ICD_FILENAMES: "/swiftshader/vk_swiftshader_icd.json"
|
||||
run: make mk_run_tests
|
||||
|
||||
|
||||
cpp-tests-release-with-debug-layers:
|
||||
runs-on: ubuntu-latest
|
||||
container: axsauze/kompute-builder:0.4
|
||||
env:
|
||||
VK_ICD_FILENAMES: "/swiftshader/vk_swiftshader_icd.json"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
|
@ -51,15 +51,15 @@ jobs:
|
|||
build-type: Release
|
||||
run-test: false
|
||||
ctest-options: -V
|
||||
configure-options: -DKOMPUTE_OPT_BUILD_TESTS=ON -DKOMPUTE_OPT_DISABLE_VK_DEBUG_LAYERS=OFF -DKOMPUTE_OPT_DISABLE_VULKAN_VERSION_CHECK=ON -DKOMPUTE_OPT_USE_BUILT_IN_VULKAN_HEADER=ON
|
||||
configure-options: -DKOMPUTE_OPT_BUILD_TESTS=ON -DKOMPUTE_OPT_DISABLE_VK_DEBUG_LAYERS=OFF -DKOMPUTE_OPT_USE_BUILT_IN_VULKAN_HEADER=ON
|
||||
- name: Run tests
|
||||
env:
|
||||
VK_ICD_FILENAMES: "/swiftshader/vk_swiftshader_icd.json"
|
||||
run: make mk_run_tests
|
||||
|
||||
cpp-tests-debug-without-debug-layers:
|
||||
runs-on: ubuntu-latest
|
||||
container: axsauze/kompute-builder:0.4
|
||||
env:
|
||||
VK_ICD_FILENAMES: "/swiftshader/vk_swiftshader_icd.json"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
|
@ -75,15 +75,15 @@ jobs:
|
|||
build-type: Debug
|
||||
run-test: false
|
||||
ctest-options: -V
|
||||
configure-options: -DKOMPUTE_OPT_BUILD_TESTS=ON -DKOMPUTE_OPT_DISABLE_VK_DEBUG_LAYERS=ON -DKOMPUTE_OPT_DISABLE_VULKAN_VERSION_CHECK=ON -DKOMPUTE_OPT_USE_BUILT_IN_VULKAN_HEADER=ON
|
||||
configure-options: -DKOMPUTE_OPT_BUILD_TESTS=ON -DKOMPUTE_OPT_DISABLE_VK_DEBUG_LAYERS=ON -DKOMPUTE_OPT_USE_BUILT_IN_VULKAN_HEADER=ON
|
||||
- name: Run tests
|
||||
env:
|
||||
VK_ICD_FILENAMES: "/swiftshader/vk_swiftshader_icd.json"
|
||||
run: make mk_run_tests
|
||||
|
||||
cpp-tests-release-without-debug-layers:
|
||||
runs-on: ubuntu-latest
|
||||
container: axsauze/kompute-builder:0.4
|
||||
env:
|
||||
VK_ICD_FILENAMES: "/swiftshader/vk_swiftshader_icd.json"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
|
@ -99,8 +99,6 @@ jobs:
|
|||
build-type: Release
|
||||
run-test: false
|
||||
ctest-options: -V
|
||||
configure-options: -DKOMPUTE_OPT_BUILD_TESTS=ON -DKOMPUTE_OPT_DISABLE_VK_DEBUG_LAYERS=ON -DKOMPUTE_OPT_DISABLE_VULKAN_VERSION_CHECK=ON -DKOMPUTE_OPT_USE_BUILT_IN_VULKAN_HEADER=ON
|
||||
configure-options: -DKOMPUTE_OPT_BUILD_TESTS=ON -DKOMPUTE_OPT_DISABLE_VK_DEBUG_LAYERS=ON -DKOMPUTE_OPT_USE_BUILT_IN_VULKAN_HEADER=ON
|
||||
- name: Run tests
|
||||
env:
|
||||
VK_ICD_FILENAMES: "/swiftshader/vk_swiftshader_icd.json"
|
||||
run: make mk_run_tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue