Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 48 additions & 5 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2025 Lukasz Stalmirski
# Copyright (c) 2019-2026 Lukasz Stalmirski
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -44,8 +44,8 @@ jobs:
# Build configs.
strategy:
matrix:
build_type: ${{fromJson(format('[{0}]', inputs.build_types || '"Release","Debug"'))}}
os: ${{fromJson(format('[{0}]', inputs.operating_systems || '"windows-latest","ubuntu-24.04","ubuntu-22.04"'))}}
build_type: ${{fromJson(format('[{0}]', inputs.build_types || '"Release"'))}}
os: ${{fromJson(format('[{0}]', inputs.operating_systems || '"ubuntu-24.04"'))}}

name: Build ${{matrix.os}} ${{matrix.build_type}}
runs-on: ${{matrix.os}}
Expand All @@ -60,7 +60,7 @@ jobs:
uses: awalsh128/cache-apt-pkgs-action@latest
if: runner.os == 'Linux'
with:
packages: extra-cmake-modules libvulkan-dev libxkbcommon-dev libx11-dev libxext-dev libxcb1-dev libxcb-shape0-dev libdrm-dev
packages: extra-cmake-modules libvulkan-dev libxkbcommon-dev libx11-dev libxext-dev libxcb1-dev libxcb-shape0-dev libdrm-dev glslang-tools
version: 1.0

- uses: actions/setup-python@v5
Expand All @@ -77,16 +77,59 @@ jobs:
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} -j 4

- name: Install
if: matrix.build_type == 'Release'
# Install build artifacts to a common directory
run: cmake --install ${{github.workspace}}/build --prefix ${{github.workspace}}/install

- name: Install tests
if: ${{ matrix.build_type == 'Release' && matrix.os == 'ubuntu-24.04' }}
run: cmake --install ${{github.workspace}}/build --prefix ${{github.workspace}}/install_test --component Test

- name: Publish artifacts
if: matrix.build_type == 'Release'
uses: actions/upload-artifact@v4
with:
name: ${{matrix.os}}-${{matrix.build_type}}-${{runner.arch}}
path: ${{github.workspace}}/install
retention-days: 7

- name: Publish tests artifacts
if: ${{ matrix.build_type == 'Release' && matrix.os == 'ubuntu-24.04' }}
uses: actions/upload-artifact@v4
with:
name: ${{matrix.os}}-Tests-${{runner.arch}}
path: ${{github.workspace}}/install_test
retention-days: 1

test:
if: github.event.pull_request.draft == false

name: Test
needs: build
runs-on: ubuntu-24.04

steps:
- name: Download Test package
uses: actions/download-artifact@v8
with:
name: ubuntu-24.04-Tests-${{runner.arch}}
path: ${{github.workspace}}

- run: ls ${{github.workspace}}

- name: Download layer package
uses: actions/download-artifact@v8
with:
name: ubuntu-24.04-Release-${{runner.arch}}
path: ${{github.workspace}}/install

- run: ls ${{github.workspace}}/install

- name: Test
env:
VK_LAYER_PATH: ${{github.workspace}}/install/lib/x86_64-linux-gnu/
run: |
chmod +x ${{github.workspace}}/bin/profiler_tests
${{github.workspace}}/bin/profiler_tests
3 changes: 2 additions & 1 deletion VkLayer_profiler_layer/profiler_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,6 @@ if (BUILD_TESTS)
PRIVATE "${CMAKE_CURRENT_BINARY_DIR}"
)

install (TARGETS profiler_tests)
install (TARGETS profiler_tests EXCLUDE_FROM_ALL
COMPONENT Test)
endif (BUILD_TESTS)
Loading