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
|
# 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.
|
# 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:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- SWIGLANG: ""
|
- SWIGLANG: ""
|
||||||
desc: gcc
|
|
||||||
- SWIGLANG: ""
|
- SWIGLANG: ""
|
||||||
GCC: 7
|
GCC: 7
|
||||||
desc: gcc7
|
|
||||||
- SWIGLANG: ""
|
- SWIGLANG: ""
|
||||||
GCC: 8
|
GCC: 8
|
||||||
desc: gcc8
|
|
||||||
- SWIGLANG: ""
|
- SWIGLANG: ""
|
||||||
GCC: 9
|
GCC: 9
|
||||||
desc: gcc9
|
|
||||||
- SWIGLANG: ""
|
- SWIGLANG: ""
|
||||||
GCC: 10
|
GCC: 10
|
||||||
desc: gcc10
|
|
||||||
- SWIGLANG: ""
|
- SWIGLANG: ""
|
||||||
GCC: 11
|
GCC: 11
|
||||||
desc: gcc11
|
|
||||||
- SWIGLANG: ""
|
- SWIGLANG: ""
|
||||||
compiler: clang
|
compiler: clang
|
||||||
desc: clang
|
|
||||||
- SWIGLANG: csharp
|
- SWIGLANG: csharp
|
||||||
# D support can't be enabled because dmd 2.066 fails to build anything
|
# 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
|
# under Ubuntu 18.04 due to its standard library (libphobos2.a) not
|
||||||
|
|
@ -72,15 +65,15 @@ jobs:
|
||||||
- SWIGLANG: javascript
|
- SWIGLANG: javascript
|
||||||
ENGINE: node
|
ENGINE: node
|
||||||
VER: '12'
|
VER: '12'
|
||||||
CPP11: 1
|
CPPSTD: c++11
|
||||||
- SWIGLANG: javascript
|
- SWIGLANG: javascript
|
||||||
ENGINE: node
|
ENGINE: node
|
||||||
VER: '14'
|
VER: '14'
|
||||||
CPP11: 1
|
CPPSTD: c++11
|
||||||
- SWIGLANG: javascript
|
- SWIGLANG: javascript
|
||||||
ENGINE: node
|
ENGINE: node
|
||||||
VER: '16'
|
VER: '16'
|
||||||
CPP14: 1
|
CPPSTD: c++14
|
||||||
- SWIGLANG: javascript
|
- SWIGLANG: javascript
|
||||||
ENGINE: jsc
|
ENGINE: jsc
|
||||||
os: ubuntu-18.04 # libwebkitgtk-dev dependency not available in 20.04.
|
os: ubuntu-18.04 # libwebkitgtk-dev dependency not available in 20.04.
|
||||||
|
|
@ -91,7 +84,7 @@ jobs:
|
||||||
- SWIGLANG: lua
|
- SWIGLANG: lua
|
||||||
VER: '5.3'
|
VER: '5.3'
|
||||||
- SWIGLANG: octave
|
- SWIGLANG: octave
|
||||||
CPP11: 1
|
CPPSTD: c++11
|
||||||
- SWIGLANG: perl5
|
- SWIGLANG: perl5
|
||||||
- SWIGLANG: php
|
- SWIGLANG: php
|
||||||
VER: '7.4'
|
VER: '7.4'
|
||||||
|
|
@ -164,7 +157,7 @@ jobs:
|
||||||
- SWIGLANG: ruby
|
- SWIGLANG: ruby
|
||||||
VER: '3.0'
|
VER: '3.0'
|
||||||
CSTD: c99
|
CSTD: c99
|
||||||
CPP11: 1
|
CPPSTD: c++11
|
||||||
- SWIGLANG: tcl
|
- SWIGLANG: tcl
|
||||||
# let's run all of them, as opposed to aborting when one fails
|
# let's run all of them, as opposed to aborting when one fails
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
@ -176,9 +169,8 @@ jobs:
|
||||||
ENGINE: ${{ matrix.ENGINE }}
|
ENGINE: ${{ matrix.ENGINE }}
|
||||||
SWIG_FEATURES: ${{ matrix.SWIG_FEATURES }}
|
SWIG_FEATURES: ${{ matrix.SWIG_FEATURES }}
|
||||||
CSTD: ${{ matrix.CSTD }}
|
CSTD: ${{ matrix.CSTD }}
|
||||||
CPP11: ${{ matrix.CPP11 }}
|
CPPSTD: ${{ matrix.CPPSTD }}
|
||||||
CPP14: ${{ matrix.CPP14 }}
|
GCC: ${{ matrix.GCC }}
|
||||||
CPP17: ${{ matrix.CPP17 }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -246,18 +238,16 @@ jobs:
|
||||||
source $GITHUB_WORKSPACE/Tools/CI-linux-environment.sh
|
source $GITHUB_WORKSPACE/Tools/CI-linux-environment.sh
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
if test -n "$CPP11"; then export CPPSTD=c++11 && export CSTD=c11; fi
|
if [[ -z "$CSTD" ]]; then
|
||||||
if test -n "$CPP14"; then export CPPSTD=c++14 && export CSTD=c11; fi
|
case "$CPPSTD" in
|
||||||
if test -n "$CPP17"; then export CPPSTD=c++17 && export CSTD=c17; fi
|
c++11) export CSTD=c11 ;;
|
||||||
echo CPPSTD="$CPPSTD" >> $GITHUB_ENV
|
c++14) export CSTD=c11 ;;
|
||||||
echo CSTD="$CSTD" >> $GITHUB_ENV
|
c++17) export CSTD=c17 ;;
|
||||||
|
esac
|
||||||
if test -n '${{ matrix.CONFIGOPTS }}'; then
|
echo CSTD="$CSTD" >> $GITHUB_ENV
|
||||||
CONFIGOPTS=${{ matrix.CONFIGOPTS }}
|
|
||||||
fi
|
fi
|
||||||
if test -n "$CPP11"; then CONFIGOPTS+=(--enable-cpp11-testing "CXXFLAGS=-std=c++11 $CXXFLAGS" "CFLAGS=-std=c11 $CFLAGS"); fi
|
if test -n "$CPPSTD"; then CONFIGOPTS+=(--enable-cpp11-testing "CXXFLAGS=-std=$CPPSTD $CXXFLAGS"); fi
|
||||||
if test -n "$CPP14"; then CONFIGOPTS+=(--enable-cpp11-testing "CXXFLAGS=-std=c++14 $CXXFLAGS" "CFLAGS=-std=c11 $CFLAGS"); fi
|
if test -n "$CSTD"; then CONFIGOPTS+=("CFLAGS=-std=$CSTD $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
|
if test -n "$SWIGLANG"; then CONFIGOPTS+=(--without-alllang --with-$WITHLANG); fi
|
||||||
echo "${CONFIGOPTS[@]}"
|
echo "${CONFIGOPTS[@]}"
|
||||||
./autogen.sh && mkdir -p build/build && cd build/build && ../../configure "${CONFIGOPTS[@]}"
|
./autogen.sh && mkdir -p build/build && cd build/build && ../../configure "${CONFIGOPTS[@]}"
|
||||||
|
|
@ -311,4 +301,4 @@ jobs:
|
||||||
working-directory: build/build
|
working-directory: build/build
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
make check-maintainer-clean && ../../configure $CONFIGOPTS
|
make check-maintainer-clean && ../../configure
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue