From 9c9dca8ea5b522086a31efd320340493e4cac4f6 Mon Sep 17 00:00:00 2001 From: Marcos Slomp Date: Fri, 5 Jun 2026 08:17:29 -0700 Subject: [PATCH 1/5] relocating tracy test app, and consolidating github test action --- .github/actions/test-tracy/action.yml | 30 ++++++++++++++++++++++++++ .github/workflows/linux.yml | 22 +------------------ .github/workflows/mingw.yml | 28 +++++------------------- {test => tests/tracy}/CMakeLists.txt | 0 {test => tests/tracy}/image.jpg | Bin {test => tests/tracy}/stb_image.h | 0 {test => tests/tracy}/test.cpp | 0 7 files changed, 36 insertions(+), 44 deletions(-) create mode 100644 .github/actions/test-tracy/action.yml rename {test => tests/tracy}/CMakeLists.txt (100%) rename {test => tests/tracy}/image.jpg (100%) rename {test => tests/tracy}/stb_image.h (100%) rename {test => tests/tracy}/test.cpp (100%) diff --git a/.github/actions/test-tracy/action.yml b/.github/actions/test-tracy/action.yml new file mode 100644 index 00000000..0da72c10 --- /dev/null +++ b/.github/actions/test-tracy/action.yml @@ -0,0 +1,30 @@ +name: 'Test Tracy' +description: 'Build the Tracy test application with various cmake flag combinations' + +inputs: + extra_cmake_flags: + description: 'Additional cmake flags appended to each configure command (e.g. cross-compilation flags)' + required: false + default: '' + +runs: + using: 'composite' + steps: + - name: Test application + shell: bash + run: | + cmake -B tests/tracy/build -S tests/tracy -DCMAKE_BUILD_TYPE=Release ${{ inputs.extra_cmake_flags }} + cmake --build tests/tracy/build --parallel + cmake -E rm -rf tests/tracy/build + + cmake -B tests/tracy/build -S tests/tracy -DCMAKE_BUILD_TYPE=Release -DTRACY_ON_DEMAND=ON ${{ inputs.extra_cmake_flags }} + cmake --build tests/tracy/build --parallel + cmake -E rm -rf tests/tracy/build + + cmake -B tests/tracy/build -S tests/tracy -DCMAKE_BUILD_TYPE=Release -DTRACY_DELAYED_INIT=ON -DTRACY_MANUAL_LIFETIME=ON ${{ inputs.extra_cmake_flags }} + cmake --build tests/tracy/build --parallel + cmake -E rm -rf tests/tracy/build + + cmake -B tests/tracy/build -S tests/tracy -DCMAKE_BUILD_TYPE=Release -DTRACY_DEMANGLE=ON ${{ inputs.extra_cmake_flags }} + cmake --build tests/tracy/build --parallel + cmake -E rm -rf tests/tracy/build diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 565e906f..52ceec0a 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -66,27 +66,7 @@ jobs: meson setup -Dprefix=$GITHUB_WORKSPACE/bin/lib -Dtracy_enable=true build-meson meson compile -C build-meson - name: Test application - run: | - # test compilation with different flags - # we clean the build folder to reset cached variables between runs - cmake -B test/build -S test -DCMAKE_BUILD_TYPE=Release - cmake --build test/build --parallel - rm -rf test/build - - # same with TRACY_ON_DEMAND - cmake -B test/build -S test -DCMAKE_BUILD_TYPE=Release -DTRACY_ON_DEMAND=ON . - cmake --build test/build --parallel - rm -rf test/build - - # same with TRACY_DELAYED_INIT TRACY_MANUAL_LIFETIME - cmake -B test/build -S test -DCMAKE_BUILD_TYPE=Release -DTRACY_DELAYED_INIT=ON -DTRACY_MANUAL_LIFETIME=ON . - cmake --build test/build --parallel - rm -rf test/build - - # same with TRACY_DEMANGLE - cmake -B test/build -S test -DCMAKE_BUILD_TYPE=Release -DTRACY_DEMANGLE=ON . - cmake --build test/build --parallel - rm -rf test/build + uses: ./.github/actions/test-tracy - name: Find Artifacts id: find_artifacts run: | diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml index 793452f8..c4398a22 100644 --- a/.github/workflows/mingw.yml +++ b/.github/workflows/mingw.yml @@ -53,27 +53,9 @@ jobs: meson setup build-meson --cross-file mingw-cross.txt -Ddefault_library=static -Dtracy_enable=true meson compile -C build-meson - name: Test application - run: | - cmake -B test/build -S test -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_SYSTEM_NAME=Windows \ - -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \ + uses: ./.github/actions/test-tracy + with: + extra_cmake_flags: >- + -DCMAKE_SYSTEM_NAME=Windows + -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ - cmake --build test/build --parallel - rm -rf test/build - cmake -B test/build -S test -DCMAKE_BUILD_TYPE=Release -DTRACY_ON_DEMAND=ON \ - -DCMAKE_SYSTEM_NAME=Windows \ - -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \ - -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ - cmake --build test/build --parallel - rm -rf test/build - cmake -B test/build -S test -DCMAKE_BUILD_TYPE=Release -DTRACY_DELAYED_INIT=ON -DTRACY_MANUAL_LIFETIME=ON \ - -DCMAKE_SYSTEM_NAME=Windows \ - -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \ - -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ - cmake --build test/build --parallel - rm -rf test/build - cmake -B test/build -S test -DCMAKE_BUILD_TYPE=Release -DTRACY_DEMANGLE=ON \ - -DCMAKE_SYSTEM_NAME=Windows \ - -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \ - -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ - cmake --build test/build --parallel diff --git a/test/CMakeLists.txt b/tests/tracy/CMakeLists.txt similarity index 100% rename from test/CMakeLists.txt rename to tests/tracy/CMakeLists.txt diff --git a/test/image.jpg b/tests/tracy/image.jpg similarity index 100% rename from test/image.jpg rename to tests/tracy/image.jpg diff --git a/test/stb_image.h b/tests/tracy/stb_image.h similarity index 100% rename from test/stb_image.h rename to tests/tracy/stb_image.h diff --git a/test/test.cpp b/tests/tracy/test.cpp similarity index 100% rename from test/test.cpp rename to tests/tracy/test.cpp From a56b08e539750baea5a47b7252b9ab5721e8afaf Mon Sep 17 00:00:00 2001 From: Marcos Slomp Date: Fri, 5 Jun 2026 08:19:07 -0700 Subject: [PATCH 2/5] adding test application to windows and macos github workflows --- .github/workflows/macos.yml | 2 ++ .github/workflows/windows.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index ca92092c..d754ae63 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -51,6 +51,8 @@ jobs: cmake --build merge/build --parallel --config Release - name: Build library run: meson setup -Dprefix=$GITHUB_WORKSPACE/bin/lib -Dtracy_enable=true build && meson compile -C build && meson install -C build + - name: Test application + uses: ./.github/actions/test-tracy - name: Package artifacts run: | mkdir -p bin diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index daa80235..c44cc3ca 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -53,6 +53,8 @@ jobs: run: | cmake -B merge/build -S merge -DCMAKE_BUILD_TYPE=Release -DGIT_REV=${{ github.sha }} cmake --build merge/build --parallel --config Release + - name: Test application + uses: ./.github/actions/test-tracy - name: Package artifacts run: | mkdir bin From 2ebf18be7fd5dba44a97d82a2d8fa87117b1f2eb Mon Sep 17 00:00:00 2001 From: Marcos Slomp Date: Fri, 5 Jun 2026 08:22:54 -0700 Subject: [PATCH 3/5] adjusting relative path --- tests/tracy/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tracy/CMakeLists.txt b/tests/tracy/CMakeLists.txt index 9030e031..ec199f87 100644 --- a/tests/tracy/CMakeLists.txt +++ b/tests/tracy/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.16) -include(${CMAKE_CURRENT_LIST_DIR}/../cmake/version.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/../../cmake/version.cmake) # we target C++11 for the client part set(CMAKE_CXX_STANDARD 11) @@ -18,7 +18,7 @@ option(TRACY_ENABLE "Enable profiling" ON) # a bit weird but works: include the client cmake config coming from top-level # cmake needs us to specify the build subfolder -> client/ this way we can # simply link the test executable against TracyClient -add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/.. client/) +add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../.. client/) add_executable(tracy-test test.cpp) if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") From af2a369dffeb7083f75c56dbeef15f4d490c0962 Mon Sep 17 00:00:00 2001 From: Marcos Slomp Date: Fri, 5 Jun 2026 09:08:07 -0700 Subject: [PATCH 4/5] re-documenting each action step --- .github/actions/test-tracy/action.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/actions/test-tracy/action.yml b/.github/actions/test-tracy/action.yml index 0da72c10..7f73f142 100644 --- a/.github/actions/test-tracy/action.yml +++ b/.github/actions/test-tracy/action.yml @@ -13,18 +13,23 @@ runs: - name: Test application shell: bash run: | + # test compilation with different flags + # we clean the build folder to reset cached variables between runs cmake -B tests/tracy/build -S tests/tracy -DCMAKE_BUILD_TYPE=Release ${{ inputs.extra_cmake_flags }} cmake --build tests/tracy/build --parallel cmake -E rm -rf tests/tracy/build + # same with TRACY_ON_DEMAND cmake -B tests/tracy/build -S tests/tracy -DCMAKE_BUILD_TYPE=Release -DTRACY_ON_DEMAND=ON ${{ inputs.extra_cmake_flags }} cmake --build tests/tracy/build --parallel cmake -E rm -rf tests/tracy/build + # same with TRACY_DELAYED_INIT and TRACY_MANUAL_LIFETIME cmake -B tests/tracy/build -S tests/tracy -DCMAKE_BUILD_TYPE=Release -DTRACY_DELAYED_INIT=ON -DTRACY_MANUAL_LIFETIME=ON ${{ inputs.extra_cmake_flags }} cmake --build tests/tracy/build --parallel cmake -E rm -rf tests/tracy/build + # same with TRACY_DEMANGLE cmake -B tests/tracy/build -S tests/tracy -DCMAKE_BUILD_TYPE=Release -DTRACY_DEMANGLE=ON ${{ inputs.extra_cmake_flags }} cmake --build tests/tracy/build --parallel cmake -E rm -rf tests/tracy/build From f9f772e507341bb8cfbbbce4f64ea06c65e6400f Mon Sep 17 00:00:00 2001 From: Marcos Slomp Date: Fri, 5 Jun 2026 09:14:22 -0700 Subject: [PATCH 5/5] quick (attempted) fix for the Linux workflow linkage error --- tests/tracy/test.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/tracy/test.cpp b/tests/tracy/test.cpp index 6668670f..bc9e4619 100644 --- a/tests/tracy/test.cpp +++ b/tests/tracy/test.cpp @@ -22,6 +22,10 @@ extern "C" #define STBI_ONLY_JPEG #include "stb_image.h" +#ifdef TRACY_DEMANGLE +extern "C" const char* ___tracy_demangle( const char* ) { return nullptr; } +#endif + struct static_init_test_t { static_init_test_t()