Skip to content

Commit

Permalink
Use environment variable for debug flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Davknapp committed Dec 13, 2024
1 parent 105daa3 commit c2ffb0e
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build_cmake_tarball.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ name: CMake Tarball

env:
MAKEFLAGS: "-j2 V=0"
DEBUG_CONFIG: "-O1 -g"


on:
Expand Down Expand Up @@ -80,7 +81,7 @@ jobs:
run: export LESS_TEST_OPTION="-DT8CODE_ENABLE_LESS_TESTS=ON"
&& echo LESS_TEST_OPTION="$LESS_TEST_OPTION" >> $GITHUB_ENV
- name: build config variables
run: export CONFIG_OPTIONS="${LESS_TEST_OPTION} -GNinja -DCMAKE_C_FLAGS_DEBUG="-O1 -g" -DCMAKE_CXX_FLAGS_DEBUG="-O1 -g" -DT8CODE_USE_SYSTEM_SC=OFF -DT8CODE_USE_SYSTEM_P4EST=OFF -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE"
run: export CONFIG_OPTIONS="${LESS_TEST_OPTION} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_USE_SYSTEM_SC=OFF -DT8CODE_USE_SYSTEM_P4EST=OFF -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE"
&& echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV
- name: cmake
run: mkdir build && cd build && cmake ../ $CONFIG_OPTIONS
Expand Down Expand Up @@ -135,7 +136,7 @@ jobs:
run: export LESS_TEST_OPTION="-DT8CODE_ENABLE_LESS_TESTS=ON"
&& echo LESS_TEST_OPTION="$LESS_TEST_OPTION" >> $GITHUB_ENV
- name: build config variables
run: export CONFIG_OPTIONS="${LESS_TEST_OPTION} -GNinja -DCMAKE_C_FLAGS_DEBUG="-O1 -g" -DCMAKE_CXX_FLAGS_DEBUG="-O1 -g" -DT8CODE_USE_SYSTEM_SC=OFF -DT8CODE_USE_SYSTEM_P4EST=OFF -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE"
run: export CONFIG_OPTIONS="${LESS_TEST_OPTION} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_USE_SYSTEM_SC=OFF -DT8CODE_USE_SYSTEM_P4EST=OFF -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE"
&& echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV
- name: Check vars
run: echo "[$CONFIG_DEBUG]"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests_cmake_preparation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ on:

env:
USED_CACHE: ${{ !inputs.IGNORE_CACHE }}
DEBUG_CONFIG: "-O1 -g"

jobs:
cmake_preparation:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_cmake_t8code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
run: export LESS_TEST_OPTION="-DT8CODE_ENABLE_LESS_TESTS=ON"
&& echo LESS_TEST_OPTION="$LESS_TEST_OPTION" >> $GITHUB_ENV
- name: build config variables
run: export CONFIG_OPTIONS="${LESS_TEST_OPTION} -GNinja -DCMAKE_C_FLAGS_DEBUG="-O1 -g" -DCMAKE_CXX_FLAGS_DEBUG="-O1 -g" -DT8CODE_USE_SYSTEM_SC=ON -DT8CODE_USE_SYSTEM_P4EST=ON -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSC_DIR=$SC_PATH/install/cmake -DP4EST_DIR=$P4EST_PATH/install/cmake"
run: export CONFIG_OPTIONS="${LESS_TEST_OPTION} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_USE_SYSTEM_SC=ON -DT8CODE_USE_SYSTEM_P4EST=ON -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSC_DIR=$SC_PATH/install/cmake -DP4EST_DIR=$P4EST_PATH/install/cmake"
&& echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV
# cmake and test
- name: Printing MPI compiler info
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tests_cmake_t8code_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ name: CMake tests t8code api
# along with t8code; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.


on:
workflow_call:
inputs:
Expand Down Expand Up @@ -82,7 +83,7 @@ jobs:
run: export LESS_TEST_OPTION="-DT8CODE_ENABLE_LESS_TESTS=ON"
&& echo LESS_TEST_OPTION="$LESS_TEST_OPTION" >> $GITHUB_ENV
- name: build config variables
run: export CONFIG_OPTIONS="${LESS_TEST_OPTION} -GNinja -DCMAKE_C_FLAGS_DEBUG="-O1 -g" -DCMAKE_CXX_FLAGS_DEBUG="-O1 -g" -DT8CODE_USE_SYSTEM_SC=ON -DT8CODE_USE_SYSTEM_P4EST=ON -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSC_DIR=$SC_PATH/install/cmake -DP4EST_DIR=$P4EST_PATH/install/cmake"
run: export CONFIG_OPTIONS="${LESS_TEST_OPTION} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_USE_SYSTEM_SC=ON -DT8CODE_USE_SYSTEM_P4EST=ON -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSC_DIR=$SC_PATH/install/cmake -DP4EST_DIR=$P4EST_PATH/install/cmake"
&& echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV
# cmake and test with fortran
- name: check fortran
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_cmake_t8code_linkage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
run: export LESS_TEST_OPTION="-DT8CODE_ENABLE_LESS_TESTS=ON"
&& echo LESS_TEST_OPTION="$LESS_TEST_OPTION" >> $GITHUB_ENV
- name: build config variables
run: export CONFIG_OPTIONS="${LESS_TEST_OPTION} -GNinja -DCMAKE_C_FLAGS_DEBUG="-O1 -g" -DCMAKE_CXX_FLAGS_DEBUG="-O1 -g" -DT8CODE_USE_SYSTEM_SC=ON -DT8CODE_USE_SYSTEM_P4EST=ON -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSC_DIR=$SC_PATH/install/cmake -DP4EST_DIR=$P4EST_PATH/install/cmake"
run: export CONFIG_OPTIONS="${LESS_TEST_OPTION} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_USE_SYSTEM_SC=ON -DT8CODE_USE_SYSTEM_P4EST=ON -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSC_DIR=$SC_PATH/install/cmake -DP4EST_DIR=$P4EST_PATH/install/cmake"
&& echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV
# cmake and test with netcdf
- name: check NetCDF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
run: export LESS_TEST_OPTION="-DT8CODE_ENABLE_LESS_TESTS=ON"
&& echo LESS_TEST_OPTION="$LESS_TEST_OPTION" >> $GITHUB_ENV
- name: build config variables
run: export CONFIG_OPTIONS="${LESS_TEST_OPTION} -GNinja -DCMAKE_C_FLAGS_DEBUG="-O1 -g" -DCMAKE_CXX_FLAGS_DEBUG="-O1 -g" -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE"
run: export CONFIG_OPTIONS="${LESS_TEST_OPTION} -GNinja -DCMAKE_C_FLAGS_DEBUG=${DEBUG_CONFIG} -DCMAKE_CXX_FLAGS_DEBUG=${DEBUG_CONFIG} -DT8CODE_BUILD_PEDANTIC=ON -DT8CODE_BUILD_WALL=ON -DT8CODE_BUILD_WERROR=ON -DT8CODE_ENABLE_MPI=$MPI -DCMAKE_BUILD_TYPE=$BUILD_TYPE"
&& echo CONFIG_OPTIONS="$CONFIG_OPTIONS" >> $GITHUB_ENV
# cmake and test
- name: Printing MPI compiler info
Expand Down

0 comments on commit c2ffb0e

Please sign in to comment.