GHA: Fix CSTD and CPPSTD usage

This commit is contained in:
William S Fulton 2021-10-22 09:16:21 +01:00
commit cbbeb4298a

View file

@ -247,12 +247,18 @@ jobs:
set -x
source $GITHUB_WORKSPACE/Tools/CI-linux-environment.sh
if test -n "$CPP11"; then export CPPSTD=c++11 && export CSTD=c11; fi
if test -n "$CPP14"; then export CPPSTD=c++14 && export CSTD=c11; fi
if test -n "$CPP17"; then export CPPSTD=c++17 && export CSTD=c17; fi
echo CPPSTD="$CPPSTD" >> $GITHUB_ENV
echo CSTD="$CSTD" >> $GITHUB_ENV
if test -n '${{ matrix.CONFIGOPTS }}'; then
CONFIGOPTS=${{ matrix.CONFIGOPTS }}
fi
if test -n "$CPP11"; then CONFIGOPTS+=(--enable-cpp11-testing "CXXFLAGS=-std=c++11 $CXXFLAGS" "CFLAGS=-std=c11 $CFLAGS") && export CSTD=c11 && export CPPSTD=c++11; fi
if test -n "$CPP14"; then CONFIGOPTS+=(--enable-cpp11-testing "CXXFLAGS=-std=c++14 $CXXFLAGS" "CFLAGS=-std=c11 $CFLAGS") && export CSTD=c11 && export CPPSTD=c++14; fi
if test -n "$CPP17"; then CONFIGOPTS+=(--enable-cpp11-testing "CXXFLAGS=-std=c++17 $CXXFLAGS" "CFLAGS=-std=c17 $CFLAGS") && export CSTD=c17 && export CPPSTD=c++17; fi
if test -n "$CPP11"; then CONFIGOPTS+=(--enable-cpp11-testing "CXXFLAGS=-std=c++11 $CXXFLAGS" "CFLAGS=-std=c11 $CFLAGS"); fi
if test -n "$CPP14"; then CONFIGOPTS+=(--enable-cpp11-testing "CXXFLAGS=-std=c++14 $CXXFLAGS" "CFLAGS=-std=c11 $CFLAGS"); fi
if test -n "$CPP17"; then CONFIGOPTS+=(--enable-cpp11-testing "CXXFLAGS=-std=c++17 $CXXFLAGS" "CFLAGS=-std=c17 $CFLAGS"); fi
if test -n "$SWIGLANG"; then CONFIGOPTS+=(--without-alllang --with-$WITHLANG); fi
echo "${CONFIGOPTS[@]}"
./autogen.sh && mkdir -p build/build && cd build/build && ../../configure "${CONFIGOPTS[@]}"
@ -270,10 +276,6 @@ jobs:
set -x
source $GITHUB_WORKSPACE/Tools/CI-linux-environment.sh
if test -n "$CPP11"; then export CPPSTD=c++11; fi
if test -n "$CPP14"; then export CPPSTD=c++14; fi
if test -n "$CPP17"; then export CPPSTD=c++17; fi
if test -z "$SWIGLANG"; then make $SWIGJOBS check-ccache; fi
if test -z "$SWIGLANG"; then make $SWIGJOBS check-errors-test-suite; fi