Skip to content

Further CI adjustments for Java interoperability branch #60

Further CI adjustments for Java interoperability branch

Further CI adjustments for Java interoperability branch #60

Workflow file for this run

name: MacOS with Java interoperability
on:
pull_request:
branches: [ java-interop ]
# push:
# branches: [ java-interop ]
# manual run in actions tab - for all branches
workflow_dispatch:
jobs:
build:
name: Build & test
strategy:
fail-fast: false
matrix:
os:
- macos-latest # = macos-14 on 2024-08-14
- macos-12 # without tests
# - macos-13 # nope (autogen fails weirdly)
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@v4
- name: Install packages
run: |
brew install pkg-config automake libtool help2man texinfo bison berkeley-db@4 json-c
BREW_PREFIX="$(brew --prefix)"
echo "BREW_PREFIX=$BREW_PREFIX" >> $GITHUB_ENV
echo "LDFLAGS=-L$BREW_PREFIX/opt/berkeley-db@4/lib ${LDFLAGS}" >> $GITHUB_ENV
echo "CPPFLAGS=-I$BREW_PREFIX/opt/berkeley-db@4/include ${CPPFLAGS}" >> $GITHUB_ENV
- name: Set git user
run: |
git config --global user.name github-actions
git config --global user.email [email protected]
- name: Installing Java prerequisite
run: |
true
- name: bootstrap
run: |
sed -i '' 's/-undefined suppress//g' configure.ac
./autogen.sh
autoconf
autoreconf --install --force
- name: Build environment setup
run: |
mkdir _build
echo "NPROC=`sysctl -n hw.ncpu`" >> $GITHUB_ENV
export TERM="vt100"
echo "TERM=$TERM" >> $GITHUB_ENV
echo "JAVA_HOME=$JAVA_HOME" # for information
- name: configure
run: |
cd _build
export CFLAGS="-Wno-deprecated-non-prototype -Wno-parentheses-equality $CFLAGS"
../configure --with-java --enable-cobc-internal-checks --enable-hardening --prefix /opt/cobol/gnucobol --exec-prefix /opt/cobol/gnucobol YACC="$BREW_PREFIX/opt/bison/bin/bison" PKG_CONFIG="$BREW_PREFIX/opt/pkg-config/bin/pkg-config"
- name: Upload config.log
uses: actions/upload-artifact@v4
with:
name: config-${{ matrix.os }}.log
path: _build/config.log
if: failure()
- name: make
run: |
make -C _build --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@v4
with:
name: install-${{ matrix.os }}.log
path: _build/install.log
- name: check
if: matrix.os == 'macos-latest'
run: |
sed -i '' \
-e '/AT_SETUP(\[INDEXED file SUPPRESS WHEN ALL \+ KEYCHECK\])/a\
AT_SKIP_IF(\[true\])' \
-e '/AT_SETUP(\[EXTFH: using ISAM callback\])/a\
AT_SKIP_IF(\[true\])' \
-e '/AT_SETUP(\[trace feature\])/a\
AT_SKIP_IF(\[true\])' \
-e '/AT_SETUP(\[trace feature with subroutine\])/a\
AT_SKIP_IF(\[true\])' \
-e '/AT_SETUP(\[trace feature with indexed EXTFH\])/a\
AT_SKIP_IF(\[true\])' \
-e '\%AT_SETUP(\[LINE SEQUENTIAL COMMIT / ROLLBACK\])%a\
AT_SKIP_IF(\[true\])' \
tests/testsuite.src/run_file.at
make -C _build check TESTSUITEFLAGS="--jobs=$((${NPROC}+1))"
- name: Upload testsuite.log
uses: actions/upload-artifact@v4
if: matrix.os == 'macos-latest' && failure()
with:
name: testsuite-${{ matrix.os }}.log
path: _build/tests/testsuite.log