Skip to content

Commit

Permalink
Set CXXFLAGS=-Wp,-D_GLIBCXX_ASSERTIONS on gcc-9 and higher builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
esabol committed Nov 21, 2022
1 parent c5bfad1 commit 4af38f8
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
CC: ${{ matrix.config.cc }}-${{ matrix.config.tag }}
CXX: ${{ matrix.config.cxx }}-${{ matrix.config.tag }}
GHA_CONTAINER: ${{ matrix.config.container }}
CCVERSION: ${{ matrix.config.tag }}

steps:
- name: if running in a container, update and install sudo, git, and other basics
Expand Down Expand Up @@ -89,11 +90,28 @@ jobs:
if [ -f "/etc/lsb-release" ]; then
cat /etc/lsb-release
fi
if [[ "${CC}" == gcc* ]] && [ "${CCVERSION}" -ge 9 ]; then
CXXFLAGS="-Wp,-D_GLIBCXX_ASSERTIONS"
export CXXFLAGS
echo "CXXFLAGS: $CXXFLAGS"
fi
./bootstrap.sh -a
- name: configure
run: ./configure --enable-ssl
run: |
if [[ "${CC}" == gcc* ]] && [ "${CCVERSION}" -ge 9 ]; then
CXXFLAGS="-Wp,-D_GLIBCXX_ASSERTIONS"
export CXXFLAGS
echo "CXXFLAGS: $CXXFLAGS"
fi
./configure --enable-ssl
- name: make
run: ${CC} --version && make
run: |
if [[ "${CC}" == gcc* ]] && [ "${CCVERSION}" -ge 9 ]; then
CXXFLAGS="-Wp,-D_GLIBCXX_ASSERTIONS"
export CXXFLAGS
echo "CXXFLAGS: $CXXFLAGS"
fi
${CC} --version && make
- name: make test
run: ${CC} --version && make test
- name: check test-suite.log
Expand Down

0 comments on commit 4af38f8

Please sign in to comment.