Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support literals encoding conversions according to the literal type. #162

Open
wants to merge 189 commits into
base: gcos4gnucobol-3.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 187 commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
ebc0e65
GIT-specific settings, with CI setup and github workflow for Ubuntu, …
ddeclerck Feb 4, 2022
dfb449a
[GCOS] Add GCOS configuration file
ddeclerck Feb 4, 2022
50aedb0
Redispatch ChangeLog entries
nberth Jan 28, 2022
dd0e532
Thanks OCamlPro contributors
nberth Mar 29, 2022
acc6b97
Improve setup for CI jobs, with temporary focus on branch `gcos4gnuco…
nberth May 19, 2022
05bdc7b
Use github actions to emit a distribution archive and test logs
nberth May 20, 2022
270a5c6
Use ubuntu CI to measure coverage
nberth Jul 7, 2022
b183d9f
Adjust macos & windows CIs
nberth Jul 7, 2022
45befa5
Disable automated windows CI workflow
nberth Jul 8, 2022
0e2b01c
Fix handling of quotes in testsuite artifact name
nberth Jul 20, 2022
85251d9
Fix ubuntu CI
nberth Sep 30, 2022
ecbb7d7
Add working Github action files, except for Windows (#79)
lefessan Jan 23, 2023
54e2a7a
CI: check for c89 declaration (#97)
GitMensch Jun 13, 2023
f36a5c2
Add/Update Windows workflows
ddeclerck Mar 18, 2024
9163932
Update MSVC & MSYS1 CI
ddeclerck Jul 31, 2024
6019858
Upgrade versions of github actions used in CI
nberth Aug 20, 2024
4bfd3d5
Adjust MSVC workflow now that error popups are disabled by default
nberth Aug 23, 2024
64a6827
Further CI adjustments
nberth Aug 21, 2024
7688453
Enforce a 45 minutes timeout on Windows CI workflows
nberth Aug 26, 2024
f314e26
Stop using `-pedantic` flag in Coverage and Warnings workflow
nberth Aug 27, 2024
a0cc8e4
Various improvements in Warnings and Coverage workflow
nberth Aug 27, 2024
964d211
Cache `newcob.val` instead of an archive
nberth Aug 28, 2024
a5e2c4d
Run testsuite even on Debug target in Windows MSVC CI
nberth Aug 28, 2024
ad2d18d
Cache `newcob.val` in Windows MSYS2 workflow as well
nberth Aug 28, 2024
5ebda12
Update Windows workflows (upload testsuite.log on failure)
ddeclerck Sep 22, 2024
a23df52
CI: adding minimal build
GitMensch Sep 27, 2024
554e989
install cobc
AhmedMaher309 Jun 26, 2024
9dd561d
update tree.c/build_literal
AhmedMaher309 Jun 26, 2024
240441b
refactor the build_literal function
AhmedMaher309 Jun 26, 2024
4906c62
Delete .local directory
AhmedMaher309 Jun 26, 2024
3a3516b
remove configs
AhmedMaher309 Jun 26, 2024
066c355
added switch cases on category to build_literal fucntion
AhmedMaher309 Jun 27, 2024
310100e
Handling the case of N'text' in National literals, but not space padd…
AhmedMaher309 Jun 30, 2024
ca01844
handling N'text' case in National literals but no space padding conve…
AhmedMaher309 Jun 30, 2024
adb5437
added the parts of handling the padding in the literals
AhmedMaher309 Jul 2, 2024
b73d8d3
National literals space padding is now handled
AhmedMaher309 Jul 2, 2024
3b777ff
removed the build directory
AhmedMaher309 Jul 3, 2024
d846988
added a debug line to build_literal function
AhmedMaher309 Jul 4, 2024
9d08bca
Revert "added a debug line to build_literal function"
AhmedMaher309 Jul 6, 2024
a43bb00
made the encoding conversions in the two function that calls build_li…
AhmedMaher309 Jul 6, 2024
d5b040a
modify the code to make iconv_open(3) only twice when cobc starts
AhmedMaher309 Jul 6, 2024
bb9ead6
Refactor the valid_move function
AhmedMaher309 Jul 7, 2024
5b29a10
refactor validate_move function
AhmedMaher309 Jul 9, 2024
cc0c49f
refactored scan_x function
AhmedMaher309 Jul 14, 2024
781bf47
fixed indentation
AhmedMaher309 Jul 15, 2024
a8ad25e
Fix indentation
AhmedMaher309 Jul 15, 2024
f784511
refactored scanner.l/scan_x and typeck.c/trimmed size
AhmedMaher309 Jul 15, 2024
781e46f
refactor scan_x to handle the errors correct
AhmedMaher309 Jul 17, 2024
94a4eb1
refactoring scan_x (not finished)
AhmedMaher309 Jul 17, 2024
9c7a280
refactor scan_x
AhmedMaher309 Jul 19, 2024
36fba80
fixed the scan_x function and solved the failed tests that use it
AhmedMaher309 Jul 19, 2024
6ee58b6
added the errno cases to the literals builders
AhmedMaher309 Jul 27, 2024
d3b1b92
install cobc
AhmedMaher309 Jun 26, 2024
a1d20ec
update tree.c/build_literal
AhmedMaher309 Jun 26, 2024
3cc645d
refactor the build_literal function
AhmedMaher309 Jun 26, 2024
9d3cfc4
Delete .local directory
AhmedMaher309 Jun 26, 2024
ad74341
remove configs
AhmedMaher309 Jun 26, 2024
327d82d
added switch cases on category to build_literal fucntion
AhmedMaher309 Jun 27, 2024
e9011f0
Handling the case of N'text' in National literals, but not space padd…
AhmedMaher309 Jun 30, 2024
e1781b1
handling N'text' case in National literals but no space padding conve…
AhmedMaher309 Jun 30, 2024
245c048
added the parts of handling the padding in the literals
AhmedMaher309 Jul 2, 2024
56a170a
removed the build directory
AhmedMaher309 Jul 3, 2024
641f231
added a debug line to build_literal function
AhmedMaher309 Jul 4, 2024
3462d8d
Revert "added a debug line to build_literal function"
AhmedMaher309 Jul 6, 2024
b2d0299
made the encoding conversions in the two function that calls build_li…
AhmedMaher309 Jul 6, 2024
1b19b11
Refactor the valid_move function
AhmedMaher309 Jul 7, 2024
3e23a11
refactored scan_x function
AhmedMaher309 Jul 14, 2024
ff901ac
created a new function "cb_build_alphanumeric_for_figurative_constant…
AhmedMaher309 Jul 28, 2024
63633a9
added include guards to iconv.h and errno.h and used them with litera…
AhmedMaher309 Jul 28, 2024
4137550
refactoring the literals builders
AhmedMaher309 Jul 30, 2024
5fccee3
added tree.c/cb_build_UTF8_literal to handle the utf8 literals and us…
AhmedMaher309 Jul 31, 2024
b34b927
added guards around the iconv usages
AhmedMaher309 Jul 31, 2024
e5c1164
refactoring scanner.l and adding guards around iconv
AhmedMaher309 Jul 31, 2024
5e1758a
updated the cobc/Changelog
AhmedMaher309 Aug 1, 2024
c827f2e
refactoring: moving the declarations to the beginning of the function…
AhmedMaher309 Aug 3, 2024
fb224c2
created a new function cb_build_gcos_literal and used it with the gco…
AhmedMaher309 Aug 3, 2024
a7a651a
fixed the testcase in syn_defintion and the refactored typeck.c/valid…
AhmedMaher309 Aug 4, 2024
11ccdb2
merged cb_build_alphanumeric_literal , cb_build_national_literal, and…
AhmedMaher309 Aug 5, 2024
3fe593c
Revert "merged cb_build_alphanumeric_literal , cb_build_national_lite…
AhmedMaher309 Aug 6, 2024
f2d146f
refactor typeck.c/validate_move
AhmedMaher309 Aug 7, 2024
3bbf689
refactor scanner.l/scan_x
AhmedMaher309 Aug 7, 2024
cf306be
refactor scanner.l
AhmedMaher309 Aug 7, 2024
0a3f455
merged cb_build_alphanumeric_for_figurative_constant and cb_build_gco…
AhmedMaher309 Aug 7, 2024
36b7cd3
added poor-man's conversion for National literals in case of the abse…
AhmedMaher309 Aug 9, 2024
1dbbb4b
added the command line argument for the source encoding
AhmedMaher309 Aug 9, 2024
f0ac621
changed the default source encoding from UTF-8 to ISO-8859-15
AhmedMaher309 Aug 10, 2024
1ca9a64
refactor the command line argument for source encoding
AhmedMaher309 Aug 10, 2024
800481b
reverted the changes for validate_alphabet
AhmedMaher309 Aug 10, 2024
97b48b0
reverted changes in syn_definition.at
AhmedMaher309 Aug 10, 2024
b185d26
Revert "reverted changes in syn_definition.at"
AhmedMaher309 Aug 10, 2024
1c0e4c6
Revert "update test 132"
AhmedMaher309 Aug 10, 2024
2589ee4
Revert "fixed the testcase in syn_defintion and the refactored typeck…
AhmedMaher309 Aug 10, 2024
64f44d4
code refactoring
AhmedMaher309 Aug 10, 2024
196872a
adding the test for utf8
AhmedMaher309 Aug 10, 2024
50d90e5
refactoring tree.c/cb_build_UTF8_literal and cobc.c/process_command_line
AhmedMaher309 Aug 11, 2024
2e8d4a6
refactor tree.c/cb_build_national_literal
AhmedMaher309 Aug 12, 2024
a98d666
added the option to use the locale if the source encoding is not sp…
AhmedMaher309 Aug 12, 2024
0e5088c
replaced spaces indentation with tabs
AhmedMaher309 Aug 12, 2024
217d418
fixed cobc.c/initialize_cb_iconv
AhmedMaher309 Aug 12, 2024
7f58d1b
fix cobc.c/initialize_cb_iconv
AhmedMaher309 Aug 12, 2024
9274e03
updated cobc/Changelog
AhmedMaher309 Aug 13, 2024
a1f5a21
updated NEWS file
AhmedMaher309 Aug 13, 2024
acbb10e
add temporal (per file->UTF8 BOM) override
AhmedMaher309 Aug 14, 2024
78e5b35
refactored command line option for source encoding
AhmedMaher309 Aug 14, 2024
e61274d
added test for source encoding command line argument
AhmedMaher309 Aug 14, 2024
396a049
updated Changelog
AhmedMaher309 Aug 15, 2024
af26d94
added a chapter for encoding handling
AhmedMaher309 Aug 18, 2024
e23a8d6
modified the chapter for encoding handling in doc/gnucobol.texi
AhmedMaher309 Aug 18, 2024
3f9a1e7
updated doc/gnucobol.texi
AhmedMaher309 Aug 21, 2024
80efab6
fixed doc/gnucobol.texi
AhmedMaher309 Aug 21, 2024
92415e1
added new accepted encoding for source file in cobc.c/process_command…
AhmedMaher309 Aug 21, 2024
47485d0
update gnucobol.texi file
AhmedMaher309 Sep 4, 2024
dfa9872
minor adjustments to character encoding code
GitMensch Sep 9, 2024
286c7ef
cleanups to cobc:
GitMensch Sep 13, 2024
592deca
added command line option for the alphanumeric literals encoding
AhmedMaher309 Sep 29, 2024
d5eca86
fixing build and test issues
AhmedMaher309 Sep 29, 2024
2cd946a
fixing typeck/validate_alphabet
AhmedMaher309 Sep 29, 2024
5a57502
fixed build errors
AhmedMaher309 Sep 29, 2024
cfc4d85
install cobc
AhmedMaher309 Jun 26, 2024
845037b
update tree.c/build_literal
AhmedMaher309 Jun 26, 2024
1053ead
refactor the build_literal function
AhmedMaher309 Jun 26, 2024
362e616
Delete .local directory
AhmedMaher309 Jun 26, 2024
6d288e2
remove configs
AhmedMaher309 Jun 26, 2024
629a36a
added switch cases on category to build_literal fucntion
AhmedMaher309 Jun 27, 2024
d375186
Handling the case of N'text' in National literals, but not space padd…
AhmedMaher309 Jun 30, 2024
31a4548
handling N'text' case in National literals but no space padding conve…
AhmedMaher309 Jun 30, 2024
9491db5
added the parts of handling the padding in the literals
AhmedMaher309 Jul 2, 2024
a9abdce
removed the build directory
AhmedMaher309 Jul 3, 2024
c1b5f45
added a debug line to build_literal function
AhmedMaher309 Jul 4, 2024
736cb57
Revert "added a debug line to build_literal function"
AhmedMaher309 Jul 6, 2024
b5b1bb3
made the encoding conversions in the two function that calls build_li…
AhmedMaher309 Jul 6, 2024
d533621
modify the code to make iconv_open(3) only twice when cobc starts
AhmedMaher309 Jul 6, 2024
8ce5ae7
Refactor the valid_move function
AhmedMaher309 Jul 7, 2024
40fb88d
refactored scan_x function
AhmedMaher309 Jul 14, 2024
a4884df
fixed indentation
AhmedMaher309 Jul 15, 2024
f989b3b
added the errno cases to the literals builders
AhmedMaher309 Jul 27, 2024
cd348bb
install cobc
AhmedMaher309 Jun 26, 2024
5499c60
update tree.c/build_literal
AhmedMaher309 Jun 26, 2024
4fd32e8
refactor the build_literal function
AhmedMaher309 Jun 26, 2024
a7a0b00
Delete .local directory
AhmedMaher309 Jun 26, 2024
69d013d
remove configs
AhmedMaher309 Jun 26, 2024
fd4d1ef
added switch cases on category to build_literal fucntion
AhmedMaher309 Jun 27, 2024
69fb0c0
Handling the case of N'text' in National literals, but not space padd…
AhmedMaher309 Jun 30, 2024
e397f4f
handling N'text' case in National literals but no space padding conve…
AhmedMaher309 Jun 30, 2024
ca3adab
added the parts of handling the padding in the literals
AhmedMaher309 Jul 2, 2024
58327f0
removed the build directory
AhmedMaher309 Jul 3, 2024
30aaaef
added a debug line to build_literal function
AhmedMaher309 Jul 4, 2024
c1c3f05
Revert "added a debug line to build_literal function"
AhmedMaher309 Jul 6, 2024
40a04b7
made the encoding conversions in the two function that calls build_li…
AhmedMaher309 Jul 6, 2024
e3c59cc
Refactor the valid_move function
AhmedMaher309 Jul 7, 2024
44d306e
created a new function "cb_build_alphanumeric_for_figurative_constant…
AhmedMaher309 Jul 28, 2024
03d8e20
added include guards to iconv.h and errno.h and used them with litera…
AhmedMaher309 Jul 28, 2024
d8f5ce3
refactoring the literals builders
AhmedMaher309 Jul 30, 2024
01743b3
added guards around the iconv usages
AhmedMaher309 Jul 31, 2024
0b8ae2a
refactoring: moving the declarations to the beginning of the function…
AhmedMaher309 Aug 3, 2024
91ead86
created a new function cb_build_gcos_literal and used it with the gco…
AhmedMaher309 Aug 3, 2024
94c16d7
fixed the testcase in syn_defintion and the refactored typeck.c/valid…
AhmedMaher309 Aug 4, 2024
848146c
merged cb_build_alphanumeric_literal , cb_build_national_literal, and…
AhmedMaher309 Aug 5, 2024
62e8245
Revert "merged cb_build_alphanumeric_literal , cb_build_national_lite…
AhmedMaher309 Aug 6, 2024
edde333
refactor typeck.c/validate_move
AhmedMaher309 Aug 7, 2024
cd1b3f9
refactor scanner.l/scan_x
AhmedMaher309 Aug 7, 2024
32b50aa
refactor scanner.l
AhmedMaher309 Aug 7, 2024
1d2b225
merged cb_build_alphanumeric_for_figurative_constant and cb_build_gco…
AhmedMaher309 Aug 7, 2024
cf63837
added the command line argument for the source encoding
AhmedMaher309 Aug 9, 2024
a65c5b0
changed the default source encoding from UTF-8 to ISO-8859-15
AhmedMaher309 Aug 10, 2024
beed135
refactor the command line argument for source encoding
AhmedMaher309 Aug 10, 2024
4cb65f5
reverted the changes for validate_alphabet
AhmedMaher309 Aug 10, 2024
b29282e
code refactoring
AhmedMaher309 Aug 10, 2024
2006da4
adding the test for utf8
AhmedMaher309 Aug 10, 2024
c97f8d2
replaced spaces indentation with tabs
AhmedMaher309 Aug 12, 2024
576a0a6
refactored command line option for source encoding
AhmedMaher309 Aug 14, 2024
9f5df14
added a chapter for encoding handling
AhmedMaher309 Aug 18, 2024
4e7e9ee
modified the chapter for encoding handling in doc/gnucobol.texi
AhmedMaher309 Aug 18, 2024
047ac11
updated doc/gnucobol.texi
AhmedMaher309 Aug 21, 2024
c133620
fixed doc/gnucobol.texi
AhmedMaher309 Aug 21, 2024
a1a8fc3
update gnucobol.texi file
AhmedMaher309 Sep 4, 2024
c2b488d
minor adjustments to character encoding code
GitMensch Sep 9, 2024
5ecd83a
cleanups to cobc:
GitMensch Sep 13, 2024
9716d84
added command line option for the alphanumeric literals encoding
AhmedMaher309 Sep 29, 2024
79ae168
added command line option for the alphanumeric literals encoding
AhmedMaher309 Sep 29, 2024
8126cb3
fixing build and test issues
AhmedMaher309 Sep 29, 2024
11ed412
fixing typeck/validate_alphabet
AhmedMaher309 Sep 29, 2024
6691015
fixed build errors
AhmedMaher309 Sep 29, 2024
78b4b30
removed yywrap function
AhmedMaher309 Dec 31, 2024
d9e22c6
fixed the config directory
AhmedMaher309 Jan 11, 2025
01aab23
fixed merge conflicts
AhmedMaher309 Jan 19, 2025
b95e404
fix merge errors
AhmedMaher309 Jan 19, 2025
44091e6
fixing merge conflicts
AhmedMaher309 Jan 19, 2025
a9b05d2
fixing merge conflict error
AhmedMaher309 Jan 19, 2025
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
310 changes: 310 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,310 @@
name: Ubuntu Workflow

on:

pull_request:
branches: [ gcos4gnucobol-3.x ]
push:
# manual run in actions tab - for all branches
workflow_dispatch:


jobs:

build:
name: Build, test and provide nightly
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}

steps:
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install automake libtool libdb5.3-dev libxml2-dev libcjson-dev \
bison flex help2man gettext texlive

- name: Set git user
run: |
git config --global user.name github-actions
git config --global user.email [email protected]

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout code
uses: actions/checkout@v4

- name: Bootstrap
run: |
./build_aux/bootstrap

# FIXME: With TERM="dumb" `make check` fails with:
# ...
# 571: ACCEPT OMITTED (SCREEN) FAILED (run_accept.at:307)
# ...
# 693: ON EXCEPTION clause of DISPLAY FAILED (run_misc.at:6335)
# 695: LINE/COLUMN 0 exceptions FAILED (run_misc.at:6414)
# 694: EC-SCREEN-LINE-NUMBER and -STARTING-COLUMN FAILED (run_misc.at:6376)
# ...
# Failure cases read: "Error opening terminal: unknown." on
# stderr, and exit with code 1.
#
# Another alternative is passing `--with-curses=no` to the
# configure script, yet distcheck does call configure too...
#
- name: Build environment setup
run: |
mkdir _build
export TERM="vt100"
echo "TERM=$TERM" >> $GITHUB_ENV
echo "INSTALL_PATH=$(pwd)/_install" >> $GITHUB_ENV

- name: Configure
run: |
cd _build
../configure --enable-cobc-internal-checks \
--enable-hardening \
--prefix ${INSTALL_PATH}
echo "VERSION=PACKAGE_VERSION" | cpp -P -imacros config.h | tr -d \" \
>> $GITHUB_ENV

- name: Upload config.log
uses: actions/upload-artifact@v4
if: failure()
with:
name: config-${{ matrix.os }}-${{ github.job }}.log
path: _build/config.log

- name: Build
run: |
make -C _build --jobs=$(($(nproc)+1))

# note: distcheck also creates the dist tarball
- name: Build distribution archive & run tests
run: |
make -C _build distcheck \
TESTSUITEFLAGS="--jobs=$(($(nproc)+1))" \
--jobs=$(($(nproc)+1)) || \
make -C _build/gnucobol-$VERSION/_build/sub/tests check \
TESTSUITEFLAGS="--recheck --verbose"

- name: Upload testsuite.log
uses: actions/upload-artifact@v4
if: failure()
with:
# Assume there's only one directory matching `_build/gnucobol-*`:
name: testsuite-${{ matrix.os }}-${{ github.job }}.log
path: _build/gnucobol-${{ env.VERSION }}/_build/sub/tests/testsuite.log

- name: Upload dist tarball
uses: actions/upload-artifact@v4
with:
name: gnucobol-ci source distribution
path: _build/gnucobol*.tar*
if-no-files-found: error
retention-days: 0

- name: Cache newcob.val
uses: actions/cache@v4
with:
path: _build/tests/cobol85/newcob.val
key: newcob-val
save-always: true
enableCrossOsArchive: true

- name: NIST85 Test Suite
run: |
make -C _build/tests/cobol85 EXEC85 test \
--jobs=$(($(nproc)+1))

- name: Upload NIST85 Test Suite results
uses: actions/upload-artifact@v4
with:
name: NIST85 results on ${{ matrix.os }}-${{ github.job }}
path: |
_build/tests/cobol85/summary.*
_build/tests/cobol85/**/*.log
_build/tests/cobol85/**/*.out
_build/tests/cobol85/**/duration.txt

minmal_build:
name: Build and test with minimal dependencies
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
needs: build
runs-on: ${{ matrix.os }}

steps:

- name: Install packages
run: |
sudo apt-get update
sudo apt-get install build-essential libgmp-dev

- name: Get CI dist tarball
uses: actions/download-artifact@v4
with:
name: gnucobol-ci source distribution

- name: Build environment setup
run: |
tar -xvf gnucobol*.tar.* --strip-components=1
mkdir _build

- name: Configure
run: |
cd _build
../configure --disable-dependency-tracking \
--without-db --without-curses \
--without-xml2 --without-json \
--without-iconv --disable-nls

- name: Upload config.log
uses: actions/upload-artifact@v4
if: failure()
with:
name: config-${{ matrix.os }}-${{ github.job }}.log
path: _build/config.log

- name: Build
run: |
make -C _build --jobs=$(($(nproc)+1))

- name: run internal tests
run: |
make -C _build check TESTSUITEFLAGS="--jobs=$(($(nproc)+1))" || \
make -C _build check TESTSUITEFLAGS="--recheck --verbose"

- name: Upload testsuite.log
uses: actions/upload-artifact@v4
if: failure()
with:
name: testsuite-${{ matrix.os }}-${{ github.job }}.log
path: _build/tests/testsuite.log

- name: Cache newcob.val
uses: actions/cache@v4
with:
path: _build/tests/cobol85/newcob.val
key: newcob-val
save-always: true
enableCrossOsArchive: true

- name: NIST85 Test Suite
run: |
make -C _build/tests/cobol85 EXEC85 test \
--jobs=$(($(nproc)+1))

- name: Upload NIST85 Test Suite results
uses: actions/upload-artifact@v4
with:
name: NIST85 results on ${{ matrix.os }}-${{ github.job }}
path: |
_build/tests/cobol85/summary.*
_build/tests/cobol85/**/*.log
_build/tests/cobol85/**/*.out
_build/tests/cobol85/**/duration.txt


coverage:
name: Coverage and Warnings
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

# note: less dependencies as we don't generate a dist tarball, one additional for lcov
- name: Install dependencies
run: |
sudo apt-get install automake libtool libdb5.3-dev libxml2-dev \
libcjson-dev bison flex help2man gettext lcov

- name: Bootstrap
run: |
./build_aux/bootstrap

- name: Build environment setup
run: |
mkdir _build
export TERM="vt100"
echo "TERM=$TERM" >> $GITHUB_ENV

# note: add additional C compiler syntax checks here to not need
# _another_ CI run
#
# TODO: try and pass -pedantic via CPPFLAGS
- name: Configure
run: |
cd _build
../configure --enable-code-coverage \
CPPFLAGS="-Werror=declaration-after-statement" \
CC="gcc -std=c89"

- name: Upload config.log
uses: actions/upload-artifact@v4
if: failure()
with:
name: config-${{ matrix.os }}-${{ github.job }}.log
path: _build/config.log

- name: Build
run: |
make -C _build --jobs=$(($(nproc)+1))

- name: Coverage
run: |
# make -C _build check-code-coverage # <- (ignores errors)
make -C _build check \
TESTSUITEFLAGS="--jobs=$(($(nproc)+1))"
make -C _build code-coverage-capture \
CODE_COVERAGE_DIRECTORY="$(realpath .)/_build"

- name: Upload testsuite.log
uses: actions/upload-artifact@v4
if: failure()
with:
name: testsuite-${{ matrix.os }}-${{ github.job }}.log
path: _build/tests/testsuite.log

- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage
path: _build/GnuCOBOL-**-coverage

- name: Cache newcob.val
uses: actions/cache@v4
with:
path: _build/tests/cobol85/newcob.val
key: newcob-val
save-always: true
enableCrossOsArchive: true

- name: Extended coverage
run: |
make -C _build/tests/cobol85 EXEC85 test \
--jobs=$(($(nproc)+1)) \
--keep-going
make -C _build code-coverage-capture \
CODE_COVERAGE_OUTPUT_DIRECTORY=extended-coverage \
CODE_COVERAGE_OUTPUT_FILE=extended-coverage.info \
CODE_COVERAGE_DIRECTORY="$(realpath .)/_build"

- name: Upload extended coverage report
uses: actions/upload-artifact@v4
with:
name: extended-coverage
path: _build/extended-coverage

- name: Upload coverage to codecov
uses: codecov/codecov-action@v2
with:
# token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
directory: _build
# Shall fail until we have a working account on codecov.io
fail_ci_if_error: false # optional (default = false)
verbose: true # optional (default = false)
Loading
Loading