GHA: C++11 testing and compiler name
Show compiler name (directly from inputs rather than from 'desc'. Fix testing of C++11, C++14. Allow for CSTD override to override with -std=gnu11 for languages whose headers are not -std=c11 compatible. Show c/c++ std being tested from github yaml file in the name.
This commit is contained in:
parent
b69b5888a8
commit
e74b9830bb
1 changed files with 18 additions and 28 deletions
46
.github/workflows/ci.yml
vendored
46
.github/workflows/ci.yml
vendored
|
|
@ -21,31 +21,24 @@ jobs:
|
|||
|
||||
# By default, the name of the build is the language used and SWIG options, but matrix entries
|
||||
# can define the additional "desc" field with any additional information to include in the name.
|
||||
name: ${{ matrix.SWIGLANG || 'none' }}${{ matrix.PY3 }} ${{ matrix.ENGINE}} ${{ matrix.VER }} ${{ matrix.SWIG_FEATURES }} ${{ matrix.desc }}
|
||||
name: ${{ matrix.SWIGLANG || 'none' }}${{ matrix.PY3 }} ${{ matrix.ENGINE}} ${{ matrix.VER }} ${{ matrix.SWIG_FEATURES }} ${{ (matrix.compiler || 'gcc') }}${{ matrix.GCC }} ${{ matrix.CPPSTD }} ${{ matrix.CSTD }} ${{ matrix.desc }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- SWIGLANG: ""
|
||||
desc: gcc
|
||||
- SWIGLANG: ""
|
||||
GCC: 7
|
||||
desc: gcc7
|
||||
- SWIGLANG: ""
|
||||
GCC: 8
|
||||
desc: gcc8
|
||||
- SWIGLANG: ""
|
||||
GCC: 9
|
||||
desc: gcc9
|
||||
- SWIGLANG: ""
|
||||
GCC: 10
|
||||
desc: gcc10
|
||||
- SWIGLANG: ""
|
||||
GCC: 11
|
||||
desc: gcc11
|
||||
- SWIGLANG: ""
|
||||
compiler: clang
|
||||
desc: clang
|
||||
- SWIGLANG: csharp
|
||||
# D support can't be enabled because dmd 2.066 fails to build anything
|
||||
# under Ubuntu 18.04 due to its standard library (libphobos2.a) not
|
||||
|
|
@ -72,15 +65,15 @@ jobs:
|
|||
- SWIGLANG: javascript
|
||||
ENGINE: node
|
||||
VER: '12'
|
||||
CPP11: 1
|
||||
CPPSTD: c++11
|
||||
- SWIGLANG: javascript
|
||||
ENGINE: node
|
||||
VER: '14'
|
||||
CPP11: 1
|
||||
CPPSTD: c++11
|
||||
- SWIGLANG: javascript
|
||||
ENGINE: node
|
||||
VER: '16'
|
||||
CPP14: 1
|
||||
CPPSTD: c++14
|
||||
- SWIGLANG: javascript
|
||||
ENGINE: jsc
|
||||
os: ubuntu-18.04 # libwebkitgtk-dev dependency not available in 20.04.
|
||||
|
|
@ -91,7 +84,7 @@ jobs:
|
|||
- SWIGLANG: lua
|
||||
VER: '5.3'
|
||||
- SWIGLANG: octave
|
||||
CPP11: 1
|
||||
CPPSTD: c++11
|
||||
- SWIGLANG: perl5
|
||||
- SWIGLANG: php
|
||||
VER: '7.4'
|
||||
|
|
@ -164,7 +157,7 @@ jobs:
|
|||
- SWIGLANG: ruby
|
||||
VER: '3.0'
|
||||
CSTD: c99
|
||||
CPP11: 1
|
||||
CPPSTD: c++11
|
||||
- SWIGLANG: tcl
|
||||
# let's run all of them, as opposed to aborting when one fails
|
||||
fail-fast: false
|
||||
|
|
@ -176,9 +169,8 @@ jobs:
|
|||
ENGINE: ${{ matrix.ENGINE }}
|
||||
SWIG_FEATURES: ${{ matrix.SWIG_FEATURES }}
|
||||
CSTD: ${{ matrix.CSTD }}
|
||||
CPP11: ${{ matrix.CPP11 }}
|
||||
CPP14: ${{ matrix.CPP14 }}
|
||||
CPP17: ${{ matrix.CPP17 }}
|
||||
CPPSTD: ${{ matrix.CPPSTD }}
|
||||
GCC: ${{ matrix.GCC }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
|
@ -246,18 +238,16 @@ jobs:
|
|||
source $GITHUB_WORKSPACE/Tools/CI-linux-environment.sh
|
||||
set -x
|
||||
|
||||
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 }}
|
||||
if [[ -z "$CSTD" ]]; then
|
||||
case "$CPPSTD" in
|
||||
c++11) export CSTD=c11 ;;
|
||||
c++14) export CSTD=c11 ;;
|
||||
c++17) export CSTD=c17 ;;
|
||||
esac
|
||||
echo CSTD="$CSTD" >> $GITHUB_ENV
|
||||
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 "$CPPSTD"; then CONFIGOPTS+=(--enable-cpp11-testing "CXXFLAGS=-std=$CPPSTD $CXXFLAGS"); fi
|
||||
if test -n "$CSTD"; then CONFIGOPTS+=("CFLAGS=-std=$CSTD $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[@]}"
|
||||
|
|
@ -311,4 +301,4 @@ jobs:
|
|||
working-directory: build/build
|
||||
run: |
|
||||
set -x
|
||||
make check-maintainer-clean && ../../configure $CONFIGOPTS
|
||||
make check-maintainer-clean && ../../configure
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue