Skip to content

Commit

Permalink
Add working Github action files, except for Windows (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
lefessan authored Jan 23, 2023
1 parent 516b813 commit f550c9b
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 41 deletions.
53 changes: 43 additions & 10 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ on:
pull_request:
branches: [ gcos4gnucobol-3.x ]
push:
# manual run in actions tab - for all branches
workflow_dispatch:
branches: [ gcos4gnucobol-3.x ]

jobs:
build:
Expand All @@ -18,9 +17,12 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Configure git
run: git config --global core.symlinks false

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

- name: Install packages
run: |
Expand Down Expand Up @@ -49,28 +51,44 @@ jobs:
run: |
mkdir _build
echo "NPROC=`sysctl -n hw.ncpu`" >> $GITHUB_ENV
export TERM="vt100"
echo "TERM=$TERM" >> $GITHUB_ENV
- name: configure
run: |
cd _build
../configure --enable-cobc-internal-checks --enable-hardening
../configure --enable-cobc-internal-checks --enable-hardening --prefix /opt/cobol/gnucobol-gcos --exec-prefix /opt/cobol/gnucobol-gcos
- name: Upload config.log
uses: actions/upload-artifact@v3
if: failure()
with:
name: config.log
path: _build/config.log
# if: failure()

- name: make
run: |
cd _build
make --jobs=$((${NPROC}+1))
# make install must be done before make check, otherwise execution of
# generated COBOL files fail for a missing /usr/local/lib/libcob.dylib
- name: make install
run: |
cd _build
sudo make install
find /opt/cobol > install.log
- name: Upload install.log
uses: actions/upload-artifact@v3
with:
name: install.log
path: _build/install.log

- name: check
run: |
cd _build/tests
TERM=xterm make check TESTSUITEFLAGS="--jobs=$((${NPROC}+1))"
cd _build
make check TESTSUITEFLAGS="--jobs=$((${NPROC}+1))"
- name: Upload testsuite.log
uses: actions/upload-artifact@v3
Expand All @@ -79,7 +97,22 @@ jobs:
name: testsuite.log
path: _build/tests/testsuite.log

- name: install
- name: Cache newcob.val.Z
uses: actions/cache@v3
id: newcob
with:
path: _build/tests/cobol85/newcob.val.Z.cached
key: newcob

- name: Download newcob.val.Z
if: steps.newcob.outputs.cache-hit != 'true'
run: |
cd _build
sudo make install
cd _build/tests/cobol85
make newcob.val.Z
ln -f newcob.val.Z newcob.val.Z.cached
- name: NIST85 Test Suite
run: |
cd _build/tests/cobol85
ln -f newcob.val.Z.cached newcob.val.Z
make EXEC85 && make --jobs=$(($(nproc)+1)) test
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install packages
run: |
Expand Down
43 changes: 27 additions & 16 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Windows Workflow

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

jobs:
build:
Expand All @@ -20,13 +21,13 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install packages
uses: msys2/setup-msys2@v2
with:
update: true
install: autoconf automake libtool make mingw-w64-x86_64-db mingw-w64-x86_64-gmp libdb-devel mingw-w64-x86_64-gcc flex bison gmp-devel help2man texinfo
install: autoconf automake libtool make mingw-w64-x86_64-db mingw-w64-x86_64-gmp libdb-devel mingw-w64-x86_64-gcc flex bison gmp-devel help2man texinfo gettext-devel

- name: Set git user
run: |
Expand All @@ -35,7 +36,9 @@ jobs:
- name: bootstrap
run: |
./build_aux/bootstrap
./autogen.sh
autoconf
autoreconf --install --force
shell: msys2 {0}

- name: Build environment setup
Expand All @@ -46,7 +49,7 @@ jobs:
- name: configure
run: |
cd _build
../configure --enable-cobc-internal-checks --enable-hardening --prefix /opt/cobol/gnucobol-gcos
../configure --enable-cobc-internal-checks --enable-hardening --prefix /opt/cobol/gnucobol-gcos --exec-prefix /opt/cobol/gnucobol-gcos
shell: msys2 {0}

- name: Upload config.log
Expand All @@ -62,21 +65,29 @@ jobs:
make --jobs=$(($(nproc)+1))
shell: msys2 {0}

- name: install
run: |
cd _build
make install
find /opt/cobol > install.log
shell: msys2 {0}

- name: Upload install.log
uses: actions/upload-artifact@v3
with:
name: install.log
path: _build/install.log

- name: check
continue-on-error: true
run: |
cd _build/tests
make check TESTSUITEFLAGS="--jobs=$(($(nproc)+1))"
make check TESTSUITEFLAGS="--jobs=$(($(nproc)+1))" || (echo "not all tests passed")
make test
shell: msys2 {0}

- name: Upload testsuite.log
uses: actions/upload-artifact@v3
if: failure()
with:
name: testsuite.log
path: _build/tests/testsuite.log

- name: install
run: |
cd _build
make install
shell: msys2 {0}
31 changes: 17 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
*~
*.la
.libs
*.lo
*.o
*.so
*~

.deps
.libs
/_build
Makefile.in

/aclocal.m4
/aminclude_static.am
/autom4te.cache
/bin/cob-config
/bin/cob-config.1
/bin/cobcrun
/bin/cobcrun.1
/bin/cobfile
/bin/gcdiff
/_build
/cobc/cobc
/cobc/cobc.1
/cobc/parser.c
Expand All @@ -22,6 +28,7 @@
/cobc/ppparse.h
/cobc/scanner.c
/config.h
/config.h.in
/config.log
/config.status
/configure
Expand All @@ -38,41 +45,37 @@
/doc/stamp-vti
/doc/version.texi
/libtool
/po/*.gmo
/po/POTFILES
/Makefile
/po/[email protected]
/po/[email protected]
/po/*.gmo
/po/POTFILES
/pre-inst-env
/stamp-h1
/tarstamp.h
/tests/atconfig
/tests/atlocal
/tests/cobol85/copy/
/tests/cobol85/copyalt/
/tests/cobol85/DB/
/tests/cobol85/EXEC85
/tests/cobol85/EXEC85.cob
/tests/cobol85/IC/
/tests/cobol85/IF/
/tests/cobol85/IX/
/tests/cobol85/NC/
/tests/cobol85/newcob.val
/tests/cobol85/OB/
/tests/cobol85/RL/
/tests/cobol85/RW/
/tests/cobol85/SG/
/tests/cobol85/SM/
/tests/cobol85/SQ/
/tests/cobol85/ST/
/tests/cobol85/copy/
/tests/cobol85/copyalt/
/tests/cobol85/newcob.val
/tests/cobol85/summary.log
/tests/package.m4
/tests/run_prog_manual.sh
/tests/testsuite
/tests/testsuite.dir/
/tests/testsuite.log
Makefile
Makefile.in
aclocal.m4
aminclude_static.am
autom4te.cache
config.h.in
/tests/testsuite_manual

0 comments on commit f550c9b

Please sign in to comment.