patch 9.0.1819: Github CI too complex

Problem:  Github CI too complex
Solution: CI: Tidy up matrix

Perform the following changes to the CI configuration:
 - Move common CFLAGS to ci/config.mk.sed
 - Change extra key to array to able to assign no or multiple values
   explicitly
 - Modify luaver variable handling
   - lib${{ matrix.luaver }}-dev ${{ matrix.luaver }} are confusing
     as package names
 - Deduplicate CONFOPT setting

closes: #12955

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: ichizok <gclient.gaap@gmail.com>
This commit is contained in:
ichizok
2023-08-29 22:16:34 +02:00
committed by Christian Brabandt
parent 3ac2d3da5f
commit 3e1e63de18
4 changed files with 22 additions and 31 deletions

View File

@ -26,7 +26,6 @@ jobs:
TEST: test TEST: test
SRCDIR: ./src SRCDIR: ./src
LEAK_CFLAGS: -DEXITFREE LEAK_CFLAGS: -DEXITFREE
CFLAGS: -Wno-deprecated-declarations
LOG_DIR: ${{ github.workspace }}/logs LOG_DIR: ${{ github.workspace }}/logs
TERM: xterm TERM: xterm
DISPLAY: ':99' DISPLAY: ':99'
@ -37,45 +36,40 @@ jobs:
matrix: matrix:
features: [tiny, normal, huge] features: [tiny, normal, huge]
compiler: [clang, gcc] compiler: [clang, gcc]
extra: [none] extra: [[]]
luaver: [lua5.4]
include: include:
- features: tiny - features: tiny
compiler: clang compiler: clang
extra: nogui extra: [nogui]
- features: tiny - features: tiny
compiler: gcc compiler: gcc
extra: nogui extra: [nogui]
- features: normal - features: normal
shadow: ./src/shadow shadow: ./src/shadow
- features: huge - features: huge
coverage: true coverage: true
- features: huge - features: huge
compiler: clang compiler: clang
extra: none
interface: dynamic interface: dynamic
python3: stable-abi python3: stable-abi
- features: huge - features: huge
compiler: gcc compiler: gcc
coverage: true coverage: true
interface: dynamic interface: dynamic
extra: testgui extra: [uchar, testgui]
uchar: true
luaver: lua5.4
- features: huge - features: huge
compiler: clang compiler: clang
extra: asan
# Lua5.1 is the most widely used version (since it's what LuaJIT is # Lua5.1 is the most widely used version (since it's what LuaJIT is
# compatible with), so ensure it works # compatible with), so ensure it works
luaver: lua5.1 lua_ver: '5.1'
extra: [asan]
- features: huge - features: huge
compiler: gcc compiler: gcc
coverage: true coverage: true
extra: unittests extra: [unittests]
luaver: lua5.4
- features: normal - features: normal
compiler: gcc compiler: gcc
extra: vimtags extra: [vimtags]
steps: steps:
- name: Checkout repository from github - name: Checkout repository from github
@ -90,6 +84,7 @@ jobs:
libtool-bin \ libtool-bin \
) )
if ${{ matrix.features == 'huge' }}; then if ${{ matrix.features == 'huge' }}; then
LUA_VER=${{ matrix.lua_ver || '5.4' }}
PKGS+=( \ PKGS+=( \
autoconf \ autoconf \
gdb \ gdb \
@ -98,8 +93,8 @@ jobs:
libperl-dev \ libperl-dev \
python2-dev \ python2-dev \
python3-dev \ python3-dev \
lib${{ matrix.luaver }}-dev \ liblua${LUA_VER}-dev \
${{ matrix.luaver }} \ lua${LUA_VER} \
ruby-dev \ ruby-dev \
tcl-dev \ tcl-dev \
cscope \ cscope \
@ -148,25 +143,20 @@ jobs:
;; ;;
huge) huge)
echo "TEST=scripttests test_libvterm" echo "TEST=scripttests test_libvterm"
if ${{ matrix.interface == 'dynamic' }}; then INTERFACE=${{ matrix.interface || 'yes' }}
if ${{ matrix.python3 == 'stable-abi' }}; then if ${{ matrix.python3 == 'stable-abi' }}; then
PYTHON3_FLAGS="--with-python3-stable-abi=3.8" PYTHON3_CONFOPT="--with-python3-stable-abi=3.8"
else
PYTHON3_FLAGS=""
fi
echo "CONFOPT=--enable-perlinterp=dynamic --enable-pythoninterp=dynamic --enable-python3interp=dynamic --enable-rubyinterp=dynamic --enable-luainterp=dynamic --enable-tclinterp=dynamic ${PYTHON3_FLAGS}"
else
echo "CONFOPT=--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
fi fi
echo "CONFOPT=--enable-perlinterp=${INTERFACE} --enable-pythoninterp=${INTERFACE} --enable-python3interp=${INTERFACE} --enable-rubyinterp=${INTERFACE} --enable-luainterp=${INTERFACE} --enable-tclinterp=${INTERFACE} ${PYTHON3_CONFOPT}"
;; ;;
esac esac
if ${{ matrix.coverage == true }}; then if ${{ matrix.coverage == true }}; then
CFLAGS="$CFLAGS --coverage -DUSE_GCOV_FLUSH" CFLAGS="${CFLAGS} --coverage -DUSE_GCOV_FLUSH"
echo "LDFLAGS=--coverage" echo "LDFLAGS=--coverage"
fi fi
if ${{ matrix.uchar == true }}; then if ${{ contains(matrix.extra, 'uchar') }}; then
CFLAGS="$CFLAGS -funsigned-char" CFLAGS="${CFLAGS} -funsigned-char"
fi fi
if ${{ contains(matrix.extra, 'testgui') }}; then if ${{ contains(matrix.extra, 'testgui') }}; then
echo "TEST=-C src testgui" echo "TEST=-C src testgui"
@ -183,7 +173,7 @@ jobs:
if ${{ contains(matrix.extra, 'vimtags') }}; then if ${{ contains(matrix.extra, 'vimtags') }}; then
echo "TEST=-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim" echo "TEST=-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim"
fi fi
echo "CFLAGS=$CFLAGS" echo "CFLAGS=${CFLAGS}"
) >> $GITHUB_ENV ) >> $GITHUB_ENV
- name: Set up system - name: Set up system

View File

@ -13,7 +13,6 @@ jobs:
env: env:
CC: gcc CC: gcc
CFLAGS: -Wno-deprecated-declarations
DEBIAN_FRONTEND: noninteractive DEBIAN_FRONTEND: noninteractive
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}

View File

@ -1,3 +1,3 @@
/^CFLAGS[[:blank:]]*=/s/$/ -Wall -Wextra -Wshadow -Werror/ /^CFLAGS[[:blank:]]*=/s/$/ -Wall -Wextra -Wshadow -Werror -Wno-deprecated-declarations/
/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function -Wno-shadow/ /^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function -Wno-shadow/
/^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-parameter/ /^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-parameter/

View File

@ -699,6 +699,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1819,
/**/ /**/
1818, 1818,
/**/ /**/