Skip to content

Commit 74f05f1

Browse files
committed
Fix debug build and enable CI check for it
1 parent 6bec4c2 commit 74f05f1

3 files changed

Lines changed: 63 additions & 1 deletion

File tree

.github/workflows/main.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,61 @@ jobs:
8989
with:
9090
name: ubuntu-gcc-install-${{ matrix.os }}
9191
path: ubuntu-gcc-install-${{ matrix.os }}.tar.gz
92+
ubuntu-gcc-build-debug:
93+
needs:
94+
- clang-format
95+
- python-lint
96+
runs-on: ${{ matrix.os }}
97+
strategy:
98+
matrix:
99+
os: ["ubuntu-24.04"]
100+
steps:
101+
- uses: actions/checkout@v4
102+
with:
103+
submodules: recursive
104+
- name: Setup environment
105+
run: |
106+
sudo apt-get update
107+
sudo apt-get install --no-install-recommends -y gcc-14 g++-14 ninja-build libmpich-dev libomp-dev valgrind
108+
python3 -m pip install -r requirements.txt
109+
- name: ccache
110+
uses: hendrikmuhs/ccache-action@v1.2
111+
with:
112+
key: ${{ runner.os }}-gcc
113+
create-symlink: true
114+
max-size: 1G
115+
- name: CMake configure
116+
run: >
117+
cmake -S . -B build
118+
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
119+
-G Ninja
120+
-D CMAKE_BUILD_TYPE=DEBUG -DCMAKE_INSTALL_PREFIX=install
121+
env:
122+
CC: gcc-14
123+
CXX: g++-14
124+
- name: Archive revert list
125+
uses: actions/upload-artifact@v4
126+
if: ${{ matrix.os == 'ubuntu-24.04' }}
127+
with:
128+
name: revert-list
129+
path: build/revert-list.txt
130+
- name: Build project
131+
run: |
132+
cmake --build build --parallel
133+
env:
134+
CC: gcc-14
135+
CXX: g++-14
136+
- name: Install project
137+
run: |
138+
cmake --build build --target install
139+
- name: Archive installed package
140+
run: |
141+
tar -czvf ubuntu-gcc-debug-install-${{ matrix.os }}.tar.gz -C install .
142+
- name: Upload installed package
143+
uses: actions/upload-artifact@v4
144+
with:
145+
name: ubuntu-gcc-debug-install-${{ matrix.os }}
146+
path: ubuntu-gcc-debug-install-${{ matrix.os }}.tar.gz
92147
ubuntu-gcc-test:
93148
needs:
94149
- ubuntu-gcc-build

cmake/onetbb.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,10 @@ ExternalProject_Add(ppc_onetbb
2525
)
2626
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/ppc_onetbb/install/"
2727
DESTINATION "${CMAKE_INSTALL_PREFIX}")
28+
29+
string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_lower)
30+
if(cmake_build_type_lower STREQUAL "debug")
31+
set(PPC_TBB_LIB_NAME tbb_debug)
32+
else()
33+
set(PPC_TBB_LIB_NAME tbb)
34+
endif()

tasks/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ foreach(TASK_TYPE ${LIST_OF_TASKS})
7878
add_dependencies(${EXEC_FUNC} ppc_onetbb)
7979
target_link_directories(${EXEC_FUNC} PUBLIC ${CMAKE_BINARY_DIR}/ppc_onetbb/install/lib)
8080
if(NOT MSVC)
81-
target_link_libraries(${EXEC_FUNC} PUBLIC tbb)
81+
target_link_libraries(${EXEC_FUNC} PUBLIC ${PPC_TBB_LIB_NAME})
8282
endif()
8383

8484
target_link_directories(stb_image INTERFACE ${CMAKE_SOURCE_DIR}/3rdparty/stb)

0 commit comments

Comments
 (0)