Adds LTO to the CI build for Linux, which bring it as close as possible
to the planned formal release, which will additionally use FDO.
Adds some helper scripts to work with FDO files.
Improves the build notes for how to create and use FDO files.
This fixes the prior logic that relies on the (*)curses library
and header existing in compiler-derived default locations
such as /usr/include, and /usr/lib. However, if the package manager
happens to not install them there, then they will not be found
and the check will fail.
Four scenarios:
1. `./configure` or `./configure --enable-debug=no` produce:
(no mention of debugger; configure continues)
2. `./configure --enable-debug=wrong` produces:
configure: error: --enable-debug=wrong was requested but the value "wrong" is invalid
(terminates with exit code 1)
3. `./configure --enable-debug` produces:
config.h:
defines C_DEBUG 1
With only ncurses library installed:
configure: debugger was requested, finding curses library ...
checking for NCURSES... yes
configure: debugger enabled using the ncurses library
Makefile:
CPPFLAGS = ... -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -I/usr/local/ncurses ...
LIBS = ... -L/usr/local/ncurses -lncurses -ltinfo ...
With only ncursesw installed:
configure: debugger was requested, finding curses library ...
checking for NCURSES... no
checking for NCURSESW... yes
configure: debugger enabled using the ncursesw library
Makefile:
CPPFLAGS = ... -I/opt/ncursesw ...
LIBS = ... -L/opt/ncursesw -lncursesw ...
With only pdcurses isntalled:
configure: debugger was requested, finding curses library ...
checking for NCURSES... no
checking for NCURSESW... no
checking for PDCURSES... yes
configure: debugger enabled using the pdcurses library
Makefile:
CPPFLAGS = ... -I/usr/local/pdcurses ...
LIBS = ... -L/usr/local/pdcurses -lpdcurses -ltinfo ...
Without any curses library installed:
configure: debugger was requested, finding curses library ...
checking for NCURSES... no
checking for NCURSESW... no
checking for PDCURSES... no
configure: error: Package requirements were not met:
<pkg-info prints info about missing package>
(terminates with exit code 1)
4. `./configure --enable-debug=heavy` produces same as above, but:
config.h:
defines C_DEBUG 1
defines C_HEAVY_DEBUG 1
The configure message mentions heavy, for example:
configure: debugger was requested, finding curses library ...
checking for NCURSES... yes
configure: debugger with heavy debugging enabled using the ncurses library
- For each OS, builds of the default compiler plus the
latest-supported compilers are run. When multiple operating systems
are supported (such as Ubuntu 16.04 and latest), a build on
the oldest OS using its default compiler is also performed.
- Debug builds are used because they often are more thorough at
detecting coding issues (debug warning counts are higher).
- Runtime dynamic sanitizers are added and serialized per-compiler.
Their build and runtime log-files are xz-compressed, and then
GitHub's asset upload Zips the log directory.
- Each workflow now holds the maximum allowed compiler warnings
per-build, so we can have tighter control of when new warnings
are introduced (that would otherwise pass if still below the
maximum)
- Use of github's new 'cache' feature has been leveraged to restore
the brew, macports, and msys2 environments to eliminate the
lenghthy setup times for those environments. If a new cache
is needed, then we simply increment the cache `key:` value and
the next CI run will archive new caches. (Note that GitHub has a
400MB limit on cache size however they have already said they
are raising it - so we might be able to cache out longest running
job which is MSYS+Clang)
- Where it makes sense, multi-line workflow statements have been
broken out into .github/scripts as files to make the workflow YAML
leaner and more readable, while giving us a richer environment in
the scripts.