From d8f9061adf2d255bbe7b2b27f0fa892ef881c305 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 10 Apr 2016 02:11:53 +0300 Subject: add .gitlab-ci.yml and script for it. --- tools/ci/jobs/clang3.sh | 20 +++ tools/ci/jobs/clang34.sh | 22 +++ tools/ci/jobs/clang35.sh | 22 +++ tools/ci/jobs/clang39.sh | 29 +++ tools/ci/jobs/clang39_sdl2.sh | 29 +++ tools/ci/jobs/cmake_gcc49.sh | 19 ++ tools/ci/jobs/failure.sh | 20 +++ tools/ci/jobs/gcc44.sh | 20 +++ tools/ci/jobs/gcc46.sh | 20 +++ tools/ci/jobs/gcc47.sh | 20 +++ tools/ci/jobs/gcc48_c++11.sh | 47 +++++ tools/ci/jobs/gcc49.sh | 22 +++ tools/ci/jobs/gcc49_c++11.sh | 48 +++++ tools/ci/jobs/gcc5.sh | 54 ++++++ tools/ci/jobs/gcc5_c++11.sh | 53 ++++++ tools/ci/jobs/gcc5_h.sh | 24 +++ tools/ci/jobs/gcc5_h_pugi.sh | 24 +++ tools/ci/jobs/gcc5_lto.sh | 53 ++++++ tools/ci/jobs/gcc5_sanitize.sh | 62 +++++++ tools/ci/jobs/gcc5_sanitize_tests.sh | 64 +++++++ tools/ci/jobs/gcc5_sdl2.sh | 55 ++++++ tools/ci/jobs/gcc5_sdl2_c++11.sh | 54 ++++++ tools/ci/jobs/gcc5_sdl2_tests.sh | 54 ++++++ tools/ci/jobs/gcc5_tarball.sh | 55 ++++++ tools/ci/jobs/gcc5_tests.sh | 54 ++++++ tools/ci/jobs/gccsnapshot.sh | 331 ++++++++++++++++++++++++++++++++++ tools/ci/jobs/gccsnapshot_sdl2.sh | 334 +++++++++++++++++++++++++++++++++++ tools/ci/jobs/mplint.sh | 23 +++ tools/ci/jobs/success.sh | 19 ++ tools/ci/scripts/bot.sh | 27 +++ tools/ci/scripts/exit.sh | 3 + tools/ci/scripts/init.sh | 146 +++++++++++++++ 32 files changed, 1827 insertions(+) create mode 100755 tools/ci/jobs/clang3.sh create mode 100755 tools/ci/jobs/clang34.sh create mode 100755 tools/ci/jobs/clang35.sh create mode 100755 tools/ci/jobs/clang39.sh create mode 100755 tools/ci/jobs/clang39_sdl2.sh create mode 100755 tools/ci/jobs/cmake_gcc49.sh create mode 100755 tools/ci/jobs/failure.sh create mode 100755 tools/ci/jobs/gcc44.sh create mode 100755 tools/ci/jobs/gcc46.sh create mode 100755 tools/ci/jobs/gcc47.sh create mode 100755 tools/ci/jobs/gcc48_c++11.sh create mode 100755 tools/ci/jobs/gcc49.sh create mode 100755 tools/ci/jobs/gcc49_c++11.sh create mode 100755 tools/ci/jobs/gcc5.sh create mode 100755 tools/ci/jobs/gcc5_c++11.sh create mode 100755 tools/ci/jobs/gcc5_h.sh create mode 100755 tools/ci/jobs/gcc5_h_pugi.sh create mode 100755 tools/ci/jobs/gcc5_lto.sh create mode 100755 tools/ci/jobs/gcc5_sanitize.sh create mode 100755 tools/ci/jobs/gcc5_sanitize_tests.sh create mode 100755 tools/ci/jobs/gcc5_sdl2.sh create mode 100755 tools/ci/jobs/gcc5_sdl2_c++11.sh create mode 100755 tools/ci/jobs/gcc5_sdl2_tests.sh create mode 100755 tools/ci/jobs/gcc5_tarball.sh create mode 100755 tools/ci/jobs/gcc5_tests.sh create mode 100755 tools/ci/jobs/gccsnapshot.sh create mode 100755 tools/ci/jobs/gccsnapshot_sdl2.sh create mode 100755 tools/ci/jobs/mplint.sh create mode 100755 tools/ci/jobs/success.sh create mode 100755 tools/ci/scripts/bot.sh create mode 100755 tools/ci/scripts/exit.sh create mode 100755 tools/ci/scripts/init.sh (limited to 'tools') diff --git a/tools/ci/jobs/clang3.sh b/tools/ci/jobs/clang3.sh new file mode 100755 index 000000000..ef5c57542 --- /dev/null +++ b/tools/ci/jobs/clang3.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +export CC=clang +export CXX=clang++ +export LOGFILE=clang3.log + +source ./tools/ci/scripts/init.sh + +aptget_install clang libc++-dev \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev + +run_configure +run_make +run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/clang34.sh b/tools/ci/jobs/clang34.sh new file mode 100755 index 000000000..35d0ac129 --- /dev/null +++ b/tools/ci/jobs/clang34.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +export CC=clang-3.4 +export CXX=clang++-3.4 +export LOGFILE=clang34.log + +source ./tools/ci/scripts/init.sh + +aptget_install clang-3.4 libc++-dev \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev + +export CXXFLAGS="-stdlib=libc++" + +run_configure +run_make +run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/clang35.sh b/tools/ci/jobs/clang35.sh new file mode 100755 index 000000000..2d0d47ced --- /dev/null +++ b/tools/ci/jobs/clang35.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +export CC=clang-3.5 +export CXX=clang++-3.5 +export LOGFILE=clang35.log + +source ./tools/ci/scripts/init.sh + +aptget_install clang-3.5 libc++-dev \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev + +export CXXFLAGS="-stdlib=libc++" + +run_configure +run_make +run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/clang39.sh b/tools/ci/jobs/clang39.sh new file mode 100755 index 000000000..7907202f4 --- /dev/null +++ b/tools/ci/jobs/clang39.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +export CC=clang-3.9 +export CXX=clang++-3.9 +export LOGFILE=clang39.log + +source ./tools/ci/scripts/init.sh + +aptget_install clang-3.9 libc++-dev \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev + +export CXXFLAGS="-Weverything -Wno-documentation -Wno-padded -Wno-sign-conversion \ +-Wno-global-constructors -Wno-exit-time-destructors -Wno-weak-vtables \ +-Wno-overloaded-virtual -Wno-covered-switch-default -Wno-float-equal -Wno-conversion \ +-Wno-shorten-64-to-32 -Wno-missing-variable-declarations \ +-Wno-disabled-macro-expansion -Wno-format-nonliteral -stdlib=libc++ \ +-Wno-reserved-id-macro -Wno-packed -Wno-documentation-unknown-command \ +-Wno-variadic-macros -Wno-unreachable-code-return -Wno-double-promotion \ +-Wno-old-style-cast" + +run_configure $* +run_make +run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/clang39_sdl2.sh b/tools/ci/jobs/clang39_sdl2.sh new file mode 100755 index 000000000..d3ae58abe --- /dev/null +++ b/tools/ci/jobs/clang39_sdl2.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +export CC=clang-3.9 +export CXX=clang++-3.9 +export LOGFILE=clang39.log + +source ./tools/ci/scripts/init.sh + +aptget_install clang-3.9 libc++-dev \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl2-gfx-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev + +export CXXFLAGS="-Weverything -Wno-documentation -Wno-padded -Wno-sign-conversion \ +-Wno-global-constructors -Wno-exit-time-destructors -Wno-weak-vtables \ +-Wno-overloaded-virtual -Wno-covered-switch-default -Wno-float-equal -Wno-conversion \ +-Wno-shorten-64-to-32 -Wno-missing-variable-declarations \ +-Wno-disabled-macro-expansion -Wno-format-nonliteral -stdlib=libc++ \ +-Wno-reserved-id-macro -Wno-packed -Wno-documentation-unknown-command \ +-Wno-variadic-macros -Wno-unreachable-code-return -Wno-double-promotion \ +-Wno-old-style-cast" + +run_configure --with-sdl2 $* +run_make +run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/cmake_gcc49.sh b/tools/ci/jobs/cmake_gcc49.sh new file mode 100755 index 000000000..359c9f5f8 --- /dev/null +++ b/tools/ci/jobs/cmake_gcc49.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +export CC=gcc-4.9 +export CXX=g++-4.9 +export LOGFILE=cmake_gcc49.log + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-4.9 g++-4.9 \ + make cmake gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev + +run_cmake +run_make + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/failure.sh b/tools/ci/jobs/failure.sh new file mode 100755 index 000000000..8ee3be3cf --- /dev/null +++ b/tools/ci/jobs/failure.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +export LOGFILE=bot.log +export name="ManaPlus" + +source ./tools/ci/scripts/init.sh +source ./tools/ci/scripts/bot.sh + +aptget_install ii psmisc + +bot_connect "manaplusbot2" +bot_join "#manaplus" + +export gitcommit=$(echo ${CI_BUILD_REF} | cut -c 1-7) + +bot_message "#manaplus" "[${C}02${name}:${CI_BUILD_REF_NAME}${R}] Build failed: ${C}03${gitcommit}${R}. See https://gitlab.com/manaplus/manaplus/builds" +bot_message "#manaplus" "hightlight {41444d494e}" +bot_exit + +exit 0 diff --git a/tools/ci/jobs/gcc44.sh b/tools/ci/jobs/gcc44.sh new file mode 100755 index 000000000..7406cc0ad --- /dev/null +++ b/tools/ci/jobs/gcc44.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +export CC=gcc-4.4 +export CXX=g++-4.4 +export LOGFILE=gcc44.log + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-4.4 g++-4.4 \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev + +run_configure +run_make +run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/gcc46.sh b/tools/ci/jobs/gcc46.sh new file mode 100755 index 000000000..ea13e1e23 --- /dev/null +++ b/tools/ci/jobs/gcc46.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +export CC=gcc-4.6 +export CXX=g++-4.6 +export LOGFILE=gcc46.log + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-4.6 g++-4.6 \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev + +run_configure +run_make +run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/gcc47.sh b/tools/ci/jobs/gcc47.sh new file mode 100755 index 000000000..34ab2fd59 --- /dev/null +++ b/tools/ci/jobs/gcc47.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +export CC=gcc-4.7 +export CXX=g++-4.7 +export LOGFILE=gcc47.log + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-4.7 g++-4.7 \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev + +run_configure +run_make +run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/gcc48_c++11.sh b/tools/ci/jobs/gcc48_c++11.sh new file mode 100755 index 000000000..555c9780a --- /dev/null +++ b/tools/ci/jobs/gcc48_c++11.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +export CC=gcc-4.8 +export CXX=g++-4.8 +export LOGFILE=gcc48_c++11.log + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-4.8 g++-4.8 \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev + +export CXXFLAGS="-ggdb3 -O2 -pipe -ffast-math \ +-funswitch-loops \ +-Wvariadic-macros -Wvla -Wredundant-decls \ +-Wpacked-bitfield-compat -Wtrampolines \ +-Wsuggest-attribute=noreturn -Wunused -Wstrict-aliasing=2 \ +-fstrict-aliasing -Wunreachable-code -Wabi -Wdisabled-optimization \ +-Wvolatile-register-var -Winvalid-pch -Wredundant-decls \ +-Wnormalized=nfkc -Wmissing-format-attribute -Wmissing-noreturn \ +-Wswitch-default -Wsign-promo -Waddress -Wmissing-declarations \ +-Wctor-dtor-privacy -Wstrict-null-sentinel -Wlogical-op \ +-Wcast-align -Wpointer-arith -Wundef \ +-Wmissing-include-dirs -Winit-self -pedantic -Wall \ +-Wpacked -Wextra -fstrict-overflow -Wstrict-overflow=1 -Wunknown-pragmas \ +-Wwrite-strings -Wstack-protector -Wshadow -Wunused-macros -Wsynth \ +-Wbuiltin-macro-redefined -Wctor-dtor-privacy -Wdeprecated \ +-Wendif-labels -Wformat=1 -Wimport -Wnon-virtual-dtor -Wpsabi \ +-Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -Wc++11-compat -std=c++0x \ +-Wdelete-non-virtual-dtor -Wmaybe-uninitialized -Wunused-local-typedefs \ +-Wvector-operation-performance -Wfree-nonheap-object -Winvalid-memory-model \ +-Wnarrowing -Wzero-as-null-pointer-constant -funsafe-loop-optimizations \ +-Wabi-tag -Waggressive-loop-optimizations -Wclobbered -Wempty-body \ +-Wignored-qualifiers -Wliteral-suffix -Wmissing-field-initializers \ +-Woverlength-strings -Wpedantic -Wsign-compare -Wsizeof-pointer-memaccess \ +-Wsuggest-attribute=format -Wtype-limits -Wuninitialized \ +-Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function \ +-Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable" + +run_configure +run_make +run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/gcc49.sh b/tools/ci/jobs/gcc49.sh new file mode 100755 index 000000000..561d9e0b7 --- /dev/null +++ b/tools/ci/jobs/gcc49.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +export CC=gcc-4.9 +export CXX=g++-4.9 +export LOGFILE=gcc49.log + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-4.9 g++-4.9 \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev + +export CXXFLAGS="-fno-var-tracking" + +run_configure $* +run_make +run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/gcc49_c++11.sh b/tools/ci/jobs/gcc49_c++11.sh new file mode 100755 index 000000000..1d1b8255b --- /dev/null +++ b/tools/ci/jobs/gcc49_c++11.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +export CC=gcc-4.9 +export CXX=g++-4.9 +export LOGFILE=gcc49_c++11.log + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-4.9 g++-4.9 \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev + +export CXXFLAGS="-ggdb3 -O2 -pipe -ffast-math \ +-funswitch-loops \ +-Wvariadic-macros -Wvla -Wredundant-decls \ +-Wpacked-bitfield-compat -Wtrampolines \ +-Wsuggest-attribute=noreturn -Wunused -Wstrict-aliasing=2 \ +-fstrict-aliasing -Wunreachable-code -Wabi -Wdisabled-optimization \ +-Wvolatile-register-var -Winvalid-pch -Wredundant-decls \ +-Wnormalized=nfkc -Wmissing-format-attribute -Wmissing-noreturn \ +-Wswitch-default -Wsign-promo -Waddress -Wmissing-declarations \ +-Wctor-dtor-privacy -Wstrict-null-sentinel -Wlogical-op \ +-Wcast-align -Wpointer-arith -Wundef \ +-Wmissing-include-dirs -Winit-self -pedantic -Wall \ +-Wpacked -Wextra -fstrict-overflow -Wstrict-overflow=1 -Wunknown-pragmas \ +-Wwrite-strings -Wstack-protector -Wshadow -Wunused-macros -Wsynth \ +-Wbuiltin-macro-redefined -Wctor-dtor-privacy -Wdeprecated \ +-Wendif-labels -Wformat=1 -Wimport -Wnon-virtual-dtor -Wpsabi \ +-Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -Wc++11-compat -std=c++0x \ +-Wdelete-non-virtual-dtor -Wmaybe-uninitialized -Wunused-local-typedefs \ +-Wvector-operation-performance -Wfree-nonheap-object -Winvalid-memory-model \ +-Wnarrowing -Wzero-as-null-pointer-constant -funsafe-loop-optimizations \ +-Wabi-tag -Waggressive-loop-optimizations -Wclobbered -Wempty-body \ +-Wignored-qualifiers -Wliteral-suffix -Wmissing-field-initializers \ +-Woverlength-strings -Wpedantic -Wsign-compare -Wsizeof-pointer-memaccess \ +-Wsuggest-attribute=format -Wtype-limits -Wuninitialized \ +-Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function \ +-Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable \ +-fno-var-tracking -Woverloaded-virtual" + +run_configure +run_make +run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/gcc5.sh b/tools/ci/jobs/gcc5.sh new file mode 100755 index 000000000..59f8ad672 --- /dev/null +++ b/tools/ci/jobs/gcc5.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +export CC=gcc-5 +export CXX=g++-5 +export LOGFILE=gcc5.log + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-5 g++-5 \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev + +export CXXFLAGS="-ggdb3 -O2 -pipe -ffast-math \ +-fno-omit-frame-pointer -funswitch-loops \ +-Wvariadic-macros -Wvla -Wredundant-decls \ +-Wpacked-bitfield-compat -Wtrampolines \ +-Wsuggest-attribute=noreturn -Wunused -Wstrict-aliasing=2 \ +-fstrict-aliasing -Wunreachable-code \ +-Wvolatile-register-var -Winvalid-pch -Wredundant-decls \ +-Wnormalized=nfkc -Wmissing-format-attribute -Wmissing-noreturn \ +-Wswitch-default -Wsign-promo -Waddress -Wmissing-declarations \ +-Wctor-dtor-privacy -Wstrict-null-sentinel -Wlogical-op \ +-Wcast-align -Wpointer-arith -Wundef \ +-Wmissing-include-dirs -Winit-self -pedantic -Wall \ +-Wpacked -Wextra -fstrict-overflow -Wstrict-overflow=1 -Wunknown-pragmas \ +-Wwrite-strings -Wstack-protector -Wshadow -Wunused-macros -Wsynth \ +-Wbuiltin-macro-redefined -Wctor-dtor-privacy -Wdeprecated \ +-Wendif-labels -Wformat=1 -Wimport -Wnon-virtual-dtor -Wpsabi \ +-Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 \ +-Wdelete-non-virtual-dtor -Wmaybe-uninitialized -Wunused-local-typedefs \ +-Wvector-operation-performance -Wfree-nonheap-object -Winvalid-memory-model \ +-Wnarrowing -Wzero-as-null-pointer-constant -funsafe-loop-optimizations \ +-Waggressive-loop-optimizations -Wclobbered -Wempty-body \ +-Wignored-qualifiers -Wliteral-suffix -Wmissing-field-initializers \ +-Woverlength-strings -Wpedantic -Wsign-compare -Wsizeof-pointer-memaccess \ +-Wsuggest-attribute=format -Wtype-limits -Wuninitialized \ +-Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function \ +-Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -ftrapv \ +-fsched-pressure \ +-Wconditionally-supported -Wdate-time \ +-fno-var-tracking \ +-Wopenmp-simd -Wformat-signedness \ +-Wswitch-bool -Wmemset-transposed-args -Wchkp -Wsized-deallocation \ +-Wlogical-not-parentheses -Woverloaded-virtual \ +-Wno-variadic-macros -Wno-zero-as-null-pointer-constant" + +run_configure $* +run_make +run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/gcc5_c++11.sh b/tools/ci/jobs/gcc5_c++11.sh new file mode 100755 index 000000000..63cb83893 --- /dev/null +++ b/tools/ci/jobs/gcc5_c++11.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +export CC=gcc-5 +export CXX=g++-5 +export LOGFILE=gcc5.log + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-5 g++-5 \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev + +export CXXFLAGS="-ggdb3 -O2 -pipe -ffast-math \ +-fno-omit-frame-pointer -funswitch-loops \ +-Wvariadic-macros -Wvla -Wredundant-decls \ +-Wpacked-bitfield-compat -Wtrampolines \ +-Wsuggest-attribute=noreturn -Wunused -Wstrict-aliasing=2 \ +-fstrict-aliasing -Wunreachable-code \ +-Wvolatile-register-var -Winvalid-pch -Wredundant-decls \ +-Wnormalized=nfkc -Wmissing-format-attribute -Wmissing-noreturn \ +-Wswitch-default -Wsign-promo -Waddress -Wmissing-declarations \ +-Wctor-dtor-privacy -Wstrict-null-sentinel -Wlogical-op \ +-Wcast-align -Wpointer-arith -Wundef \ +-Wmissing-include-dirs -Winit-self -pedantic -Wall \ +-Wpacked -Wextra -fstrict-overflow -Wstrict-overflow=1 -Wunknown-pragmas \ +-Wwrite-strings -Wstack-protector -Wshadow -Wunused-macros -Wsynth \ +-Wbuiltin-macro-redefined -Wctor-dtor-privacy -Wdeprecated \ +-Wendif-labels -Wformat=1 -Wimport -Wnon-virtual-dtor -Wpsabi \ +-Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -std=gnu++1z \ +-Wdelete-non-virtual-dtor -Wmaybe-uninitialized -Wunused-local-typedefs \ +-Wvector-operation-performance -Wfree-nonheap-object -Winvalid-memory-model \ +-Wnarrowing -Wzero-as-null-pointer-constant -funsafe-loop-optimizations \ +-Waggressive-loop-optimizations -Wclobbered -Wempty-body \ +-Wignored-qualifiers -Wliteral-suffix -Wmissing-field-initializers \ +-Woverlength-strings -Wpedantic -Wsign-compare -Wsizeof-pointer-memaccess \ +-Wsuggest-attribute=format -Wtype-limits -Wuninitialized \ +-Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function \ +-Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -ftrapv \ +-fsched-pressure \ +-Wconditionally-supported -Wdate-time \ +-fno-var-tracking \ +-Wopenmp-simd -Wformat-signedness \ +-Wswitch-bool -Wmemset-transposed-args -Wchkp -Wc++14-compat -Wsized-deallocation \ +-Wlogical-not-parentheses -Woverloaded-virtual" + +run_configure $* +run_make +run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/gcc5_h.sh b/tools/ci/jobs/gcc5_h.sh new file mode 100755 index 000000000..3a24f502c --- /dev/null +++ b/tools/ci/jobs/gcc5_h.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +export CC=gcc-5 +export CXX=g++-5 +export LOGFILE=gcc5_h.log + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-5 g++-5 \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev + +cd src +export dir=$(pwd) +export includes="-I$dir -I/usr/include -I/usr/include/SDL -I/usr/include/libxml2" + +run_h $* + +cd .. + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/gcc5_h_pugi.sh b/tools/ci/jobs/gcc5_h_pugi.sh new file mode 100755 index 000000000..5eef3afeb --- /dev/null +++ b/tools/ci/jobs/gcc5_h_pugi.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +export CC=gcc-5 +export CXX=g++-5 +export LOGFILE=gcc5_h.log + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-5 g++-5 \ + make autoconf automake autopoint gettext libphysfs-dev \ + libpugixml-dev libcurl4-gnutls-dev libpng-dev \ + libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev + +cd src +export dir=$(pwd) +export includes="-I$dir -I/usr/include -I/usr/include/SDL -I/usr/include/libxml2" + +run_h $* + +cd .. + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/gcc5_lto.sh b/tools/ci/jobs/gcc5_lto.sh new file mode 100755 index 000000000..ad99f796e --- /dev/null +++ b/tools/ci/jobs/gcc5_lto.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +export CC=gcc-5 +export CXX=g++-5 +export LOGFILE=gcc5.log + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-5 g++-5 \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev + +export CXXFLAGS="-ggdb3 -pipe -ffast-math -O9 -flto -fwhole-program \ +-fno-omit-frame-pointer -funswitch-loops \ +-Wvariadic-macros -Wvla -Wredundant-decls \ +-Wpacked-bitfield-compat -Wtrampolines \ +-Wsuggest-attribute=noreturn -Wunused -Wstrict-aliasing=2 \ +-fstrict-aliasing -Wunreachable-code \ +-Wvolatile-register-var -Winvalid-pch -Wredundant-decls \ +-Wnormalized=nfkc -Wmissing-format-attribute -Wmissing-noreturn \ +-Wswitch-default -Wsign-promo -Waddress -Wmissing-declarations \ +-Wctor-dtor-privacy -Wstrict-null-sentinel -Wlogical-op \ +-Wcast-align -Wpointer-arith -Wundef \ +-Wmissing-include-dirs -Winit-self -pedantic -Wall \ +-Wpacked -Wextra -fstrict-overflow -Wstrict-overflow=1 -Wunknown-pragmas \ +-Wwrite-strings -Wstack-protector -Wshadow -Wunused-macros -Wsynth \ +-Wbuiltin-macro-redefined -Wctor-dtor-privacy -Wdeprecated \ +-Wendif-labels -Wformat=1 -Wimport -Wnon-virtual-dtor -Wpsabi \ +-Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -std=gnu++1y \ +-Wdelete-non-virtual-dtor -Wmaybe-uninitialized -Wunused-local-typedefs \ +-Wvector-operation-performance -Wfree-nonheap-object -Winvalid-memory-model \ +-Wnarrowing -Wzero-as-null-pointer-constant -funsafe-loop-optimizations \ +-Waggressive-loop-optimizations -Wclobbered -Wempty-body \ +-Wignored-qualifiers -Wliteral-suffix -Wmissing-field-initializers \ +-Woverlength-strings -Wpedantic -Wsign-compare -Wsizeof-pointer-memaccess \ +-Wsuggest-attribute=format -Wtype-limits -Wuninitialized \ +-Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function \ +-Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -ftrapv \ +-fsched-pressure \ +-Wconditionally-supported -Wdate-time \ +-fno-var-tracking \ +-Wopenmp-simd -Wformat-signedness \ +-Wswitch-bool -Wmemset-transposed-args -Wchkp -Wc++14-compat -Wsized-deallocation \ +-Wlogical-not-parentheses -Woverloaded-virtual" + +run_configure +run_make +run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/gcc5_sanitize.sh b/tools/ci/jobs/gcc5_sanitize.sh new file mode 100755 index 000000000..803b29b87 --- /dev/null +++ b/tools/ci/jobs/gcc5_sanitize.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +export CC=gcc-5 +export CXX=g++-5 +export LOGFILE=gcc5_sanitize.log + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-5 g++-5 \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev + +export CXXFLAGS="-ggdb3 -O2 -pipe -ffast-math \ +-fsanitize=address -fsanitize=undefined \ +-fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=unreachable \ +-fsanitize=vla-bound -fsanitize=null -fsanitize=return \ +-fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment \ +-fsanitize=object-size -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow \ +-fsanitize=nonnull-attribute -fsanitize=returns-nonnull-attribute -fsanitize=bool \ +-fsanitize=enum -fsanitize=vptr \ +-fno-omit-frame-pointer -funswitch-loops \ +-Wvariadic-macros -Wvla -Wredundant-decls \ +-Wpacked-bitfield-compat -Wtrampolines \ +-Wsuggest-attribute=noreturn -Wunused -Wstrict-aliasing=2 \ +-fstrict-aliasing -Wunreachable-code \ +-Wvolatile-register-var -Winvalid-pch -Wredundant-decls \ +-Wnormalized=nfkc -Wmissing-format-attribute -Wmissing-noreturn \ +-Wswitch-default -Wsign-promo -Waddress -Wmissing-declarations \ +-Wctor-dtor-privacy -Wstrict-null-sentinel -Wlogical-op \ +-Wcast-align -Wpointer-arith -Wundef \ +-Wmissing-include-dirs -Winit-self -pedantic -Wall \ +-Wpacked -Wextra -fstrict-overflow -Wstrict-overflow=1 -Wunknown-pragmas \ +-Wwrite-strings -Wstack-protector -Wshadow -Wunused-macros -Wsynth \ +-Wbuiltin-macro-redefined -Wctor-dtor-privacy -Wdeprecated \ +-Wendif-labels -Wformat=1 -Wimport -Wnon-virtual-dtor -Wpsabi \ +-Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -std=gnu++1z \ +-Wdelete-non-virtual-dtor -Wmaybe-uninitialized -Wunused-local-typedefs \ +-Wvector-operation-performance -Wfree-nonheap-object -Winvalid-memory-model \ +-Wnarrowing -Wzero-as-null-pointer-constant -funsafe-loop-optimizations \ +-Waggressive-loop-optimizations -Wclobbered -Wempty-body \ +-Wignored-qualifiers -Wliteral-suffix -Wmissing-field-initializers \ +-Woverlength-strings -Wpedantic -Wsign-compare -Wsizeof-pointer-memaccess \ +-Wsuggest-attribute=format -Wtype-limits -Wuninitialized \ +-Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function \ +-Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -ftrapv \ +-fsched-pressure -Wconditionally-supported -Wdate-time -fno-var-tracking \ +-Wopenmp-simd -Wformat-signedness -Wformat-contains-nul \ +-Wformat-extra-args -Wformat-security -Wswitch-bool -Wswitch-enum \ +-Wformat-y2k -Wformat-zero-length -Wmemset-transposed-args -Wchkp \ +-Wc++14-compat -Wsized-deallocation -Wlogical-not-parentheses \ +-Woverloaded-virtual -Warray-bounds -Wbool-compare -Wchar-subscripts \ +-Wcomment -Wmissing-braces -Wnonnull -Wopenmp-simd -Wparentheses \ +-Wreturn-type -Wsequence-point -Wswitch" + +run_configure +run_make +run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/gcc5_sanitize_tests.sh b/tools/ci/jobs/gcc5_sanitize_tests.sh new file mode 100755 index 000000000..4a6803e14 --- /dev/null +++ b/tools/ci/jobs/gcc5_sanitize_tests.sh @@ -0,0 +1,64 @@ +#!/bin/bash + +export CC=gcc-5 +export CXX=g++-5 +export LOGFILE=gcc5_tests.log + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-5 g++-5 \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev + +export CXXFLAGS="-ggdb3 -O2 -pipe -ffast-math \ +-fsanitize=address -fsanitize=undefined \ +-fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=unreachable \ +-fsanitize=vla-bound -fsanitize=null -fsanitize=return \ +-fsanitize=signed-integer-overflow -fsanitize=bounds -fsanitize=alignment \ +-fsanitize=object-size -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow \ +-fsanitize=nonnull-attribute -fsanitize=returns-nonnull-attribute -fsanitize=bool \ +-fsanitize=enum -fsanitize=vptr \ +-fno-omit-frame-pointer -funswitch-loops \ +-Wvariadic-macros -Wvla -Wredundant-decls \ +-Wpacked-bitfield-compat -Wtrampolines \ +-Wsuggest-attribute=noreturn -Wunused -Wstrict-aliasing=2 \ +-fstrict-aliasing -Wunreachable-code \ +-Wvolatile-register-var -Winvalid-pch -Wredundant-decls \ +-Wnormalized=nfkc -Wmissing-format-attribute -Wmissing-noreturn \ +-Wswitch-default -Wsign-promo -Waddress -Wmissing-declarations \ +-Wctor-dtor-privacy -Wstrict-null-sentinel -Wlogical-op \ +-Wcast-align -Wpointer-arith -Wundef \ +-Wmissing-include-dirs -Winit-self -pedantic -Wall \ +-Wpacked -Wextra -fstrict-overflow -Wstrict-overflow=1 -Wunknown-pragmas \ +-Wwrite-strings -Wstack-protector -Wshadow -Wunused-macros -Wsynth \ +-Wbuiltin-macro-redefined -Wctor-dtor-privacy -Wdeprecated \ +-Wendif-labels -Wformat=1 -Wimport -Wnon-virtual-dtor -Wpsabi \ +-Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -std=gnu++1z \ +-Wdelete-non-virtual-dtor -Wmaybe-uninitialized -Wunused-local-typedefs \ +-Wvector-operation-performance -Wfree-nonheap-object -Winvalid-memory-model \ +-Wnarrowing -Wzero-as-null-pointer-constant -funsafe-loop-optimizations \ +-Waggressive-loop-optimizations -Wclobbered -Wempty-body \ +-Wignored-qualifiers -Wliteral-suffix -Wmissing-field-initializers \ +-Woverlength-strings -Wpedantic -Wsign-compare -Wsizeof-pointer-memaccess \ +-Wsuggest-attribute=format -Wtype-limits -Wuninitialized \ +-Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function \ +-Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -ftrapv \ +-fsched-pressure -Wconditionally-supported -Wdate-time -fno-var-tracking \ +-Wopenmp-simd -Wformat-signedness -Wformat-contains-nul \ +-Wformat-extra-args -Wformat-security -Wswitch-bool -Wswitch-enum \ +-Wformat-y2k -Wformat-zero-length -Wmemset-transposed-args -Wchkp \ +-Wc++14-compat -Wsized-deallocation -Wlogical-not-parentheses \ +-Woverloaded-virtual -Warray-bounds -Wbool-compare -Wchar-subscripts \ +-Wcomment -Wmissing-braces -Wnonnull -Wopenmp-simd -Wparentheses \ +-Wreturn-type -Wsequence-point -Wswitch" + +run_configure --enable-unittests=yes +export SDL_VIDEODRIVER=dummy +export ASAN_OPTIONS=detect_leaks=0 +run_make check +#run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/gcc5_sdl2.sh b/tools/ci/jobs/gcc5_sdl2.sh new file mode 100755 index 000000000..d0502d643 --- /dev/null +++ b/tools/ci/jobs/gcc5_sdl2.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +export CC=gcc-5 +export CXX=g++-5 +export LOGFILE=gcc5_sdl2.log + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-5 g++-5 \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl2-gfx-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev + +# need fix -Woverloaded-virtual +export CXXFLAGS="-ggdb3 -O2 -pipe -ffast-math \ +-fno-omit-frame-pointer -funswitch-loops \ +-Wvariadic-macros -Wvla -Wredundant-decls \ +-Wpacked-bitfield-compat -Wtrampolines \ +-Wsuggest-attribute=noreturn -Wunused -Wstrict-aliasing=2 \ +-fstrict-aliasing -Wunreachable-code \ +-Wvolatile-register-var -Winvalid-pch -Wredundant-decls \ +-Wnormalized=nfkc -Wmissing-format-attribute -Wmissing-noreturn \ +-Wsign-promo -Waddress -Wmissing-declarations \ +-Wctor-dtor-privacy -Wstrict-null-sentinel -Wlogical-op \ +-Wcast-align -Wpointer-arith -Wundef \ +-Wmissing-include-dirs -Winit-self -pedantic -Wall \ +-Wpacked -Wextra -fstrict-overflow -Wstrict-overflow=1 -Wunknown-pragmas \ +-Wwrite-strings -Wstack-protector -Wshadow -Wunused-macros -Wsynth \ +-Wbuiltin-macro-redefined -Wctor-dtor-privacy -Wdeprecated \ +-Wendif-labels -Wformat=1 -Wimport -Wnon-virtual-dtor -Wpsabi \ +-Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 \ +-Wdelete-non-virtual-dtor -Wmaybe-uninitialized -Wunused-local-typedefs \ +-Wvector-operation-performance -Wfree-nonheap-object -Winvalid-memory-model \ +-Wnarrowing -Wzero-as-null-pointer-constant -funsafe-loop-optimizations \ +-Waggressive-loop-optimizations -Wclobbered -Wempty-body \ +-Wignored-qualifiers -Wliteral-suffix -Wmissing-field-initializers \ +-Woverlength-strings -Wpedantic -Wsign-compare -Wsizeof-pointer-memaccess \ +-Wsuggest-attribute=format -Wtype-limits -Wuninitialized \ +-Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function \ +-Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -ftrapv \ +-fsched-pressure \ +-Wconditionally-supported -Wdate-time \ +-fno-var-tracking \ +-Wopenmp-simd -Wformat-signedness \ +-Wswitch-bool -Wmemset-transposed-args -Wchkp -Wsized-deallocation \ +-Wlogical-not-parentheses \ +-Wno-variadic-macros -Wno-zero-as-null-pointer-constant" + +run_configure --with-sdl2 $* +run_make +run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/gcc5_sdl2_c++11.sh b/tools/ci/jobs/gcc5_sdl2_c++11.sh new file mode 100755 index 000000000..8c9cc6afd --- /dev/null +++ b/tools/ci/jobs/gcc5_sdl2_c++11.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +export CC=gcc-5 +export CXX=g++-5 +export LOGFILE=gcc5_sdl2.log + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-5 g++-5 \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl2-gfx-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev + +# need fix -Woverloaded-virtual +export CXXFLAGS="-ggdb3 -O2 -pipe -ffast-math \ +-fno-omit-frame-pointer -funswitch-loops \ +-Wvariadic-macros -Wvla -Wredundant-decls \ +-Wpacked-bitfield-compat -Wtrampolines \ +-Wsuggest-attribute=noreturn -Wunused -Wstrict-aliasing=2 \ +-fstrict-aliasing -Wunreachable-code \ +-Wvolatile-register-var -Winvalid-pch -Wredundant-decls \ +-Wnormalized=nfkc -Wmissing-format-attribute -Wmissing-noreturn \ +-Wsign-promo -Waddress -Wmissing-declarations \ +-Wctor-dtor-privacy -Wstrict-null-sentinel -Wlogical-op \ +-Wcast-align -Wpointer-arith -Wundef \ +-Wmissing-include-dirs -Winit-self -pedantic -Wall \ +-Wpacked -Wextra -fstrict-overflow -Wstrict-overflow=1 -Wunknown-pragmas \ +-Wwrite-strings -Wstack-protector -Wshadow -Wunused-macros -Wsynth \ +-Wbuiltin-macro-redefined -Wctor-dtor-privacy -Wdeprecated \ +-Wendif-labels -Wformat=1 -Wimport -Wnon-virtual-dtor -Wpsabi \ +-Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -std=gnu++1y \ +-Wdelete-non-virtual-dtor -Wmaybe-uninitialized -Wunused-local-typedefs \ +-Wvector-operation-performance -Wfree-nonheap-object -Winvalid-memory-model \ +-Wnarrowing -Wzero-as-null-pointer-constant -funsafe-loop-optimizations \ +-Waggressive-loop-optimizations -Wclobbered -Wempty-body \ +-Wignored-qualifiers -Wliteral-suffix -Wmissing-field-initializers \ +-Woverlength-strings -Wpedantic -Wsign-compare -Wsizeof-pointer-memaccess \ +-Wsuggest-attribute=format -Wtype-limits -Wuninitialized \ +-Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function \ +-Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -ftrapv \ +-fsched-pressure \ +-Wconditionally-supported -Wdate-time \ +-fno-var-tracking \ +-Wopenmp-simd -Wformat-signedness \ +-Wswitch-bool -Wmemset-transposed-args -Wchkp -Wc++14-compat -Wsized-deallocation \ +-Wlogical-not-parentheses" + +run_configure --with-sdl2 $* +run_make +run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/gcc5_sdl2_tests.sh b/tools/ci/jobs/gcc5_sdl2_tests.sh new file mode 100755 index 000000000..e9f193133 --- /dev/null +++ b/tools/ci/jobs/gcc5_sdl2_tests.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +export CC=gcc-5 +export CXX=g++-5 +export LOGFILE=gcc5_sdl2_tests.log + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-5 g++-5 \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl2-dev libsdl2-gfx-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev + +export CXXFLAGS="-ggdb3 -O2 -pipe -ffast-math \ +-fno-omit-frame-pointer -funswitch-loops \ +-Wvariadic-macros -Wvla -Wredundant-decls \ +-Wpacked-bitfield-compat -Wtrampolines \ +-Wsuggest-attribute=noreturn -Wunused -Wstrict-aliasing=2 \ +-fstrict-aliasing -Wunreachable-code \ +-Wvolatile-register-var -Winvalid-pch -Wredundant-decls \ +-Wnormalized=nfkc -Wmissing-format-attribute -Wmissing-noreturn \ +-Wswitch-default -Wsign-promo -Waddress -Wmissing-declarations \ +-Wctor-dtor-privacy -Wstrict-null-sentinel -Wlogical-op \ +-Wcast-align -Wpointer-arith -Wundef \ +-Wmissing-include-dirs -Winit-self -pedantic -Wall \ +-Wpacked -Wextra -fstrict-overflow -Wstrict-overflow=1 -Wunknown-pragmas \ +-Wwrite-strings -Wstack-protector -Wshadow -Wunused-macros -Wsynth \ +-Wbuiltin-macro-redefined -Wctor-dtor-privacy -Wdeprecated \ +-Wendif-labels -Wformat=1 -Wimport -Wnon-virtual-dtor -Wpsabi \ +-Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -std=gnu++1y \ +-Wdelete-non-virtual-dtor -Wmaybe-uninitialized -Wunused-local-typedefs \ +-Wvector-operation-performance -Wfree-nonheap-object -Winvalid-memory-model \ +-Wnarrowing -Wzero-as-null-pointer-constant -funsafe-loop-optimizations \ +-Waggressive-loop-optimizations -Wclobbered -Wempty-body \ +-Wignored-qualifiers -Wliteral-suffix -Wmissing-field-initializers \ +-Woverlength-strings -Wpedantic -Wsign-compare -Wsizeof-pointer-memaccess \ +-Wsuggest-attribute=format -Wtype-limits -Wuninitialized \ +-Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function \ +-Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -ftrapv \ +-fsched-pressure \ +-Wconditionally-supported -Wdate-time \ +-fno-var-tracking \ +-Wopenmp-simd -Wformat-signedness \ +-Wswitch-bool -Wmemset-transposed-args -Wchkp -Wc++14-compat -Wsized-deallocation \ +-Wlogical-not-parentheses -Woverloaded-virtual" + +run_configure --with-sdl2 --enable-unittests=yes +export SDL_VIDEODRIVER=dummy +run_make check +#run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/gcc5_tarball.sh b/tools/ci/jobs/gcc5_tarball.sh new file mode 100755 index 000000000..655caf3ae --- /dev/null +++ b/tools/ci/jobs/gcc5_tarball.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +export CC=gcc-5 +export CXX=g++-5 +export LOGFILE=gcc5_tarball.log + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-5 g++-5 \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev xz-utils \ + libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev + +export CXXFLAGS="-ggdb3 -O2 -pipe -ffast-math \ +-fno-omit-frame-pointer -funswitch-loops \ +-Wvariadic-macros -Wvla -Wredundant-decls \ +-Wpacked-bitfield-compat -Wtrampolines \ +-Wsuggest-attribute=noreturn -Wunused -Wstrict-aliasing=2 \ +-fstrict-aliasing -Wunreachable-code \ +-Wvolatile-register-var -Winvalid-pch -Wredundant-decls \ +-Wnormalized=nfkc -Wmissing-format-attribute -Wmissing-noreturn \ +-Wswitch-default -Wsign-promo -Waddress -Wmissing-declarations \ +-Wctor-dtor-privacy -Wstrict-null-sentinel -Wlogical-op \ +-Wcast-align -Wpointer-arith -Wundef \ +-Wmissing-include-dirs -Winit-self -pedantic -Wall \ +-Wpacked -Wextra -fstrict-overflow -Wstrict-overflow=1 -Wunknown-pragmas \ +-Wwrite-strings -Wstack-protector -Wshadow -Wunused-macros -Wsynth \ +-Wbuiltin-macro-redefined -Wctor-dtor-privacy -Wdeprecated \ +-Wendif-labels -Wformat=1 -Wimport -Wnon-virtual-dtor -Wpsabi \ +-Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -std=gnu++1y \ +-Wdelete-non-virtual-dtor -Wmaybe-uninitialized -Wunused-local-typedefs \ +-Wvector-operation-performance -Wfree-nonheap-object -Winvalid-memory-model \ +-Wnarrowing -Wzero-as-null-pointer-constant -funsafe-loop-optimizations \ +-Waggressive-loop-optimizations -Wclobbered -Wempty-body \ +-Wignored-qualifiers -Wliteral-suffix -Wmissing-field-initializers \ +-Woverlength-strings -Wpedantic -Wsign-compare -Wsizeof-pointer-memaccess \ +-Wsuggest-attribute=format -Wtype-limits -Wuninitialized \ +-Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function \ +-Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -ftrapv \ +-fsched-pressure \ +-Wconditionally-supported -Wdate-time \ +-fno-var-tracking \ +-Wopenmp-simd -Wformat-signedness \ +-Wswitch-bool -Wmemset-transposed-args -Wchkp -Wc++14-compat -Wsized-deallocation \ +-Wlogical-not-parentheses -Woverloaded-virtual" + +run_configure +run_tarball test +run_configure +run_make +run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/gcc5_tests.sh b/tools/ci/jobs/gcc5_tests.sh new file mode 100755 index 000000000..a4b49a9a7 --- /dev/null +++ b/tools/ci/jobs/gcc5_tests.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +export CC=gcc-5 +export CXX=g++-5 +export LOGFILE=gcc5_tests.log + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-5 g++-5 \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev + +export CXXFLAGS="-ggdb3 -O2 -pipe -ffast-math \ +-fno-omit-frame-pointer -funswitch-loops \ +-Wvariadic-macros -Wvla -Wredundant-decls \ +-Wpacked-bitfield-compat -Wtrampolines \ +-Wsuggest-attribute=noreturn -Wunused -Wstrict-aliasing=2 \ +-fstrict-aliasing -Wunreachable-code \ +-Wvolatile-register-var -Winvalid-pch -Wredundant-decls \ +-Wnormalized=nfkc -Wmissing-format-attribute -Wmissing-noreturn \ +-Wswitch-default -Wsign-promo -Waddress -Wmissing-declarations \ +-Wctor-dtor-privacy -Wstrict-null-sentinel -Wlogical-op \ +-Wcast-align -Wpointer-arith -Wundef \ +-Wmissing-include-dirs -Winit-self -pedantic -Wall \ +-Wpacked -Wextra -fstrict-overflow -Wstrict-overflow=1 -Wunknown-pragmas \ +-Wwrite-strings -Wstack-protector -Wshadow -Wunused-macros -Wsynth \ +-Wbuiltin-macro-redefined -Wctor-dtor-privacy -Wdeprecated \ +-Wendif-labels -Wformat=1 -Wimport -Wnon-virtual-dtor -Wpsabi \ +-Wsign-promo -Wwrite-strings -D_FORTIFY_SOURCE=2 -std=gnu++1y \ +-Wdelete-non-virtual-dtor -Wmaybe-uninitialized -Wunused-local-typedefs \ +-Wvector-operation-performance -Wfree-nonheap-object -Winvalid-memory-model \ +-Wnarrowing -Wzero-as-null-pointer-constant -funsafe-loop-optimizations \ +-Waggressive-loop-optimizations -Wclobbered -Wempty-body \ +-Wignored-qualifiers -Wliteral-suffix -Wmissing-field-initializers \ +-Woverlength-strings -Wpedantic -Wsign-compare -Wsizeof-pointer-memaccess \ +-Wsuggest-attribute=format -Wtype-limits -Wuninitialized \ +-Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function \ +-Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -ftrapv \ +-fsched-pressure \ +-Wconditionally-supported -Wdate-time \ +-fno-var-tracking \ +-Wopenmp-simd -Wformat-signedness \ +-Wswitch-bool -Wmemset-transposed-args -Wchkp -Wc++14-compat -Wsized-deallocation \ +-Wlogical-not-parentheses -Woverloaded-virtual" + +run_configure --enable-unittests=yes +export SDL_VIDEODRIVER=dummy +run_make check +#run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/gccsnapshot.sh b/tools/ci/jobs/gccsnapshot.sh new file mode 100755 index 000000000..cf7c73665 --- /dev/null +++ b/tools/ci/jobs/gccsnapshot.sh @@ -0,0 +1,331 @@ +#!/bin/bash + +export CC=gcc +export CXX=g++ +export LOGFILE=gcc-snapshot.log +export PATH=/usr/lib/gcc-snapshot/bin:$PATH + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-snapshot \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-ttf2.0-dev + +export CXXFLAGS="-pedantic -ggdb3 -O2 -pipe -Wstrict-aliasing=2 \ +-Wstrict-overflow=1 -Wformat=1 -D_FORTIFY_SOURCE=2 \ +-std=gnu++1z -Wformat=1" + +#export CXXFLAGS="${CXXFLAGS} --all-warnings" +#export CXXFLAGS="${CXXFLAGS} --extra-warnings" +export CXXFLAGS="${CXXFLAGS} -W" +export CXXFLAGS="${CXXFLAGS} -Wabi" +# ignoring +#export CXXFLAGS="${CXXFLAGS} -Wabi-tag" +#export CXXFLAGS="${CXXFLAGS} -Wabi=" +export CXXFLAGS="${CXXFLAGS} -Waddress" +# +++ ignoring. may be can be fixed? +#export CXXFLAGS="${CXXFLAGS} -Waggregate-return" +export CXXFLAGS="${CXXFLAGS} -Waggressive-loop-optimizations" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Waliasing" +#export CXXFLAGS="${CXXFLAGS} -Walign-commons" +export CXXFLAGS="${CXXFLAGS} -Wall" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wampersand" +export CXXFLAGS="${CXXFLAGS} -Warray-bounds" +# +++ need try it +export CXXFLAGS="${CXXFLAGS} -Warray-bounds=2" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Warray-temporaries" +#export CXXFLAGS="${CXXFLAGS} -Wassign-intercept" +export CXXFLAGS="${CXXFLAGS} -Wattributes" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wbad-function-cast" +export CXXFLAGS="${CXXFLAGS} -Wbool-compare" +export CXXFLAGS="${CXXFLAGS} -Wbuiltin-macro-redefined" +#export CXXFLAGS="${CXXFLAGS} -Wc++-compat" +#export CXXFLAGS="${CXXFLAGS} -Wc++0x-compat" +#export CXXFLAGS="${CXXFLAGS} -Wc++11-compat" +export CXXFLAGS="${CXXFLAGS} -Wc++14-compat" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wc-binding-type" +#export CXXFLAGS="${CXXFLAGS} -Wc90-c99-compat" +#export CXXFLAGS="${CXXFLAGS} -Wc99-c11-compat" +export CXXFLAGS="${CXXFLAGS} -Wcast-align" +export CXXFLAGS="${CXXFLAGS} -Wcast-qual" +export CXXFLAGS="${CXXFLAGS} -Wchar-subscripts" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wcharacter-truncation" +export CXXFLAGS="${CXXFLAGS} -Wchkp" +export CXXFLAGS="${CXXFLAGS} -Wclobbered" +export CXXFLAGS="${CXXFLAGS} -Wcomment" +export CXXFLAGS="${CXXFLAGS} -Wcomments" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wcompare-reals" +export CXXFLAGS="${CXXFLAGS} -Wconditionally-supported" +# +++ need fix in future +#export CXXFLAGS="${CXXFLAGS} -Wconversion" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wconversion-extra" +export CXXFLAGS="${CXXFLAGS} -Wconversion-null" +export CXXFLAGS="${CXXFLAGS} -Wcoverage-mismatch" +export CXXFLAGS="${CXXFLAGS} -Wcpp" +export CXXFLAGS="${CXXFLAGS} -Wctor-dtor-privacy" +export CXXFLAGS="${CXXFLAGS} -Wdate-time" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wdeclaration-after-statement" +export CXXFLAGS="${CXXFLAGS} -Wdelete-incomplete" +export CXXFLAGS="${CXXFLAGS} -Wdelete-non-virtual-dtor" +export CXXFLAGS="${CXXFLAGS} -Wdeprecated" +export CXXFLAGS="${CXXFLAGS} -Wdeprecated-declarations" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wdesignated-init" +export CXXFLAGS="${CXXFLAGS} -Wdisabled-optimization" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wdiscarded-array-qualifiers" +#export CXXFLAGS="${CXXFLAGS} -Wdiscarded-qualifiers" +export CXXFLAGS="${CXXFLAGS} -Wdiv-by-zero" +# +++ need fix in future +#export CXXFLAGS="${CXXFLAGS} -Wdouble-promotion" +export CXXFLAGS="${CXXFLAGS} -Wduplicated-cond" +# +++ too many warnings. may be used some times +#export CXXFLAGS="${CXXFLAGS} -Weffc++" +export CXXFLAGS="${CXXFLAGS} -Wempty-body" +export CXXFLAGS="${CXXFLAGS} -Wendif-labels" +export CXXFLAGS="${CXXFLAGS} -Wenum-compare" +export CXXFLAGS="${CXXFLAGS} -Werror-implicit-function-declaration" +export CXXFLAGS="${CXXFLAGS} -Wextra" +# +++ need fix in future +#export CXXFLAGS="${CXXFLAGS} -Wfloat-conversion" +# +++ need fix in future +#export CXXFLAGS="${CXXFLAGS} -Wfloat-equal" +export CXXFLAGS="${CXXFLAGS} -Wformat" +export CXXFLAGS="${CXXFLAGS} -Wformat-contains-nul" +export CXXFLAGS="${CXXFLAGS} -Wformat-extra-args" +# +++ ignoring. probably need use some times +#export CXXFLAGS="${CXXFLAGS} -Wformat-nonliteral" +export CXXFLAGS="${CXXFLAGS} -Wformat-security" +export CXXFLAGS="${CXXFLAGS} -Wformat-signedness" +export CXXFLAGS="${CXXFLAGS} -Wformat-y2k" +export CXXFLAGS="${CXXFLAGS} -Wformat-zero-length" +#export CXXFLAGS="${CXXFLAGS} -Wformat=" +export CXXFLAGS="${CXXFLAGS} -Wframe-address" +#export CXXFLAGS="${CXXFLAGS} -Wframe-larger-than=" +export CXXFLAGS="${CXXFLAGS} -Wfree-nonheap-object" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wfunction-elimination" +export CXXFLAGS="${CXXFLAGS} -Whsa" +export CXXFLAGS="${CXXFLAGS} -Wignored-qualifiers" +# +++ failing now. Need enable after package updated +#export CXXFLAGS="${CXXFLAGS} -Wignored-attributes" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wimplicit" +#export CXXFLAGS="${CXXFLAGS} -Wimplicit-function-declaration" +#export CXXFLAGS="${CXXFLAGS} -Wimplicit-int" +#export CXXFLAGS="${CXXFLAGS} -Wimplicit-interface" +#export CXXFLAGS="${CXXFLAGS} -Wimplicit-procedure" +#export CXXFLAGS="${CXXFLAGS} -Wincompatible-pointer-types" +export CXXFLAGS="${CXXFLAGS} -Winherited-variadic-ctor" +export CXXFLAGS="${CXXFLAGS} -Winit-self" +# ignoting +#export CXXFLAGS="${CXXFLAGS} -Winline" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wint-conversion" +export CXXFLAGS="${CXXFLAGS} -Wint-to-pointer-cast" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Winteger-division" +#export CXXFLAGS="${CXXFLAGS} -Wintrinsic-shadow" +#export CXXFLAGS="${CXXFLAGS} -Wintrinsics-std" +export CXXFLAGS="${CXXFLAGS} -Winvalid-memory-model" +export CXXFLAGS="${CXXFLAGS} -Winvalid-offsetof" +export CXXFLAGS="${CXXFLAGS} -Winvalid-pch" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wjump-misses-init" +#export CXXFLAGS="${CXXFLAGS} -Wlarger-than-" +#export CXXFLAGS="${CXXFLAGS} -Wlarger-than=" +#export CXXFLAGS="${CXXFLAGS} -Wline-truncation" +export CXXFLAGS="${CXXFLAGS} -Wliteral-suffix" +export CXXFLAGS="${CXXFLAGS} -Wlogical-not-parentheses" +export CXXFLAGS="${CXXFLAGS} -Wlogical-op" +export CXXFLAGS="${CXXFLAGS} -Wlong-long" +export CXXFLAGS="${CXXFLAGS} -Wlto-type-mismatch" +export CXXFLAGS="${CXXFLAGS} -Wmain" +export CXXFLAGS="${CXXFLAGS} -Wmaybe-uninitialized" +export CXXFLAGS="${CXXFLAGS} -Wmemset-transposed-args" +export CXXFLAGS="${CXXFLAGS} -Wmisleading-indentation" +export CXXFLAGS="${CXXFLAGS} -Wmissing-braces" +export CXXFLAGS="${CXXFLAGS} -Wmissing-declarations" +export CXXFLAGS="${CXXFLAGS} -Wmissing-field-initializers" +export CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute" +export CXXFLAGS="${CXXFLAGS} -Wmissing-include-dirs" +export CXXFLAGS="${CXXFLAGS} -Wmissing-noreturn" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wmissing-parameter-type" +#export CXXFLAGS="${CXXFLAGS} -Wmissing-prototypes" +export CXXFLAGS="${CXXFLAGS} -Wmultichar" +# ignoring +#export CXXFLAGS="${CXXFLAGS} -Wmultiple-inheritance" +# ignoring +#export CXXFLAGS="${CXXFLAGS} -Wnamespaces" +export CXXFLAGS="${CXXFLAGS} -Wnarrowing" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wnested-externs" +export CXXFLAGS="${CXXFLAGS} -Wnoexcept" +export CXXFLAGS="${CXXFLAGS} -Wnon-template-friend" +export CXXFLAGS="${CXXFLAGS} -Wnon-virtual-dtor" +export CXXFLAGS="${CXXFLAGS} -Wnonnull" +export CXXFLAGS="${CXXFLAGS} -Wnonnull-compare" +#export CXXFLAGS="${CXXFLAGS} -Wnormalized" +export CXXFLAGS="${CXXFLAGS} -Wnormalized=nfkc" +export CXXFLAGS="${CXXFLAGS} -Wnull-dereference" +export CXXFLAGS="${CXXFLAGS} -Wodr" +# probably need fix it +#export CXXFLAGS="${CXXFLAGS} -Wold-style-cast" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wold-style-declaration" +#export CXXFLAGS="${CXXFLAGS} -Wold-style-definition" +export CXXFLAGS="${CXXFLAGS} -Wopenmp-simd" +export CXXFLAGS="${CXXFLAGS} -Woverflow" +export CXXFLAGS="${CXXFLAGS} -Woverlength-strings" +export CXXFLAGS="${CXXFLAGS} -Woverloaded-virtual" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Woverride-init" +#export CXXFLAGS="${CXXFLAGS} -Woverride-init-side-effects" +export CXXFLAGS="${CXXFLAGS} -Wpacked" +export CXXFLAGS="${CXXFLAGS} -Wpacked-bitfield-compat" +# +++ may be need fix in future? +#export CXXFLAGS="${CXXFLAGS} -Wpadded" +export CXXFLAGS="${CXXFLAGS} -Wparentheses" +export CXXFLAGS="${CXXFLAGS} -Wpedantic" +export CXXFLAGS="${CXXFLAGS} -Wplacement-new" +#export CXXFLAGS="${CXXFLAGS} -Wplacement-new=" +export CXXFLAGS="${CXXFLAGS} -Wpmf-conversions" +export CXXFLAGS="${CXXFLAGS} -Wpointer-arith" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wpointer-sign" +#export CXXFLAGS="${CXXFLAGS} -Wpointer-to-int-cast" +export CXXFLAGS="${CXXFLAGS} -Wpragmas" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wproperty-assign-default" +#export CXXFLAGS="${CXXFLAGS} -Wprotocol" +#export CXXFLAGS="${CXXFLAGS} -Wreal-q-constant" +#export CXXFLAGS="${CXXFLAGS} -Wrealloc-lhs" +#export CXXFLAGS="${CXXFLAGS} -Wrealloc-lhs-all" +export CXXFLAGS="${CXXFLAGS} -Wredundant-decls" +export CXXFLAGS="${CXXFLAGS} -Wreorder" +export CXXFLAGS="${CXXFLAGS} -Wreturn-local-addr" +export CXXFLAGS="${CXXFLAGS} -Wreturn-type" +export CXXFLAGS="${CXXFLAGS} -Wscalar-storage-order" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wselector" +export CXXFLAGS="${CXXFLAGS} -Wsequence-point" +export CXXFLAGS="${CXXFLAGS} -Wshadow" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wshadow-ivar" +export CXXFLAGS="${CXXFLAGS} -Wshift-count-negative" +export CXXFLAGS="${CXXFLAGS} -Wshift-count-overflow" +export CXXFLAGS="${CXXFLAGS} -Wshift-negative-value" +export CXXFLAGS="${CXXFLAGS} -Wshift-overflow" +#export CXXFLAGS="${CXXFLAGS} -Wshift-overflow=" +export CXXFLAGS="${CXXFLAGS} -Wsign-compare" +# +++ need fix in future +#export CXXFLAGS="${CXXFLAGS} -Wsign-conversion" +export CXXFLAGS="${CXXFLAGS} -Wsign-promo" +export CXXFLAGS="${CXXFLAGS} -Wsized-deallocation" +export CXXFLAGS="${CXXFLAGS} -Wsizeof-array-argument" +export CXXFLAGS="${CXXFLAGS} -Wsizeof-pointer-memaccess" +export CXXFLAGS="${CXXFLAGS} -Wstack-protector" +#export CXXFLAGS="${CXXFLAGS} -Wstack-usage=" +export CXXFLAGS="${CXXFLAGS} -Wstrict-aliasing" +#export CXXFLAGS="${CXXFLAGS} -Wstrict-aliasing=" +export CXXFLAGS="${CXXFLAGS} -Wstrict-null-sentinel" +# used before +#export CXXFLAGS="${CXXFLAGS} -Wstrict-overflow" +#export CXXFLAGS="${CXXFLAGS} -Wstrict-overflow=" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wstrict-prototypes" +#export CXXFLAGS="${CXXFLAGS} -Wstrict-selector-match" +export CXXFLAGS="${CXXFLAGS} -Wsubobject-linkage" +# +++ ignoring +#export CXXFLAGS="${CXXFLAGS} -Wsuggest-attribute=const" +#export CXXFLAGS="${CXXFLAGS} -Wsuggest-attribute=format" +export CXXFLAGS="${CXXFLAGS} -Wsuggest-attribute=noreturn" +# +++ ignoring +#export CXXFLAGS="${CXXFLAGS} -Wsuggest-attribute=pure" +#export CXXFLAGS="${CXXFLAGS} -Wsuggest-final-methods" +#export CXXFLAGS="${CXXFLAGS} -Wsuggest-final-types" +export CXXFLAGS="${CXXFLAGS} -Wsuggest-override" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wsurprising" +export CXXFLAGS="${CXXFLAGS} -Wswitch" +export CXXFLAGS="${CXXFLAGS} -Wswitch-bool" +export CXXFLAGS="${CXXFLAGS} -Wswitch-default" +export CXXFLAGS="${CXXFLAGS} -Wswitch-enum" +export CXXFLAGS="${CXXFLAGS} -Wsync-nand" +export CXXFLAGS="${CXXFLAGS} -Wsynth" +# ignoring +#export CXXFLAGS="${CXXFLAGS} -Wsystem-headers" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wtabs" +#export CXXFLAGS="${CXXFLAGS} -Wtarget-lifetime" +export CXXFLAGS="${CXXFLAGS} -Wtautological-compare" +# ignoring +#export CXXFLAGS="${CXXFLAGS} -Wtemplates" +export CXXFLAGS="${CXXFLAGS} -Wterminate" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wtraditional" +#export CXXFLAGS="${CXXFLAGS} -Wtraditional-conversion" +export CXXFLAGS="${CXXFLAGS} -Wtrampolines" +export CXXFLAGS="${CXXFLAGS} -Wtrigraphs" +export CXXFLAGS="${CXXFLAGS} -Wtype-limits" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wundeclared-selector" +export CXXFLAGS="${CXXFLAGS} -Wundef" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wunderflow" +export CXXFLAGS="${CXXFLAGS} -Wuninitialized" +export CXXFLAGS="${CXXFLAGS} -Wunknown-pragmas" +# +++ may be try use in future? +#export CXXFLAGS="${CXXFLAGS} -Wunsafe-loop-optimizations" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wunsuffixed-float-constants" +export CXXFLAGS="${CXXFLAGS} -Wunused" +export CXXFLAGS="${CXXFLAGS} -Wunused-but-set-parameter" +export CXXFLAGS="${CXXFLAGS} -Wunused-but-set-variable" +export CXXFLAGS="${CXXFLAGS} -Wunreachable-code" +export CXXFLAGS="${CXXFLAGS} -Wunused-const-variable=1" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wunused-dummy-argument" +export CXXFLAGS="${CXXFLAGS} -Wunused-function" +export CXXFLAGS="${CXXFLAGS} -Wunused-label" +export CXXFLAGS="${CXXFLAGS} -Wunused-local-typedefs" +export CXXFLAGS="${CXXFLAGS} -Wunused-macros" +export CXXFLAGS="${CXXFLAGS} -Wunused-parameter" +export CXXFLAGS="${CXXFLAGS} -Wunused-result" +export CXXFLAGS="${CXXFLAGS} -Wunused-value" +export CXXFLAGS="${CXXFLAGS} -Wunused-variable" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wuse-without-only" +# +++ need from time to time +#export CXXFLAGS="${CXXFLAGS} -Wuseless-cast" +export CXXFLAGS="${CXXFLAGS} -Wvarargs" +export CXXFLAGS="${CXXFLAGS} -Wvariadic-macros" +export CXXFLAGS="${CXXFLAGS} -Wvector-operation-performance" +export CXXFLAGS="${CXXFLAGS} -Wvirtual-inheritance" +export CXXFLAGS="${CXXFLAGS} -Wvirtual-move-assign" +export CXXFLAGS="${CXXFLAGS} -Wvla" +export CXXFLAGS="${CXXFLAGS} -Wvolatile-register-var" +export CXXFLAGS="${CXXFLAGS} -Wwrite-strings" +export CXXFLAGS="${CXXFLAGS} -Wzero-as-null-pointer-constant" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wzerotrip" +#export CXXFLAGS="${CXXFLAGS} -frequire-return-statement" + +run_configure +run_make +run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/gccsnapshot_sdl2.sh b/tools/ci/jobs/gccsnapshot_sdl2.sh new file mode 100755 index 000000000..66a9dcb71 --- /dev/null +++ b/tools/ci/jobs/gccsnapshot_sdl2.sh @@ -0,0 +1,334 @@ +#!/bin/bash + +export CC=gcc +export CXX=g++ +export LOGFILE=gcc-snapshot.log +export PATH=/usr/lib/gcc-snapshot/bin:$PATH + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-snapshot \ + make autoconf automake autopoint gettext libphysfs-dev \ + libxml2-dev libcurl4-gnutls-dev libpng-dev \ + libsdl2-gfx-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev + +export CXXFLAGS="-pedantic -ggdb3 -O2 -pipe -Wstrict-aliasing=2 \ +-Wstrict-overflow=1 -Wformat=1 -D_FORTIFY_SOURCE=2 \ +-std=gnu++1z -Wformat=1" + +#export CXXFLAGS="${CXXFLAGS} --all-warnings" +#export CXXFLAGS="${CXXFLAGS} --extra-warnings" +export CXXFLAGS="${CXXFLAGS} -W" +export CXXFLAGS="${CXXFLAGS} -Wabi" +# ignoring +#export CXXFLAGS="${CXXFLAGS} -Wabi-tag" +#export CXXFLAGS="${CXXFLAGS} -Wabi=" +export CXXFLAGS="${CXXFLAGS} -Waddress" +# +++ ignoring. may be can be fixed? +#export CXXFLAGS="${CXXFLAGS} -Waggregate-return" +export CXXFLAGS="${CXXFLAGS} -Waggressive-loop-optimizations" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Waliasing" +#export CXXFLAGS="${CXXFLAGS} -Walign-commons" +export CXXFLAGS="${CXXFLAGS} -Wall" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wampersand" +export CXXFLAGS="${CXXFLAGS} -Warray-bounds" +# +++ need try it +export CXXFLAGS="${CXXFLAGS} -Warray-bounds=2" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Warray-temporaries" +#export CXXFLAGS="${CXXFLAGS} -Wassign-intercept" +export CXXFLAGS="${CXXFLAGS} -Wattributes" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wbad-function-cast" +export CXXFLAGS="${CXXFLAGS} -Wbool-compare" +export CXXFLAGS="${CXXFLAGS} -Wbuiltin-macro-redefined" +#export CXXFLAGS="${CXXFLAGS} -Wc++-compat" +#export CXXFLAGS="${CXXFLAGS} -Wc++0x-compat" +#export CXXFLAGS="${CXXFLAGS} -Wc++11-compat" +export CXXFLAGS="${CXXFLAGS} -Wc++14-compat" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wc-binding-type" +#export CXXFLAGS="${CXXFLAGS} -Wc90-c99-compat" +#export CXXFLAGS="${CXXFLAGS} -Wc99-c11-compat" +export CXXFLAGS="${CXXFLAGS} -Wcast-align" +export CXXFLAGS="${CXXFLAGS} -Wcast-qual" +export CXXFLAGS="${CXXFLAGS} -Wchar-subscripts" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wcharacter-truncation" +export CXXFLAGS="${CXXFLAGS} -Wchkp" +export CXXFLAGS="${CXXFLAGS} -Wclobbered" +export CXXFLAGS="${CXXFLAGS} -Wcomment" +export CXXFLAGS="${CXXFLAGS} -Wcomments" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wcompare-reals" +export CXXFLAGS="${CXXFLAGS} -Wconditionally-supported" +# +++ need fix in future +#export CXXFLAGS="${CXXFLAGS} -Wconversion" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wconversion-extra" +export CXXFLAGS="${CXXFLAGS} -Wconversion-null" +export CXXFLAGS="${CXXFLAGS} -Wcoverage-mismatch" +export CXXFLAGS="${CXXFLAGS} -Wcpp" +export CXXFLAGS="${CXXFLAGS} -Wctor-dtor-privacy" +export CXXFLAGS="${CXXFLAGS} -Wdate-time" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wdeclaration-after-statement" +export CXXFLAGS="${CXXFLAGS} -Wdelete-incomplete" +export CXXFLAGS="${CXXFLAGS} -Wdelete-non-virtual-dtor" +export CXXFLAGS="${CXXFLAGS} -Wdeprecated" +export CXXFLAGS="${CXXFLAGS} -Wdeprecated-declarations" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wdesignated-init" +export CXXFLAGS="${CXXFLAGS} -Wdisabled-optimization" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wdiscarded-array-qualifiers" +#export CXXFLAGS="${CXXFLAGS} -Wdiscarded-qualifiers" +export CXXFLAGS="${CXXFLAGS} -Wdiv-by-zero" +# +++ need fix in future +#export CXXFLAGS="${CXXFLAGS} -Wdouble-promotion" +export CXXFLAGS="${CXXFLAGS} -Wduplicated-cond" +# +++ too many warnings. may be used some times +#export CXXFLAGS="${CXXFLAGS} -Weffc++" +export CXXFLAGS="${CXXFLAGS} -Wempty-body" +export CXXFLAGS="${CXXFLAGS} -Wendif-labels" +export CXXFLAGS="${CXXFLAGS} -Wenum-compare" +export CXXFLAGS="${CXXFLAGS} -Werror-implicit-function-declaration" +export CXXFLAGS="${CXXFLAGS} -Wextra" +# +++ need fix in future +#export CXXFLAGS="${CXXFLAGS} -Wfloat-conversion" +# +++ need fix in future +#export CXXFLAGS="${CXXFLAGS} -Wfloat-equal" +export CXXFLAGS="${CXXFLAGS} -Wformat" +export CXXFLAGS="${CXXFLAGS} -Wformat-contains-nul" +export CXXFLAGS="${CXXFLAGS} -Wformat-extra-args" +# +++ ignoring. probably need use some times +#export CXXFLAGS="${CXXFLAGS} -Wformat-nonliteral" +export CXXFLAGS="${CXXFLAGS} -Wformat-security" +export CXXFLAGS="${CXXFLAGS} -Wformat-signedness" +export CXXFLAGS="${CXXFLAGS} -Wformat-y2k" +export CXXFLAGS="${CXXFLAGS} -Wformat-zero-length" +#export CXXFLAGS="${CXXFLAGS} -Wformat=" +export CXXFLAGS="${CXXFLAGS} -Wframe-address" +#export CXXFLAGS="${CXXFLAGS} -Wframe-larger-than=" +export CXXFLAGS="${CXXFLAGS} -Wfree-nonheap-object" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wfunction-elimination" +export CXXFLAGS="${CXXFLAGS} -Whsa" +export CXXFLAGS="${CXXFLAGS} -Wignored-qualifiers" +# +++ failing now. Need enable after package updated +#export CXXFLAGS="${CXXFLAGS} -Wignored-attributes" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wimplicit" +#export CXXFLAGS="${CXXFLAGS} -Wimplicit-function-declaration" +#export CXXFLAGS="${CXXFLAGS} -Wimplicit-int" +#export CXXFLAGS="${CXXFLAGS} -Wimplicit-interface" +#export CXXFLAGS="${CXXFLAGS} -Wimplicit-procedure" +#export CXXFLAGS="${CXXFLAGS} -Wincompatible-pointer-types" +export CXXFLAGS="${CXXFLAGS} -Winherited-variadic-ctor" +export CXXFLAGS="${CXXFLAGS} -Winit-self" +# ignoting +#export CXXFLAGS="${CXXFLAGS} -Winline" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wint-conversion" +export CXXFLAGS="${CXXFLAGS} -Wint-to-pointer-cast" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Winteger-division" +#export CXXFLAGS="${CXXFLAGS} -Wintrinsic-shadow" +#export CXXFLAGS="${CXXFLAGS} -Wintrinsics-std" +export CXXFLAGS="${CXXFLAGS} -Winvalid-memory-model" +export CXXFLAGS="${CXXFLAGS} -Winvalid-offsetof" +export CXXFLAGS="${CXXFLAGS} -Winvalid-pch" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wjump-misses-init" +#export CXXFLAGS="${CXXFLAGS} -Wlarger-than-" +#export CXXFLAGS="${CXXFLAGS} -Wlarger-than=" +#export CXXFLAGS="${CXXFLAGS} -Wline-truncation" +export CXXFLAGS="${CXXFLAGS} -Wliteral-suffix" +export CXXFLAGS="${CXXFLAGS} -Wlogical-not-parentheses" +export CXXFLAGS="${CXXFLAGS} -Wlogical-op" +export CXXFLAGS="${CXXFLAGS} -Wlong-long" +export CXXFLAGS="${CXXFLAGS} -Wlto-type-mismatch" +export CXXFLAGS="${CXXFLAGS} -Wmain" +export CXXFLAGS="${CXXFLAGS} -Wmaybe-uninitialized" +export CXXFLAGS="${CXXFLAGS} -Wmemset-transposed-args" +export CXXFLAGS="${CXXFLAGS} -Wmisleading-indentation" +export CXXFLAGS="${CXXFLAGS} -Wmissing-braces" +export CXXFLAGS="${CXXFLAGS} -Wmissing-declarations" +export CXXFLAGS="${CXXFLAGS} -Wmissing-field-initializers" +export CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute" +export CXXFLAGS="${CXXFLAGS} -Wmissing-include-dirs" +export CXXFLAGS="${CXXFLAGS} -Wmissing-noreturn" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wmissing-parameter-type" +#export CXXFLAGS="${CXXFLAGS} -Wmissing-prototypes" +export CXXFLAGS="${CXXFLAGS} -Wmultichar" +# ignoring +#export CXXFLAGS="${CXXFLAGS} -Wmultiple-inheritance" +# ignoring +#export CXXFLAGS="${CXXFLAGS} -Wnamespaces" +export CXXFLAGS="${CXXFLAGS} -Wnarrowing" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wnested-externs" +export CXXFLAGS="${CXXFLAGS} -Wnoexcept" +export CXXFLAGS="${CXXFLAGS} -Wnon-template-friend" +export CXXFLAGS="${CXXFLAGS} -Wnon-virtual-dtor" +export CXXFLAGS="${CXXFLAGS} -Wnonnull" +export CXXFLAGS="${CXXFLAGS} -Wnonnull-compare" +#export CXXFLAGS="${CXXFLAGS} -Wnormalized" +export CXXFLAGS="${CXXFLAGS} -Wnormalized=nfkc" +export CXXFLAGS="${CXXFLAGS} -Wnull-dereference" +export CXXFLAGS="${CXXFLAGS} -Wodr" +# probably need fix it +#export CXXFLAGS="${CXXFLAGS} -Wold-style-cast" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wold-style-declaration" +#export CXXFLAGS="${CXXFLAGS} -Wold-style-definition" +export CXXFLAGS="${CXXFLAGS} -Wopenmp-simd" +export CXXFLAGS="${CXXFLAGS} -Woverflow" +export CXXFLAGS="${CXXFLAGS} -Woverlength-strings" +# disabled because exists some overloaded virtuals +#export CXXFLAGS="${CXXFLAGS} -Woverloaded-virtual" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Woverride-init" +#export CXXFLAGS="${CXXFLAGS} -Woverride-init-side-effects" +export CXXFLAGS="${CXXFLAGS} -Wpacked" +export CXXFLAGS="${CXXFLAGS} -Wpacked-bitfield-compat" +# +++ may be need fix in future? +#export CXXFLAGS="${CXXFLAGS} -Wpadded" +export CXXFLAGS="${CXXFLAGS} -Wparentheses" +export CXXFLAGS="${CXXFLAGS} -Wpedantic" +export CXXFLAGS="${CXXFLAGS} -Wplacement-new" +#export CXXFLAGS="${CXXFLAGS} -Wplacement-new=" +export CXXFLAGS="${CXXFLAGS} -Wpmf-conversions" +export CXXFLAGS="${CXXFLAGS} -Wpointer-arith" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wpointer-sign" +#export CXXFLAGS="${CXXFLAGS} -Wpointer-to-int-cast" +export CXXFLAGS="${CXXFLAGS} -Wpragmas" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wproperty-assign-default" +#export CXXFLAGS="${CXXFLAGS} -Wprotocol" +#export CXXFLAGS="${CXXFLAGS} -Wreal-q-constant" +#export CXXFLAGS="${CXXFLAGS} -Wrealloc-lhs" +#export CXXFLAGS="${CXXFLAGS} -Wrealloc-lhs-all" +export CXXFLAGS="${CXXFLAGS} -Wredundant-decls" +export CXXFLAGS="${CXXFLAGS} -Wreorder" +export CXXFLAGS="${CXXFLAGS} -Wreturn-local-addr" +export CXXFLAGS="${CXXFLAGS} -Wreturn-type" +export CXXFLAGS="${CXXFLAGS} -Wscalar-storage-order" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wselector" +export CXXFLAGS="${CXXFLAGS} -Wsequence-point" +export CXXFLAGS="${CXXFLAGS} -Wshadow" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wshadow-ivar" +export CXXFLAGS="${CXXFLAGS} -Wshift-count-negative" +export CXXFLAGS="${CXXFLAGS} -Wshift-count-overflow" +export CXXFLAGS="${CXXFLAGS} -Wshift-negative-value" +export CXXFLAGS="${CXXFLAGS} -Wshift-overflow" +#export CXXFLAGS="${CXXFLAGS} -Wshift-overflow=" +export CXXFLAGS="${CXXFLAGS} -Wsign-compare" +# +++ need fix in future +#export CXXFLAGS="${CXXFLAGS} -Wsign-conversion" +export CXXFLAGS="${CXXFLAGS} -Wsign-promo" +export CXXFLAGS="${CXXFLAGS} -Wsized-deallocation" +export CXXFLAGS="${CXXFLAGS} -Wsizeof-array-argument" +export CXXFLAGS="${CXXFLAGS} -Wsizeof-pointer-memaccess" +export CXXFLAGS="${CXXFLAGS} -Wstack-protector" +#export CXXFLAGS="${CXXFLAGS} -Wstack-usage=" +export CXXFLAGS="${CXXFLAGS} -Wstrict-aliasing" +#export CXXFLAGS="${CXXFLAGS} -Wstrict-aliasing=" +export CXXFLAGS="${CXXFLAGS} -Wstrict-null-sentinel" +# used before +#export CXXFLAGS="${CXXFLAGS} -Wstrict-overflow" +#export CXXFLAGS="${CXXFLAGS} -Wstrict-overflow=" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wstrict-prototypes" +#export CXXFLAGS="${CXXFLAGS} -Wstrict-selector-match" +export CXXFLAGS="${CXXFLAGS} -Wsubobject-linkage" +# +++ ignoring +#export CXXFLAGS="${CXXFLAGS} -Wsuggest-attribute=const" +#export CXXFLAGS="${CXXFLAGS} -Wsuggest-attribute=format" +export CXXFLAGS="${CXXFLAGS} -Wsuggest-attribute=noreturn" +# +++ ignoring +#export CXXFLAGS="${CXXFLAGS} -Wsuggest-attribute=pure" +#export CXXFLAGS="${CXXFLAGS} -Wsuggest-final-methods" +#export CXXFLAGS="${CXXFLAGS} -Wsuggest-final-types" +export CXXFLAGS="${CXXFLAGS} -Wsuggest-override" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wsurprising" +export CXXFLAGS="${CXXFLAGS} -Wswitch" +export CXXFLAGS="${CXXFLAGS} -Wswitch-bool" +# disable for SDL 2 because issue in headers +#export CXXFLAGS="${CXXFLAGS} -Wswitch-default" +export CXXFLAGS="${CXXFLAGS} -Wno-switch-default" +export CXXFLAGS="${CXXFLAGS} -Wswitch-enum" +export CXXFLAGS="${CXXFLAGS} -Wsync-nand" +export CXXFLAGS="${CXXFLAGS} -Wsynth" +# ignoring +#export CXXFLAGS="${CXXFLAGS} -Wsystem-headers" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wtabs" +#export CXXFLAGS="${CXXFLAGS} -Wtarget-lifetime" +export CXXFLAGS="${CXXFLAGS} -Wtautological-compare" +# ignoring +#export CXXFLAGS="${CXXFLAGS} -Wtemplates" +export CXXFLAGS="${CXXFLAGS} -Wterminate" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wtraditional" +#export CXXFLAGS="${CXXFLAGS} -Wtraditional-conversion" +export CXXFLAGS="${CXXFLAGS} -Wtrampolines" +export CXXFLAGS="${CXXFLAGS} -Wtrigraphs" +export CXXFLAGS="${CXXFLAGS} -Wtype-limits" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wundeclared-selector" +export CXXFLAGS="${CXXFLAGS} -Wundef" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wunderflow" +export CXXFLAGS="${CXXFLAGS} -Wuninitialized" +export CXXFLAGS="${CXXFLAGS} -Wunknown-pragmas" +# +++ may be try use in future? +#export CXXFLAGS="${CXXFLAGS} -Wunsafe-loop-optimizations" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wunsuffixed-float-constants" +export CXXFLAGS="${CXXFLAGS} -Wunused" +export CXXFLAGS="${CXXFLAGS} -Wunused-but-set-parameter" +export CXXFLAGS="${CXXFLAGS} -Wunused-but-set-variable" +export CXXFLAGS="${CXXFLAGS} -Wunreachable-code" +export CXXFLAGS="${CXXFLAGS} -Wunused-const-variable=1" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wunused-dummy-argument" +export CXXFLAGS="${CXXFLAGS} -Wunused-function" +export CXXFLAGS="${CXXFLAGS} -Wunused-label" +export CXXFLAGS="${CXXFLAGS} -Wunused-local-typedefs" +export CXXFLAGS="${CXXFLAGS} -Wunused-macros" +export CXXFLAGS="${CXXFLAGS} -Wunused-parameter" +export CXXFLAGS="${CXXFLAGS} -Wunused-result" +export CXXFLAGS="${CXXFLAGS} -Wunused-value" +export CXXFLAGS="${CXXFLAGS} -Wunused-variable" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wuse-without-only" +# +++ need from time to time +#export CXXFLAGS="${CXXFLAGS} -Wuseless-cast" +export CXXFLAGS="${CXXFLAGS} -Wvarargs" +export CXXFLAGS="${CXXFLAGS} -Wvariadic-macros" +export CXXFLAGS="${CXXFLAGS} -Wvector-operation-performance" +export CXXFLAGS="${CXXFLAGS} -Wvirtual-inheritance" +export CXXFLAGS="${CXXFLAGS} -Wvirtual-move-assign" +export CXXFLAGS="${CXXFLAGS} -Wvla" +export CXXFLAGS="${CXXFLAGS} -Wvolatile-register-var" +export CXXFLAGS="${CXXFLAGS} -Wwrite-strings" +export CXXFLAGS="${CXXFLAGS} -Wzero-as-null-pointer-constant" +# not for C++ +#export CXXFLAGS="${CXXFLAGS} -Wzerotrip" +#export CXXFLAGS="${CXXFLAGS} -frequire-return-statement" + +run_configure --with-sdl2 +run_make +run_check_warnings + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/mplint.sh b/tools/ci/jobs/mplint.sh new file mode 100755 index 000000000..0ec5421e4 --- /dev/null +++ b/tools/ci/jobs/mplint.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +export CC=gcc +export CXX=g++ +export LOGFILE=mplint_po.log + +source ./tools/ci/scripts/init.sh + +aptget_install gcc g++ git \ + make autoconf automake autopoint gettext + +export CXXFLAGS="-std=gnu++11" + +git clone https://gitlab.com/manaplus/mplint.git +cd mplint +run_configure_simple +run_make +cd .. +run_mplint $* + +source ./tools/ci/scripts/exit.sh + +exit 0 diff --git a/tools/ci/jobs/success.sh b/tools/ci/jobs/success.sh new file mode 100755 index 000000000..74d15a3ba --- /dev/null +++ b/tools/ci/jobs/success.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +export LOGFILE=bot.log +export name="ManaPlus" + +source ./tools/ci/scripts/init.sh +source ./tools/ci/scripts/bot.sh + +aptget_install ii psmisc + +bot_connect "manaplusbot2" +bot_join "#manaplus" + +export gitcommit=$(echo ${CI_BUILD_REF} | cut -c 1-7) + +bot_message "#manaplus" "[${C}02${name}:${CI_BUILD_REF_NAME}${R}] Build success: ${C}03${gitcommit}${R}. See https://gitlab.com/manaplus/manaplus/builds" +bot_exit + +exit 0 diff --git a/tools/ci/scripts/bot.sh b/tools/ci/scripts/bot.sh new file mode 100755 index 000000000..4724530a8 --- /dev/null +++ b/tools/ci/scripts/bot.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +export path=bot +export server=irc.freenode.net +export C="\0003" +export R="\x0f" + +function bot_connect { + mkdir ${path} + ii -s $server -i $path -n $1 -f $1 & + sleep 7s +} + +function bot_join { + echo "/j $1" > "$path/$server/in" + sleep 7s +} + +function bot_message { + echo -e $2 >bot/irc.freenode.net/${1}/in + sleep 1s +} + +function bot_exit { + sleep 5s + killall ii +} diff --git a/tools/ci/scripts/exit.sh b/tools/ci/scripts/exit.sh new file mode 100755 index 000000000..64b758ff1 --- /dev/null +++ b/tools/ci/scripts/exit.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +rm $ERRFILE diff --git a/tools/ci/scripts/init.sh b/tools/ci/scripts/init.sh new file mode 100755 index 000000000..053f36b64 --- /dev/null +++ b/tools/ci/scripts/init.sh @@ -0,0 +1,146 @@ +#!/bin/bash + +pwd +mkdir logs + +export dir=$(pwd) +export ERRFILE=${dir}/logs/${LOGFILE} + +cat /etc/os-release +$CC --version +$CXX --version + +rm ${ERRFILE} + +function aptget_update { + apt-get update + if [ "$?" != 0 ]; then + sleep 1s + apt-get update + if [ "$?" != 0 ]; then + sleep 1s + apt-get update + fi + fi +} + +function aptget_install { + apt-get -y -qq install $* + if [ "$?" != 0 ]; then + sleep 1s + apt-get -y -qq install $* + if [ "$?" != 0 ]; then + sleep 2s + apt-get -y -qq install $* + fi + fi +} + +function run_configure_simple { + rm $ERRFILE + autoreconf -i 2>$ERRFILE + result=$? + if [ "$result" != 0 ]; then + cat $ERRFILE + exit $result + fi + + rm $ERRFILE + ./configure $* 2>$ERRFILE + result=$? + if [ "$result" != 0 ]; then + cat $ERRFILE + exit $result + fi +} + +function run_configure { + run_configure_simple $* + + rm $ERRFILE + cd po + make update-gmo 2>$ERRFILE + result=$? + if [ "$result" != 0 ]; then + cat $ERRFILE + exit $result + fi + cd .. + + rm $ERRFILE + cd po + make update-po 2>$ERRFILE + result=$? + if [ "$result" != 0 ]; then + cat $ERRFILE + exit $result + fi + cd .. +} + +function run_cmake { + rm $ERRFILE + cmake . 2>$ERRFILE + result=$? + if [ "$result" != 0 ]; then + cat $ERRFILE + exit $result + fi +} + +function run_make { + rm $ERRFILE + make -j2 V=0 $* 2>$ERRFILE + result=$? + if [ "$result" != 0 ]; then + cat $ERRFILE + exit $result + fi +} + +function run_check_warnings { + DATA=$(cat $ERRFILE) + if [ "$DATA" != "" ]; + then + cat $ERRFILE + exit 1 + fi +} + +function run_h { + rm $ERRFILE + $CC -c -x c++ $* $includes */*/*/*.h */*/*.h */*.h *.h 2>$ERRFILE + DATA=$(cat $ERRFILE) + if [ "$DATA" != "" ]; + then + cat $ERRFILE + exit 1 + fi +} + +function run_tarball { + rm $ERRFILE + make dist-xz 2>$ERRFILE + result=$? + if [ "$result" != 0 ]; then + cat $ERRFILE + exit $result + fi + + mkdir $1 + cd $1 + tar xf ../*.tar.xz + cd manaplus* +} + +function run_mplint { + rm $ERRFILE + mplint/src/mplint $* >$ERRFILE + result=$? + if [ "$result" != 0 ]; then + cat $ERRFILE + exit $result + fi +} + +aptget_update -- cgit v1.2.3-70-g09d2