Skip to content

Initial Handling of Non-Void Java Method Calls in GnuCOBOL #78

Initial Handling of Non-Void Java Method Calls in GnuCOBOL

Initial Handling of Non-Void Java Method Calls in GnuCOBOL #78

Workflow file for this run

name: Windows MSYS2 with Java interoperability
on:
pull_request:
branches: [ java-interop ]
push:
# manual run in actions tab - for all branches
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- { sys: mingw64, env: x86_64 }
- { sys: mingw32, env: i686 }
- { sys: ucrt64, env: ucrt-x86_64 }
- { sys: clang64, env: clang-x86_64 }
runs-on: windows-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout code
uses: actions/checkout@v4
- name: System setup
uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
update: true
install: autoconf automake libtool make flex bison help2man texinfo
gmp-devel gettext-devel
mingw-w64-${{matrix.env}}-cc
mingw-w64-${{matrix.env}}-gmp
- name: Check x86 openjdk8 (hotspot)
if: matrix.sys == 'mingw32'
uses: actions/cache@v4
id: openjdk8
with:
path: openjdk8.zip
key: openjdk8
save-always: true
- name: Download x86 openjdk8 (hotspot)
if: matrix.sys == 'mingw32' && steps.openjdk8.outputs.cache-hit != 'true'
run: |
wget -O openjdk8.zip \
"https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u422-b05/OpenJDK8U-jdk_x86-32_windows_hotspot_8u422b05.zip"
shell: msys2 {0}
- name: Unzip x86 openjdk8 (hotspot)
if: matrix.sys == 'mingw32'
run: |
"/c/Program Files/7-Zip/7z.exe" x openjdk8.zip
echo "JAVA_HOME=$(PWD)/jdk8u422-b05"
echo "JAVA_HOME=$(PWD)/jdk8u422-b05" >> ~/.bash_profile
shell: msys2 {0}
- name: Select Java 21
if: matrix.sys != 'mingw32'
run: |
echo "JAVA_HOME=$JAVA_HOME_21_X64"
echo "JAVA_HOME='$(cygpath -u "$JAVA_HOME_21_X64")'" \
>> ~/.bash_profile
shell: msys2 {0}
- name: Set git user
run: |
git config --global user.name github-actions
git config --global user.email [email protected]
- name: bootstrap
run: |
./build_aux/bootstrap install
shell: msys2 {0}
- name: configure
run: |
mkdir _build
cd _build
java_home="$(cygpath -u "$JAVA_HOME")"
# thanks @revelator & @GitMensch ;-)
# (cf https://github.com/msys2/MINGW-packages/discussions/8056)
lt_cv_deplibs_check_method=pass_all \
../configure --enable-cobc-internal-checks \
--enable-hardening \
--prefix /opt/cobol/gnucobol \
--exec-prefix /opt/cobol/gnucobol \
--disable-nls \
--without-indexed \
--without-json \
--without-xml2 \
--without-curses \
--with-java \
JAVA_HOME="$java_home" \
JAVA="$java_home/bin/java" \
JAVAC="$java_home/bin/javac"
shell: msys2 {0}
- name: Upload config.log
uses: actions/upload-artifact@v4
if: failure()
with:
name: config-${{matrix.sys}}.log
path: _build/config.log
- name: make
run: |
make -C _build --jobs=$(($(nproc)+1))
shell: msys2 {0}
- name: check
continue-on-error: true
run: |
make -C _build check TESTSUITEFLAGS="--jobs=$(($(nproc)+1))" || \
make -C _build check TESTSUITEFLAGS="--recheck --verbose"
shell: msys2 {0}
- name: Upload testsuite.log
uses: actions/upload-artifact@v4
with:
name: testsuite-${{matrix.sys}}.log
path: _build/tests/testsuite.log