@@ -609,7 +609,7 @@ jobs:
609609 - name : Setup build environment
610610 shell : pwsh
611611 run : |
612- echo $env:MSYS_BIN >> $env:GITHUB_PATH
612+ # echo $env:MSYS_BIN >> $env:GITHUB_PATH note: we need to prefix
613613 echo HOME=$env:GITHUB_WORKSPACE >> $env:GITHUB_ENV
614614 If ("${{ matrix.target }}" -eq "release") {
615615 echo DISTDIR=GnuCOBOL_mingw >> $env:GITHUB_ENV
@@ -634,13 +634,15 @@ jobs:
634634
635635 - name : Install MSYS1 packages
636636 if : steps.restore-msys.outputs.cache-hit != 'true'
637- run : bash -lc "mingw-get install %MSYSPKGS%"
637+ run : |
638+ %MSYS_BIN%\bash -lc "mingw-get install %MSYSPKGS%"
638639
639640 - name : Cleanup MSYS1 env
640641 if : steps.restore-msys.outputs.cache-hit != 'true'
641642 run : |
642643 rmdir /Q /S %MSYS_ROOT%\docs
643644 rmdir /Q /S %MSYS_ROOT%\var
645+ rem if needed, use a newer multiarch GDB
644646 del /Q %MSYS_ROOT%\bin\gdb*
645647
646648 - name : Save MSYS1 cache
@@ -663,11 +665,12 @@ jobs:
663665 run : |
664666 curl -L %GMP_URL% -o gmp.tar.xz
665667 mkdir gmp && tar -xvf gmp.tar.xz -C gmp --strip-components=1
666- bash -lc "cd gmp && ./configure --prefix=/mingw --enable-fat --enable-shared --disable-static ABI=32 CFLAGS=\"-Wno-attributes -Wno-ignored-attributes\""
667- bash -lc "make -C gmp --jobs=$(($(nproc)+1))"
668+ %MSYS_BIN%\ bash -lc "cd gmp && ./configure --prefix=/mingw --enable-fat --enable-shared --disable-static ABI=32 CFLAGS=\"-Wno-attributes -Wno-ignored-attributes\""
669+ %MSYS_BIN%\ bash -lc "make -C gmp --jobs=$(($(nproc)+1))"
668670
669671 - name : Install GMP
670- run : bash -lc "make -C gmp install"
672+ run : |
673+ %MSYS_BIN%\bash -lc "make -C gmp install"
671674
672675 - name : Save GMP cache
673676 if : steps.restore-gmp.outputs.cache-hit != 'true'
@@ -689,25 +692,25 @@ jobs:
689692 run : |
690693 curl -L %PDCM_URL% -o pdcm.tar.gz
691694 mkdir pdcm && tar -xvf pdcm.tar.gz -C pdcm --strip-components=1
692- bash -lc "make -C pdcm/wincon --jobs=$(($(nproc)+1)) INFOEX=N CHTYPE_64=Y DEBUG=Y DLL=Y DLLNAME=libpdcurses LIBNAME=libpdcurses.dll"
693- bash -lc "make -C pdcm/wingui --jobs=$(($(nproc)+1)) CHTYPE_64=Y DEBUG=Y DLL=Y DLLNAME=libpdcurses LIBNAME=libpdcurses.dll"
694- bash -lc "make -C pdcm/vt --jobs=$(($(nproc)+1)) CHTYPE_64=Y DEBUG=Y DLL=Y DLLNAME=libpdcurses LIBNAME=libpdcurses.dll CFLAGS=\"-Wall -Wextra -pedantic -g -DPDCDEBUG -fPIC -DPDC_DLL_BUILD\""
695+ %MSYS_BIN%\ bash -lc "make -C pdcm/wincon --jobs=$(($(nproc)+1)) INFOEX=N CHTYPE_64=Y DEBUG=Y DLL=Y DLLNAME=libpdcurses LIBNAME=libpdcurses.dll"
696+ %MSYS_BIN%\ bash -lc "make -C pdcm/wingui --jobs=$(($(nproc)+1)) CHTYPE_64=Y DEBUG=Y DLL=Y DLLNAME=libpdcurses LIBNAME=libpdcurses.dll"
697+ %MSYS_BIN%\ bash -lc "make -C pdcm/vt --jobs=$(($(nproc)+1)) CHTYPE_64=Y DEBUG=Y DLL=Y DLLNAME=libpdcurses LIBNAME=libpdcurses.dll CFLAGS=\"-Wall -Wextra -pedantic -g -DPDCDEBUG -fPIC -DPDC_DLL_BUILD\""
695698 echo #define CHTYPE_64 > pdcm\pdcurses.h
696699 echo #define PDC_DLL_BUILD >> pdcm\pdcurses.h
697700 echo #include "pdcurses/curses.h" >> pdcm\pdcurses.h
698701
699702 - name : Install PDCursesMod
700703 run : |
701704 set HOME=%HOME%\pdcm
702- bash -lc "install wincon/libpdcurses.dll.a /mingw/lib/"
703- bash -lc "install wincon/libpdcurses.dll /mingw/bin/"
705+ %MSYS_BIN%\ bash -lc "install wincon/libpdcurses.dll.a /mingw/lib/"
706+ %MSYS_BIN%\ bash -lc "install wincon/libpdcurses.dll /mingw/bin/"
704707 rem The following three do not seem necessary (no failure if commented out)
705- bash -lc "install wincon/libpdcurses.dll /mingw/bin/libpdcurses-wincon.dll"
706- bash -lc "install wingui/libpdcurses.dll /mingw/bin/libpdcurses-wingui.dll"
707- bash -lc "install vt/libpdcurses.dll /mingw/bin/libpdcurses-vt.dll"
708- bash -lc "install -d /mingw/include/pdcurses"
709- bash -lc "install -m 0644 curses.h panel.h term.h /mingw/include/pdcurses/"
710- bash -lc "install -m 0644 pdcurses.h /mingw/include/"
708+ %MSYS_BIN%\ bash -lc "install wincon/libpdcurses.dll /mingw/bin/libpdcurses-wincon.dll"
709+ %MSYS_BIN%\ bash -lc "install wingui/libpdcurses.dll /mingw/bin/libpdcurses-wingui.dll"
710+ %MSYS_BIN%\ bash -lc "install vt/libpdcurses.dll /mingw/bin/libpdcurses-vt.dll"
711+ %MSYS_BIN%\ bash -lc "install -d /mingw/include/pdcurses"
712+ %MSYS_BIN%\ bash -lc "install -m 0644 curses.h panel.h term.h /mingw/include/pdcurses/"
713+ %MSYS_BIN%\ bash -lc "install -m 0644 pdcurses.h /mingw/include/"
711714
712715 - name : Save PDCursesMod cache
713716 if : steps.restore-pdcm.outputs.cache-hit != 'true'
@@ -732,15 +735,17 @@ jobs:
732735 curl -L %BDBP_URL%/mingw.patch -o mingw.patch
733736 curl -L %BDBP_URL%/clang_cxx_11.patch -o cx11.patch
734737 mkdir bdb && tar -xvf bdb.tar.gz -C bdb --strip-components=1
735- sed -i 's/_tcsclen/_mbslen/' bdb\src\os_windows\os_stat.c
736- bash -lc "patch -d bdb -p1 -i ../db-tls-m4-fix-pthread.patch"
737- bash -lc "patch -d bdb -p1 -i ../mingw.patch"
738- bash -lc "patch -d bdb -p1 -i ../cx11.patch"
739- bash -lc "cd bdb/build_unix && ../dist/configure --prefix=/mingw --enable-mingw --enable-debug --disable-static --disable-replication --disable-tcl --without-cryptography LIBCSO_LIBS=-lwsock32"
740- bash -lc "make -C bdb/build_unix --jobs=$(($(nproc)+1))"
738+ rem assume non-unicode, otherwise replace by wcslen (or MBCS: _mbstrlen)
739+ sed -i 's/_tcsclen/strlen/' bdb\src\os_windows\os_stat.c
740+ %MSYS_BIN%\bash -lc "patch -d bdb -p1 -i ../db-tls-m4-fix-pthread.patch"
741+ %MSYS_BIN%\bash -lc "patch -d bdb -p1 -i ../mingw.patch"
742+ %MSYS_BIN%\bash -lc "patch -d bdb -p1 -i ../cx11.patch"
743+ %MSYS_BIN%\bash -lc "lt_cv_deplibs_check_method=${lt_cv_deplibs_check_method='pass_all'}; cd bdb/build_unix && ../dist/configure --prefix=/mingw --enable-mingw --enable-debug --disable-static --disable-replication --disable-tcl --without-cryptography LIBCSO_LIBS=-lwsock32 CC=/mingw/bin/gcc CPPFLAGS='-Wno-incompatible-pointer-types -Wno-old-style-definition'"
744+ %MSYS_BIN%\bash -lc "make -C bdb/build_unix --jobs=$(($(nproc)+1))"
741745
742746 - name : Install BDB
743- run : bash -lc "make -C bdb/build_unix install"
747+ run : |
748+ %MSYS_BIN%\bash -lc "make -C bdb/build_unix install"
744749
745750 - name : Save BDB cache
746751 if : steps.restore-bdb.outputs.cache-hit != 'true'
@@ -762,11 +767,12 @@ jobs:
762767 run : |
763768 curl -L %XML2_URL% -o libxml2.tar.gz
764769 mkdir libxml2 && tar -xvf libxml2.tar.gz -C libxml2 --strip-components=1
765- bash -lc "cd libxml2 && ./autogen.sh && ./configure --prefix=/mingw --enable-debug"
766- bash -lc "make -C libxml2 --jobs=$(($(nproc)+1))"
770+ %MSYS_BIN%\ bash -lc "cd libxml2 && ./autogen.sh && ./configure --prefix=/mingw --enable-debug"
771+ %MSYS_BIN%\ bash -lc "make -C libxml2 --jobs=$(($(nproc)+1))"
767772
768773 - name : Install LibXML2
769- run : bash -lc "make -C libxml2 install"
774+ run : |
775+ %MSYS_BIN%\bash -lc "make -C libxml2 install"
770776
771777 - name : Save LibXML2 cache
772778 if : steps.restore-xml2.outputs.cache-hit != 'true'
@@ -783,12 +789,12 @@ jobs:
783789 - name : Configure GnuCOBOL
784790 run : |
785791 mkdir _build
786- bash -lc "cd _build && ../configure --with-db --with-indexed=db --with-xml2 --with-json=local --with-curses=pdcurses --prefix=/mingw %CFGOPT% CPPFLAGS=-I../libcob LDFLAGS=-lintl"
792+ %MSYS_BIN%\ bash -lc "cd _build && ../configure --with-db --with-indexed=db --with-xml2 --with-json=local --with-curses=pdcurses --prefix=/mingw %CFGOPT% CPPFLAGS=-I../libcob LDFLAGS=-lintl"
787793 rem CPPFLAGS to be dropped after merging the adjustment in configure.ac
788794
789795 - name : Build GnuCOBOL
790796 run : |
791- bash -lc "make -C _build --jobs=$(($(nproc)+1)) CPATH=$(pwd)"
797+ %MSYS_BIN%\ bash -lc "make -C _build --jobs=$(($(nproc)+1)) CPATH=$(pwd)"
792798 rem Note: the extra CPATH above is only required in debug builds
793799 rem (otherwise gcc invoked from cobc does not find libcob.h [pre-inst-env]), for some reason...
794800
@@ -812,7 +818,7 @@ jobs:
812818 # perl -pi -e 's/^# OBNC1M/\$skip{IF106A} = 1; # OBNC1M/' tests/cobol85/report.pl
813819 # bash -lc "make -C _build test --jobs=$(($(nproc)+1)) CPATH=$(pwd) || echo \"WARNING: NIST85 did not pass!\""
814820 run : |
815- bash -lc "make -C _build test --jobs=$(($(nproc)+1)) CPATH=$(pwd)"
821+ %MSYS_BIN%\ bash -lc "make -C _build test --jobs=$(($(nproc)+1)) CPATH=$(pwd)"
816822 rem Note: the extra CPATH above is only required in debug builds
817823 rem (otherwise gcc invoked from cobc does not find libcob.h [atlocal]), for some reason...
818824
@@ -829,15 +835,25 @@ jobs:
829835
830836 - name : Adjust testsuite
831837 run : |
832- cd tests\testsuite.src
833- sed -i '/AT_SETUP(\[temporary path invalid\])/a AT_SKIP_IF(\[true\])' used_binaries.at
838+ rem skip test as it sometimes works and sometimes not...
839+ rem instead of
840+ rem sed -i '/AT_SETUP(\[temporary path invalid\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/used_binaries.at
841+ rem use
842+ %MSYS_BIN%\bash -lc "sed -i '/used_binaries/{N;/temporary path invalid/{N;N;N;N;s/traceon/traceon; echo \"workflow:1\">\"$at_check_line_file\"; at_fn_check_skip 77/;}}' tests/testsuite"
843+
844+ rem change to expected fail if there's an error specific to the CI that we don't want to change
845+ rem in the testsuite for expected result (should normally only be a temporary thing)
846+ rem instead of
847+ rem sed -i '/AT_SETUP(\[Compare FLOAT-LONG with floating-point literal\])/a AT_XFAIL_IF(\[true\])' tests/testsuite.src/run_fundamental.at
848+ rem use
849+ rem sed -i '/run_fundamental/{N;/Compare FLOAT-LONG with floating-point literal/{N;s/at_xfail=no/at_xfail=yes/;}}' tests/testsuite
834850
835851 - name : Run testsuite
836852 continue-on-error : true
837853 run : |
838854 rem to work around regular hangs we run NIST first, then the internal
839855 rem and the later only with 2 jobs -> --jobs does not seem to have any effect in this env
840- bash -lc "make -C _build check TESTSUITEFLAGS=\"--jobs=2\" CPATH=$(pwd)"
856+ %MSYS_BIN%\ bash -lc "make -C _build check TESTSUITEFLAGS=\"--jobs=2\" CPATH=$(pwd)"
841857 rem Note: the extra CPATH above is only required in debug builds
842858 rem (otherwise gcc invoked from cobc does not find libcob.h [atlocal]), for some reason...
843859
@@ -849,7 +865,8 @@ jobs:
849865 path : _build/tests/testsuite.log
850866
851867 - name : Package GnuCOBOL MinGW nightly
852- run : bash -lc "make -C _build distmingw"
868+ run : |
869+ %MSYS_BIN%\bash -lc "make -C _build distmingw"
853870
854871 - name : Upload GnuCOBOL_mingw
855872 uses : actions/upload-artifact@v4
0 commit comments