OCamlPro / gnucobol

A clone of the sourceforge GnuCOBOL compiler from COBOL to C.
https://get-superbol.com
GNU Lesser General Public License v3.0
16 stars 21 forks source link

CI: split "Windows workflow" into two: MSYS64 and VisualStudio #103

Open GitMensch opened 1 year ago

GitMensch commented 1 year ago

The first will just be renamed, the second will get its dependencies with vcpkg (there's likely a pre-configured action for that, which caches its results), then compile (both win32 and x64) and run the testsuite with the current autofonce binaries.

lefessan commented 1 year ago

To be honest, though we generate Windows binaries by cross-compilation, we haven't tried them yet... We will probably find bugs, typically related to how shells/which shells are started to run the testsuite. I haven't checked how the testsuite is currently ran under Windows on the current CI, which Unix env is being used for that and so on...

GitMensch commented 1 year ago

To execute those with a cross-compile environment the normal handling with atlocal is used (the CI worker has to have Wine installed) - but the current GC environment is already MSYS64, as far as I remember. Testing those is therefore done by the normal make check.

To build and test VC generated binaries "manually" with the testsuite the following procedure is currently used:

This is the setup part (it seems reasonable to replace sed by powershell, but no one has done that so far):

echo setup local configuration

sed "build_windows\config.h.in" -e's/\(#define CONFIGURED_ISAM *\) [A-Z]*/\1 BDB/g' -e's/\(#define CONFIGURED_CURSES *\) [A-Z]*/\1 PDCURSES/g' -e's/\(#define CONFIGURED_XML *\) [A-Z]*/\1 XML2/g' -e's/\(#define CONFIGURED_JSON *\) [A-Z]*/\1 CJSON_CJSON/g' >  "config.h"

powershell -ExecutionPolicy ByPass -File build_windows\maketarstamp.ps1 > tarstamp.h

then, for the actual test:

Using autofonce could replace the last part, dropping the need for a POSIX shell environment (still either autofonce would have to either replace some of the tools or need sed/grep/diff/tr binaries in its PATH).