Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 50 additions & 33 deletions .github/workflows/build_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ jobs:
- name: Setup build environment
shell: pwsh
run: |
echo $env:MSYS_BIN >> $env:GITHUB_PATH
# echo $env:MSYS_BIN >> $env:GITHUB_PATH note: we need to prefix
echo HOME=$env:GITHUB_WORKSPACE >> $env:GITHUB_ENV
If ("${{ matrix.target }}" -eq "release") {
echo DISTDIR=GnuCOBOL_mingw >> $env:GITHUB_ENV
Expand All @@ -634,13 +634,15 @@ jobs:

- name: Install MSYS1 packages
if: steps.restore-msys.outputs.cache-hit != 'true'
run: bash -lc "mingw-get install %MSYSPKGS%"
run: |
%MSYS_BIN%\bash -lc "mingw-get install %MSYSPKGS%"

- name: Cleanup MSYS1 env
if: steps.restore-msys.outputs.cache-hit != 'true'
run: |
rmdir /Q /S %MSYS_ROOT%\docs
rmdir /Q /S %MSYS_ROOT%\var
rem if needed, use a newer multiarch GDB
del /Q %MSYS_ROOT%\bin\gdb*

- name: Save MSYS1 cache
Expand All @@ -663,11 +665,12 @@ jobs:
run: |
curl -L %GMP_URL% -o gmp.tar.xz
mkdir gmp && tar -xvf gmp.tar.xz -C gmp --strip-components=1
bash -lc "cd gmp && ./configure --prefix=/mingw --enable-fat --enable-shared --disable-static ABI=32 CFLAGS=\"-Wno-attributes -Wno-ignored-attributes\""
bash -lc "make -C gmp --jobs=$(($(nproc)+1))"
%MSYS_BIN%\bash -lc "cd gmp && ./configure --prefix=/mingw --enable-fat --enable-shared --disable-static ABI=32 CFLAGS=\"-Wno-attributes -Wno-ignored-attributes\""
%MSYS_BIN%\bash -lc "make -C gmp --jobs=$(($(nproc)+1))"

- name: Install GMP
run: bash -lc "make -C gmp install"
run: |
%MSYS_BIN%\bash -lc "make -C gmp install"

- name: Save GMP cache
if: steps.restore-gmp.outputs.cache-hit != 'true'
Expand All @@ -689,25 +692,25 @@ jobs:
run: |
curl -L %PDCM_URL% -o pdcm.tar.gz
mkdir pdcm && tar -xvf pdcm.tar.gz -C pdcm --strip-components=1
bash -lc "make -C pdcm/wincon --jobs=$(($(nproc)+1)) INFOEX=N CHTYPE_64=Y DEBUG=Y DLL=Y DLLNAME=libpdcurses LIBNAME=libpdcurses.dll"
bash -lc "make -C pdcm/wingui --jobs=$(($(nproc)+1)) CHTYPE_64=Y DEBUG=Y DLL=Y DLLNAME=libpdcurses LIBNAME=libpdcurses.dll"
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\""
%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"
%MSYS_BIN%\bash -lc "make -C pdcm/wingui --jobs=$(($(nproc)+1)) CHTYPE_64=Y DEBUG=Y DLL=Y DLLNAME=libpdcurses LIBNAME=libpdcurses.dll"
%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\""
echo #define CHTYPE_64 > pdcm\pdcurses.h
echo #define PDC_DLL_BUILD >> pdcm\pdcurses.h
echo #include "pdcurses/curses.h" >> pdcm\pdcurses.h

- name: Install PDCursesMod
run: |
set HOME=%HOME%\pdcm
bash -lc "install wincon/libpdcurses.dll.a /mingw/lib/"
bash -lc "install wincon/libpdcurses.dll /mingw/bin/"
%MSYS_BIN%\bash -lc "install wincon/libpdcurses.dll.a /mingw/lib/"
%MSYS_BIN%\bash -lc "install wincon/libpdcurses.dll /mingw/bin/"
rem The following three do not seem necessary (no failure if commented out)
bash -lc "install wincon/libpdcurses.dll /mingw/bin/libpdcurses-wincon.dll"
bash -lc "install wingui/libpdcurses.dll /mingw/bin/libpdcurses-wingui.dll"
bash -lc "install vt/libpdcurses.dll /mingw/bin/libpdcurses-vt.dll"
bash -lc "install -d /mingw/include/pdcurses"
bash -lc "install -m 0644 curses.h panel.h term.h /mingw/include/pdcurses/"
bash -lc "install -m 0644 pdcurses.h /mingw/include/"
%MSYS_BIN%\bash -lc "install wincon/libpdcurses.dll /mingw/bin/libpdcurses-wincon.dll"
%MSYS_BIN%\bash -lc "install wingui/libpdcurses.dll /mingw/bin/libpdcurses-wingui.dll"
%MSYS_BIN%\bash -lc "install vt/libpdcurses.dll /mingw/bin/libpdcurses-vt.dll"
%MSYS_BIN%\bash -lc "install -d /mingw/include/pdcurses"
%MSYS_BIN%\bash -lc "install -m 0644 curses.h panel.h term.h /mingw/include/pdcurses/"
%MSYS_BIN%\bash -lc "install -m 0644 pdcurses.h /mingw/include/"

- name: Save PDCursesMod cache
if: steps.restore-pdcm.outputs.cache-hit != 'true'
Expand All @@ -732,15 +735,17 @@ jobs:
curl -L %BDBP_URL%/mingw.patch -o mingw.patch
curl -L %BDBP_URL%/clang_cxx_11.patch -o cx11.patch
mkdir bdb && tar -xvf bdb.tar.gz -C bdb --strip-components=1
sed -i 's/_tcsclen/_mbslen/' bdb\src\os_windows\os_stat.c
bash -lc "patch -d bdb -p1 -i ../db-tls-m4-fix-pthread.patch"
bash -lc "patch -d bdb -p1 -i ../mingw.patch"
bash -lc "patch -d bdb -p1 -i ../cx11.patch"
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"
bash -lc "make -C bdb/build_unix --jobs=$(($(nproc)+1))"
rem assume non-unicode, otherwise replace by wcslen (or MBCS: _mbstrlen)
sed -i 's/_tcsclen/strlen/' bdb\src\os_windows\os_stat.c
%MSYS_BIN%\bash -lc "patch -d bdb -p1 -i ../db-tls-m4-fix-pthread.patch"
%MSYS_BIN%\bash -lc "patch -d bdb -p1 -i ../mingw.patch"
%MSYS_BIN%\bash -lc "patch -d bdb -p1 -i ../cx11.patch"
%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'"
%MSYS_BIN%\bash -lc "make -C bdb/build_unix --jobs=$(($(nproc)+1))"

- name: Install BDB
run: bash -lc "make -C bdb/build_unix install"
run: |
%MSYS_BIN%\bash -lc "make -C bdb/build_unix install"

- name: Save BDB cache
if: steps.restore-bdb.outputs.cache-hit != 'true'
Expand All @@ -762,11 +767,12 @@ jobs:
run: |
curl -L %XML2_URL% -o libxml2.tar.gz
mkdir libxml2 && tar -xvf libxml2.tar.gz -C libxml2 --strip-components=1
bash -lc "cd libxml2 && ./autogen.sh && ./configure --prefix=/mingw --enable-debug"
bash -lc "make -C libxml2 --jobs=$(($(nproc)+1))"
%MSYS_BIN%\bash -lc "cd libxml2 && ./autogen.sh && ./configure --prefix=/mingw --enable-debug"
%MSYS_BIN%\bash -lc "make -C libxml2 --jobs=$(($(nproc)+1))"

- name: Install LibXML2
run: bash -lc "make -C libxml2 install"
run: |
%MSYS_BIN%\bash -lc "make -C libxml2 install"

- name: Save LibXML2 cache
if: steps.restore-xml2.outputs.cache-hit != 'true'
Expand All @@ -783,12 +789,12 @@ jobs:
- name: Configure GnuCOBOL
run: |
mkdir _build
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"
%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"
rem CPPFLAGS to be dropped after merging the adjustment in configure.ac

- name: Build GnuCOBOL
run: |
bash -lc "make -C _build --jobs=$(($(nproc)+1)) CPATH=$(pwd)"
%MSYS_BIN%\bash -lc "make -C _build --jobs=$(($(nproc)+1)) CPATH=$(pwd)"
rem Note: the extra CPATH above is only required in debug builds
rem (otherwise gcc invoked from cobc does not find libcob.h [pre-inst-env]), for some reason...

Expand All @@ -812,7 +818,7 @@ jobs:
# perl -pi -e 's/^# OBNC1M/\$skip{IF106A} = 1; # OBNC1M/' tests/cobol85/report.pl
# bash -lc "make -C _build test --jobs=$(($(nproc)+1)) CPATH=$(pwd) || echo \"WARNING: NIST85 did not pass!\""
run: |
bash -lc "make -C _build test --jobs=$(($(nproc)+1)) CPATH=$(pwd)"
%MSYS_BIN%\bash -lc "make -C _build test --jobs=$(($(nproc)+1)) CPATH=$(pwd)"
rem Note: the extra CPATH above is only required in debug builds
rem (otherwise gcc invoked from cobc does not find libcob.h [atlocal]), for some reason...

Expand All @@ -829,15 +835,25 @@ jobs:

- name: Adjust testsuite
run: |
cd tests\testsuite.src
sed -i '/AT_SETUP(\[temporary path invalid\])/a AT_SKIP_IF(\[true\])' used_binaries.at
rem skip test as it sometimes works and sometimes not...
rem instead of
rem sed -i '/AT_SETUP(\[temporary path invalid\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/used_binaries.at
rem use
%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"

rem change to expected fail if there's an error specific to the CI that we don't want to change
rem in the testsuite for expected result (should normally only be a temporary thing)
rem instead of
rem sed -i '/AT_SETUP(\[Compare FLOAT-LONG with floating-point literal\])/a AT_XFAIL_IF(\[true\])' tests/testsuite.src/run_fundamental.at
rem use
rem sed -i '/run_fundamental/{N;/Compare FLOAT-LONG with floating-point literal/{N;s/at_xfail=no/at_xfail=yes/;}}' tests/testsuite

- name: Run testsuite
continue-on-error: true
run: |
rem to work around regular hangs we run NIST first, then the internal
rem and the later only with 2 jobs -> --jobs does not seem to have any effect in this env
bash -lc "make -C _build check TESTSUITEFLAGS=\"--jobs=2\" CPATH=$(pwd)"
%MSYS_BIN%\bash -lc "make -C _build check TESTSUITEFLAGS=\"--jobs=2\" CPATH=$(pwd)"
rem Note: the extra CPATH above is only required in debug builds
rem (otherwise gcc invoked from cobc does not find libcob.h [atlocal]), for some reason...

Expand All @@ -849,7 +865,8 @@ jobs:
path: _build/tests/testsuite.log

- name: Package GnuCOBOL MinGW nightly
run: bash -lc "make -C _build distmingw"
run: |
%MSYS_BIN%\bash -lc "make -C _build distmingw"

- name: Upload GnuCOBOL_mingw
uses: actions/upload-artifact@v4
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/ibm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ name: IBM Power & Z
on:
pull_request:
branches: [ gitside-master ]
push:
branches: [ gitside-master ]
# manual run in actions tab - for all branches
workflow_dispatch:

env:
HOME: /home/runner

jobs:
build:
timeout-minutes: 10
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -52,7 +51,8 @@ jobs:
--enable-cobc-internal-checks \
--enable-hardening \
--prefix=/opt/gnucobol \
--with-pkgversion="GnuCOBOL CI"
--with-pkgversion="GnuCOBOL CI" \
CPPFLAGS="-DCOB_NON_ALIGNED $CPPFLAGS"
echo "VERSION=PACKAGE_VERSION" | cpp -P -imacros config.h | tr -d \" >> $GITHUB_ENV

- name: Build GnuCOBOL
Expand All @@ -79,6 +79,7 @@ jobs:
sed -i '/AT_SETUP(\[EXAMINE TALLYING\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_extensions.at

- name: Run testsuite
continue-on-error: true
run: |
make -C _build check TESTSUITEFLAGS="--jobs=$(($(nproc)+1))" || \
make -C _build check TESTSUITEFLAGS="--recheck --verbose"
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,11 @@ jobs:

- name: Install packages
run: |
brew update
brew update || brew update # seldomly failing in most cases rerun works
brew install autoconf automake libtool bison \
help2man texinfo \
berkeley-db@5 json-c libiconv
help2man texinfo libiconv \
berkeley-db@5 json-c || (echo "brew install returned $?")
echo "$HOMEBREW_ROOT/bison/bin" >> $GITHUB_PATH
echo "LDFLAGS=-L$HOMEBREW_ROOT/berkeley-db@5/lib -L$HOMEBREW_ROOT/libiconv/lib ${LDFLAGS}" >> $GITHUB_ENV
echo "CPPFLAGS=-I$HOMEBREW_ROOT/berkeley-db@5/include -I$HOMEBREW_ROOT/libiconv/include ${CPPFLAGS}" >> $GITHUB_ENV

- name: Restore VISAM cache
if: ${{ matrix.isam == 'visam' }}
Expand Down Expand Up @@ -105,6 +103,9 @@ jobs:
--enable-hardening \
--with-curses=ncurses \
--prefix=/opt/cobol/gnucobol \
--with-iconv --with-libiconv-prefix="$HOMEBREW_ROOT/libiconv" \
BDB_CFLAGS="-I$HOMEBREW_ROOT/berkeley-db@5/include" \
BDB_LIBS="-L$HOMEBREW_ROOT/berkeley-db@5/lib -ldb" \
CPPFLAGS="-DREAD_WRITE_NEEDS_FLUSH $CPPFLAGS"

- name: Build GnuCOBOL
Expand Down Expand Up @@ -133,6 +134,8 @@ jobs:
- name: Adjust testsuite
run: |
cd tests/testsuite.src
sed -i '' '/AT_SETUP(\[runtime check: write to internal storage (1)\])/a \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Best is to always leave a note why we exclude something.

AT_SKIP_IF(\[true\])' run_misc.at
sed -i '' '/AT_SETUP(\[INDEXED file SUPPRESS WHEN ALL \+ KEYCHECK\])/a \
AT_SKIP_IF(\[true\])' run_file.at
sed -i '' '/AT_SETUP(\[EXTFH: using ISAM callback\])/a \
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/windows-msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ env:
VCVARS64: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat

VCPKG_ROOT: C:\vcpkg
# libxml2 package break in 2.14.5, see https://github.com/microsoft/vcpkg/issues/47155
VCPKGS32: mpir:x86-windows pdcurses:x86-windows berkeleydb:x86-windows libxml2:x86-windows cjson:x86-windows
VCPKGS64: mpir:x64-windows pdcurses:x64-windows berkeleydb:x64-windows libxml2:x64-windows cjson:x64-windows

Expand Down Expand Up @@ -85,7 +86,7 @@ jobs:
run: vcpkg integrate install

- name: Install VCPKG packages
if: steps.restore-vcpkg.outputs.cache-hit != 'true'
# note: always done to update the cache as-needed
run: vcpkg install %VCPKGS%

- name: Save VCPKG cache
Expand Down Expand Up @@ -148,6 +149,7 @@ jobs:
- name: Build GnuCOBOL
run: |
cd build_windows
set CL=/I "%VCPKG_ROOT%\installed\${{ matrix.arch }}-windows\include\libxml2"
"%MSBUILD%" .\vs2019\GnuCOBOL.sln /m /p:Platform=${{ matrix.arch }} /p:Configuration=${{ matrix.target }}

- name: Install MSYS2 packages
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/windows-msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- name: Install packages
uses: msys2/setup-msys2@v2
with:
release: false
update: true
msystem: ucrt64
install: autoconf automake make libtool flex bison
Expand Down Expand Up @@ -71,7 +72,7 @@ jobs:
build:
needs: prepare
runs-on: windows-latest
timeout-minutes: 20
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -115,6 +116,7 @@ jobs:
- name: Install packages
uses: msys2/setup-msys2@v2
with:
release: false
update: true
msystem: ${{ matrix.sys }}
install: autoconf automake make libtool flex bison
Expand All @@ -128,6 +130,7 @@ jobs:
if: ${{ matrix.sys != 'mingw32' }} # MSYS2 does not provide 32bit builds for it any more
uses: msys2/setup-msys2@v2
with:
release: false
msystem: ${{ matrix.sys }}
install: mingw-w64-${{ matrix.env }}-db

Expand Down
4 changes: 3 additions & 1 deletion Makefile.am
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please explain why this is needed, especially if it isn't in 3.x

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As stated in my previous comment:

Then there was also an unused exclusion (statment.def) - which is weird since it appears to be used in 3.x. So I prefered to just request the error to be ignored.
And I aso add to pass an extra option to ignore the negative count.

So it's just because there are more errors/warnings in 4.x - don't know why.

Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ CODE_COVERAGE_IGNORE_PATTERN= \
"*/libcob/statement.def"
# silence some warnings in lcov2
CODE_COVERAGE_LCOV_OPTIONS_DEFAULT= \
--ignore-errors source --rc geninfo_unexecuted_blocks=1
--ignore-errors source --rc geninfo_unexecuted_blocks=1 --ignore-errors negative
CODE_COVERAGE_LCOV_RMOPTS_DEFAULT= \
--ignore-errors unused

# files shipped with the package that should be 755'ed:
FILES_TO_BE_EXECUTABLE = $(dist_noinst_SCRIPTS) \
Expand Down
Loading