1
0
Fork 0
Commit graph

71 commits

Author SHA1 Message Date
krcroft
d56afec70b Only run config heavy if our repo has commits 2020-01-13 00:26:11 +01:00
Patryk Obara
d859decccb Update allowed warnings limits 2020-01-11 20:52:55 +01:00
krcroft
35bebab0e6 Cache the PVS-Studio package 2020-01-11 20:10:43 +01:00
krcroft
5885ba0851 Add PVS-Studio to our static-analysis workflow
PVS-Studio is a tool for detecting bugs and security weaknesses in the
source code of programs, written in C, C++, C# and Java. It works under
64-bit systems in Windows, Linux and macOS environments, and can analyze
source code intended for 32-bit, 64-bit and embedded ARM platforms.

https://www.viva64.com/en/pvs-studio/

It's very easy to setup and run headless on Linux; although on Windows I
couldn't find instruction describing how to automate the install.

It quickly generates a relatively unique set of issues versus those
reported by Clang's and Coverity's checkers, so it's valuable in that
regard.

Output can be customized in various formats (stdout, gcc-error format,
or HTML), and it produces a nice summary of results that (for a later PR)
we can capture and compare against a maximum warning count similar
to our other checkers.

This PR generates a full HTML report with embedded source snippets,
which are uploaded as a zipped asset.
2020-01-11 20:10:43 +01:00
Patryk Obara
eaf6970dbd Update allowed warnings limits 2020-01-09 22:50:47 +01:00
krcroft
a9c2f3680f Create a combined Clang+GCC cache under Windows
GitHub's ongoing issue of limitting the cache size has recently
been fixed (https://github.com/actions/cache/issues/6), so this
PR create a combined Clang+GCC cache for separate 32-bit and 64-bit
architectures under Windows.
2020-01-07 23:41:46 +01:00
krcroft
312a763509 Verify Markdown documents in linting workflow
Also re-order to perform shellcheck first because it
requires the least installation work compared to pylint
and markdownlint.  The reason being if we're going to fail
during shellcheck, then we fail faster (and leave heavier
tasks for further down the line).
2020-01-07 19:28:12 +01:00
krcroft
82622ffda1 Reinstate Coverity scanning 2020-01-03 16:55:22 +01:00
Patryk Obara
cac7ba136c Update allowed warnings limits 2019-12-29 08:12:28 +01:00
Patryk Obara
9d04beaea4 Update allowed warnings limits 2019-12-26 03:23:19 +01:00
Patryk Obara
6a0d712404 Re-enable screenshots feature for snapshot builds
With SDL2 in place, the silent dependency on libpng12 on Ubuntu 16.04 is
now gone. Unfortunately, development packages for libpng16 are named
differently for Ubuntu 16.04 and 18.04, so we can't add new package to
the global list.
2019-12-26 03:23:19 +01:00
Patryk Obara
44c7fb9165 Update CI to target SDL2 2019-12-26 03:23:19 +01:00
krcroft
12ab0da9c8 Adjust time at which "Config heavy" runs
An unfortunately pattern has emerged where Chocolately's repository
servers have been offline or returning error-codes at roughly
5am GMT.

This commit moves the start inside "office hours" for the
majority of Chocolatey's user-base:
 - 9am in California & Vancouver
 - 11am in New York
 - 4pm in London
 - 5pm in Poland and Germany
2019-12-19 20:01:32 +01:00
Patryk Obara
15c694af21 Update allowed warnings limits 2019-12-19 00:09:44 +01:00
krcroft
12ee84cfd4 Fixed --enabled-debug on Windows MSYS2
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
2019-12-14 17:51:11 +01:00
Patryk Obara
ba88bd97d7 Avoid libpng 1.2 dependency for Ubuntu releases
This is a temporary fix for Ubuntu-based distributions. When SDL1 will
be replaced by SDL2, we'll be able to revert this change.

Fixes: #84
2019-12-12 22:52:19 +01:00
krcroft
3a930b639e Pull the entire repo for release bulds 2019-12-12 21:17:34 +01:00
krcroft
c11ef240b3 Back-out change for the release build (?) 2019-12-12 21:17:34 +01:00
krcroft
d698586779 Only checkout the target branch 2019-12-12 21:17:34 +01:00
krcroft
d22d48b527 Add all OSes to the workflow 2019-12-11 20:30:19 +01:00
krcroft
5beac8e310 Remove unecessary string quotes 2019-12-11 20:30:19 +01:00
krcroft
7fe6f7f04c Add -DNDEBUG to common release flags 2019-12-11 20:30:19 +01:00
krcroft
39509f7378 Configure and build all allowable configurations 2019-12-11 20:30:19 +01:00
krcroft
77a95af478 Stop submitting builds to Coverity for now 2019-12-10 23:27:07 +01:00
Patryk Obara
4bf4997251 Update allowed warnings limits 2019-12-10 15:41:38 +01:00
Patryk Obara
c4e68070a6 Update allowed warnings limits 2019-12-10 12:40:07 +01:00
Patryk Obara
e942a02fcb Add CFLAGS to Linux release job
Some files in libs are using C compiler, so we need to make sure build
all flags are set for C as well.  Als, add -pipe to avoid temporary
files.

This is intermediary step before merging this step back with build
scripts for other jobs.
2019-12-09 07:22:15 +01:00
Patryk Obara
735a043fd5 Invalidate MSYS2 cache based on week number 2019-12-09 07:22:15 +01:00
Patryk Obara
6c7c32c2a9 Create "Inject version" step for Linux release job 2019-12-09 07:22:15 +01:00
Patryk Obara
db264703ed Add more files to Windows snapshots 2019-12-09 07:22:15 +01:00
Patryk Obara
f89416a20a Update version in config.h and resource script 2019-12-09 07:22:15 +01:00
Patryk Obara
9efa980b05 Create Windows dev release job 2019-12-09 07:22:15 +01:00
Patryk Obara
d1e5891c6a Reorganize Windows workflow file
Move MSYS2 jobs up (these jobs will be updated often, due to warning
limits), and use the same matrix style as Linux and macOS jobs.

Move MSVC jobs down, so the future release build will be closer to
the end of file.
2019-12-09 07:22:15 +01:00
Patryk Obara
03e94559e9 Rename directory with Visual Studio solution
Name 'visualc_net' invokes old names for Visual Studio
(Visual Studio .NET 2002 or 2003), which has no relation to content of
this subdirectory.

Also, by renaming this directory we mitigate chance, that during
merge-in from svn/trunk git will automatically inject some values from
from upstream, incompatible version of solution files. By sheer
luck this might happen without causing a conflict. Never happened so
far, but there's no point in risking it.
2019-12-09 07:22:15 +01:00
krcroft
959417f6de Update allowed warnings limits 2019-12-07 19:08:47 +01:00
Patryk Obara
88cdd8d3a0 Use python explicitly in pwsh 2019-12-07 16:24:27 +01:00
Patryk Obara
6a4eabe9fa Revert "Test if double-zip is detected"
This reverts commit cb9e448ff7faa901f19e86f609d615fbe0ae9d18.
2019-12-05 23:35:15 +01:00
Patryk Obara
c5cff3ef91 Test if double-zip is detected 2019-12-05 23:35:15 +01:00
Patryk Obara
9576db91c1 Use fixed name for a GitHub-generated zip 2019-12-05 23:35:15 +01:00
Patryk Obara
5d644b4f53 Create package-specific README file 2019-12-05 23:35:15 +01:00
Patryk Obara
88ab53d3a3 Create Linux dev release job
Job uses Ubuntu 16.04 to get the widest compatibiity with Linux
distributions.

Snapshot builds are uploaded as job artifacts, but GitHub Actions do not
allow to specify compression program/params yet (everything is forced
into a zip).
2019-12-05 23:35:15 +01:00
Patryk Obara
15ca669199 Update allowed warnings limits 2019-12-03 06:49:08 +01:00
krcroft
b55b43f543 Use PRIuPTR and define it for Windows GCC 64-bit 2019-12-03 05:12:28 +01:00
krcroft
8a5a539f9a Cleanup printf types and explicitly state unused vars 2019-12-03 05:12:28 +01:00
Patryk Obara
91c5b4ac81 Revert "Enable Coverity "streams""
It didn't work. Coverity classifies all our builds as belonging to the
stream called 'dosbox-staging' and there's no option to change it.

This reverts commit e86e6e353e.
2019-12-02 09:35:21 +01:00
Patryk Obara
e86e6e353e Enable Coverity "streams" 2019-12-01 19:49:15 +01:00
Patryk Obara
b05985fab4 Update allowed warnings limits 2019-11-29 06:27:14 +01:00
Patryk Obara
f5b52cb966 Use matrix to simplify Linux workflow
After many iterations, we now have really streamlined workflow file without
duplicated jobs.  It also looks very similar to macOS file.
2019-11-29 06:27:14 +01:00
krcroft
cbdd1f3382 Perform a daily Coverity Scan of the master branch
Details at: https://scan.coverity.com/dashboard

The Coverity software (Roughly 1.5GB worth unpacked from a tarball)
can only be downloaded from an authentication web sessions, so I've
uploaded it to my Google drive and use 'gdown' to pull it inside
the workflow. This sounds ugly, but it's not too bad: Coverity last
updated their software nine months ago, so this will be a once-a-year
change, maybe twice.

The Google drive ID, SHA256 checksum, and other specifics are all
variables at the top YAML, so they're easy to adjust when Coverity
makes their next update. The download, extraction, and sha256
verification are all done in parallel via pipes, and extracting to
/dev/shm. It should be pretty quick. Edit: it is; 4 seconds.

To keep the tarball small, I remove unecessary bits (but this is
optional), before tar & zstd compressing it:
``` bash
rm -rf closure-compiler jars jdk11 jre node support-angularjs
cd bin
rm *java* *js* *php* *python* *ruby*
```
2019-11-28 08:52:13 +01:00
krcroft
61a437c27f Override architecture and host for 32-bit windows builds
Noted by vogons.org user jmarsh; thank you.
2019-11-26 16:42:42 +01:00