diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index f2bb3a6..a65355b 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -33,7 +33,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update - sudo apt-get install ninja-build libvulkan-dev clang-15 mesa-vulkan-drivers libxrandr-dev + sudo apt-get install ninja-build libvulkan-dev clang-15 mesa-vulkan-drivers - name: Build SPIRV-Tools run: | git clone --depth 1 --branch vksp https://github.com/rjodinchr/SPIRV-Tools.git third_party/spirv-tools @@ -49,6 +49,19 @@ jobs: $(pwd)/third_party/perfetto/tools/install-build-deps $(pwd)/third_party/perfetto/tools/setup_all_configs.py $(pwd)/third_party/perfetto/tools/ninja -C $(pwd)/third_party/perfetto/out/linux_clang_release libtrace_processor.a perfetto traced + - name: Install Vulkan-Loader dependencies + run: | + sudo apt-get install build-essential libx11-xcb-dev libxkbcommon-dev libwayland-dev libxrandr-dev + - name: Build Vulkan-Loader + run : | + git clone --depth 1 --branch v1.3.240 https://github.com/KhronosGroup/Vulkan-Loader.git third_party/vulkan-loader + cmake -B third_party/vulkan-loader/build -S third_party/vulkan-loader -G Ninja \ + -DVulkanHeaders_DIR=$(pwd)/install/share/cmake/VulkanHeaders \ + -DCMAKE_CXX_COMPILER="$(which clang++)" \ + -DCMAKE_C_COMPILER="$(which clang)" \ + -DUPDATE_DEPS=ON \ + -DCMAKE_BUILD_TYPE=Release + cmake --build third_party/vulkan-loader/build - name: Build debug run: | cmake -B build_debug -S . -G Ninja \ @@ -66,38 +79,6 @@ jobs: - name: Build release run: | cmake -B build_release -S . -G Ninja \ - -DPERFETTO_SDK_PATH="$(pwd)/third_party/perfetto/sdk" \ - -DPERFETTO_INTERNAL_INCLUDE_PATH="$(pwd)/third_party/perfetto/include" \ - -DPERFETTO_GEN_INCLUDE_PATH="$(pwd)/third_party/perfetto/out/linux_clang_release/gen/build_config" \ - -DPERFETTO_TRACE_PROCESSOR_LIB="$(pwd)/third_party/perfetto/out/linux_clang_release/libtrace_processor.a" \ - -DPERFETTO_CXX_CONFIG_INCLUDE_PATH="$(pwd)/third_party/perfetto/buildtools/libcxx_config" \ - -DPERFETTO_CXX_SYSTEM_INCLUDE_PATH="$(pwd)/third_party/perfetto/buildtools/libcxx/include" \ - -DEXTRACTOR_NOSTDINCXX=1 \ - -DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH};$(pwd)/install/lib/cmake/SPIRV-Tools-opt;$(pwd)/install/lib/cmake/SPIRV-Tools" \ - -DCMAKE_CXX_COMPILER="$(which clang++)" \ - -DCMAKE_BUILD_TYPE=Release - cmake --build build_release - - name: Build Vulkan-Headers - run: | - git clone --depth 1 --branch v1.3.240 https://github.com/KhronosGroup/Vulkan-Headers.git third_party/vulkan-headers - cmake -B third_party/vulkan-headers/build -S third_party/vulkan-headers -G Ninja \ - -DCMAKE_CXX_COMPILER="$(which clang++)" \ - -DCMAKE_C_COMPILER="$(which clang)" \ - -DCMAKE_BUILD_TYPE=Release - cmake --build third_party/vulkan-headers/build - cmake --install third_party/vulkan-headers/build --prefix $(pwd)/install/ - - name: Build Vulkan-Loader - run : | - git clone --depth 1 --branch v1.3.240 https://github.com/KhronosGroup/Vulkan-Loader.git third_party/vulkan-loader - cmake -B third_party/vulkan-loader/build -S third_party/vulkan-loader -G Ninja \ - -DVulkanHeaders_DIR=$(pwd)/install/share/cmake/VulkanHeaders \ - -DCMAKE_CXX_COMPILER="$(which clang++)" \ - -DCMAKE_C_COMPILER="$(which clang)" \ - -DCMAKE_BUILD_TYPE=Release - cmake --build third_party/vulkan-loader/build - - name: Build system - run: | - cmake -B build_system -S . -G Ninja \ -DPERFETTO_SDK_PATH="$(pwd)/third_party/perfetto/sdk" \ -DPERFETTO_INTERNAL_INCLUDE_PATH="$(pwd)/third_party/perfetto/include" \ -DPERFETTO_GEN_INCLUDE_PATH="$(pwd)/third_party/perfetto/out/linux_clang_release/gen/build_config" \ @@ -109,23 +90,23 @@ jobs: -DCMAKE_CXX_COMPILER="$(which clang++)" \ -DBACKEND=System \ -DCMAKE_BUILD_TYPE=Release - cmake --build build_system + cmake --build build_release - name: Tests run: | - $(pwd)/build_system/runner/vulkan-shader-profiler-runner -i $(pwd)/tests/example.spvasm -v - $(pwd)/build_system/runner/vulkan-shader-profiler-runner -i $(pwd)/tests/example-counter.spvasm | grep "my_section" + $(pwd)/build_release/runner/vulkan-shader-profiler-runner -i $(pwd)/tests/example.spvasm -v + $(pwd)/build_release/runner/vulkan-shader-profiler-runner -i $(pwd)/tests/example-counter.spvasm | grep "my_section" $(pwd)/third_party/perfetto/out/linux_clang_release/traced & $(pwd)/third_party/perfetto/out/linux_clang_release/perfetto -c $(pwd)/tests/perfetto_config --txt -o $(pwd)/trace & sleep 1 VK_LOADER_DEBUG=all \ - LD_LIBRARY_PATH=$(pwd)/build_system/layer/:$(pwd)/third_party/vulkan-loader/build/loader/:$LD_LIBRARY_PATH \ + LD_LIBRARY_PATH=$(pwd)/build_release/layer/:$(pwd)/third_party/vulkan-loader/build/loader/:$LD_LIBRARY_PATH \ VK_LOADER_LAYERS_ENABLE="VK_LAYER_SHADER_PROFILER" \ VK_ADD_LAYER_PATH=$(pwd)/manifest/ \ VKSP_TRACE_DEST=$(pwd)/trace \ - $(pwd)/build_system/runner/vulkan-shader-profiler-runner -i $(pwd)/tests/example.spvasm + $(pwd)/build_release/runner/vulkan-shader-profiler-runner -i $(pwd)/tests/example.spvasm sleep 1 pkill -x perfetto while [[ -n $(pgrep -x perfetto) ]]; do sleep 0.2; done - $(pwd)/build_system/extractor/vulkan-shader-profiler-extractor -i $(pwd)/trace -o $(pwd)/trace.spvasm -d 0 -v + $(pwd)/build_release/extractor/vulkan-shader-profiler-extractor -i $(pwd)/trace -o $(pwd)/trace.spvasm -d 0 -v cat $(pwd)/tests/example-expectation.spvasm diff $(pwd)/trace.spvasm $(pwd)/tests/example-expectation.spvasm