Skip to content

Commit

Permalink
[ADD] : add the leak detector in a particular github/actions workflow…
Browse files Browse the repository at this point in the history
… file
  • Loading branch information
aiekick committed Feb 1, 2024
1 parent 9773d6d commit 7afe488
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 5 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/Leak.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Leak

on:
push:
branches:
- DemoApp
paths-ignore:
- 'cmake/**'
- '.github/**'
- 'doc/**'
- 'samples/**'

jobs:
App_Linux_Dirent_FS:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: DemoApp
- name: checkout submodules
run : git submodule update --init --recursive
- name: Install OpenGL lib / Requirement for Glfw3
run : sudo apt-get update && sudo apt-get install libgl1-mesa-dev libx11-dev libxi-dev libxrandr-dev libxinerama-dev libxcursor-dev
- name: configure
run: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_TEST=ON -DUSE_LEAK_SANITIZER=ON
- name: build
run: cmake --build build --config Release
- name: ctest
run: ctest --test-dir build --output-on-failure
- name: upload artifact
uses: actions/upload-artifact@v3
with:
name: ImGuiFileDialog_App_Unix_Dirent_FS
path: build/ImGuiFileDialog_App_Unix

App_Linux_Std_FS:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: DemoApp
- name: checkout submodules
run : git submodule update --init --recursive
- name: Install OpenGL lib / Requirement for Glfw3
run : sudo apt-get update && sudo apt-get install libgl1-mesa-dev libx11-dev libxi-dev libxrandr-dev libxinerama-dev libxcursor-dev
- name: configure
run: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_TEST=ON -DUSE_STD_FILESYSTEM=ON -DUSE_LEAK_SANITIZER=ON
- name: build
run: cmake --build build --config Release
- name: ctest
run: ctest --test-dir build --output-on-failure
- name: upload artifact
uses: actions/upload-artifact@v3
with:
name: ImGuiFileDialog_App_Unix_Std_FS
path: build/ImGuiFileDialog_App_Unix

App_Linux_Boost_FS:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: DemoApp
- name: checkout submodules
run : git submodule update --init --recursive
- name: Install OpenGL lib / Requirement for Glfw3
run : sudo apt-get update && sudo apt-get install libgl1-mesa-dev libx11-dev libxi-dev libxrandr-dev libxinerama-dev libxcursor-dev
- name: configure
run: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_TEST=ON -DUSE_BOOST_DEMO_FILESYSTEM=ON -DUSE_LEAK_SANITIZER=ON
- name: build
run: cmake --build build --config Release
- name: ctest
run: ctest --test-dir build --output-on-failure
- name: upload artifact
uses: actions/upload-artifact@v3
with:
name: ImGuiFileDialog_App_Unix_Boost_FS
path: build/ImGuiFileDialog_App_Unix

6 changes: 3 additions & 3 deletions .github/workflows/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install OpenGL lib / Requirement for Glfw3
run : sudo apt-get update && sudo apt-get install libgl1-mesa-dev libx11-dev libxi-dev libxrandr-dev libxinerama-dev libxcursor-dev
- name: configure
run: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_TEST=ON -DUSE_LEAK_SANITIZER=ON
run: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_TEST=ON
- name: build
run: cmake --build build --config Release
- name: ctest
Expand All @@ -44,7 +44,7 @@ jobs:
- name: Install OpenGL lib / Requirement for Glfw3
run : sudo apt-get update && sudo apt-get install libgl1-mesa-dev libx11-dev libxi-dev libxrandr-dev libxinerama-dev libxcursor-dev
- name: configure
run: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_TEST=ON -DUSE_STD_FILESYSTEM=ON -DUSE_LEAK_SANITIZER=ON
run: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_TEST=ON -DUSE_STD_FILESYSTEM=ON
- name: build
run: cmake --build build --config Release
- name: ctest
Expand All @@ -66,7 +66,7 @@ jobs:
- name: Install OpenGL lib / Requirement for Glfw3
run : sudo apt-get update && sudo apt-get install libgl1-mesa-dev libx11-dev libxi-dev libxrandr-dev libxinerama-dev libxcursor-dev
- name: configure
run: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_TEST=ON -DUSE_BOOST_DEMO_FILESYSTEM=ON -DUSE_LEAK_SANITIZER=ON
run: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DUSE_TEST=ON -DUSE_BOOST_DEMO_FILESYSTEM=ON
- name: build
run: cmake --build build --config Release
- name: ctest
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ if (USE_TEST)
endif()

if (USE_LEAK_SANITIZER)
add_compile_options(-fexceptions -pthread -ldl -lGL -Wall -Werror -g -fsanitize=undefined -fno-sanitize-recover -fsanitize=float-cast-overflow -fsanitize=leak -fsanitize=address -fsanitize-address-use-after-scope -fstack-protector -fstack-protector-all -fstack-check)
add_link_options(-fexceptions -pthread -ldl -lGL -Wall -Werror -g -fsanitize=undefined -fno-sanitize-recover -fsanitize=float-cast-overflow -fsanitize=leak -fsanitize=address -fsanitize-address-use-after-scope -fstack-protector -fstack-protector-all -fstack-check)
add_compile_options(-fexceptions -pthread -ldl -lGL -Wall -g -fsanitize=undefined -fno-sanitize-recover -fsanitize=float-cast-overflow -fsanitize=leak -fsanitize=address -fsanitize-address-use-after-scope -fstack-protector -fstack-protector-all)
add_link_options(-fexceptions -pthread -ldl -lGL -Wall -g -fsanitize=undefined -fno-sanitize-recover -fsanitize=float-cast-overflow -fsanitize=leak -fsanitize=address -fsanitize-address-use-after-scope -fstack-protector -fstack-protector-all)
endif()

add_subdirectory(${CMAKE_SOURCE_DIR}/ImGuiFileDialog)
Expand Down

0 comments on commit 7afe488

Please sign in to comment.