summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2021-10-22 09:16:21 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2021-10-22 15:44:27 +0100
commitcbbeb4298a30023ff9be33dd93e2a88f6ac46be8 (patch)
tree0c5de207cc65815dfeac54db5fc455806b92acca
parentcf8268d19e2a2d9bb30b37fdda7d11e93728be01 (diff)
downloadswig-cbbeb4298a30023ff9be33dd93e2a88f6ac46be8.tar.gz
GHA: Fix CSTD and CPPSTD usage
-rw-r--r--.github/workflows/ci.yml16
1 files changed, 9 insertions, 7 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3da720d7e..e28e344b5 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -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