-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MacOS CI for Java interoperability branch
- Loading branch information
Showing
1 changed file
with
111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
name: MacOS with Java interoperability | ||
|
||
on: | ||
pull_request: | ||
branches: [ java-interop ] | ||
push: | ||
branches: [ java-interop-ci4macos ] | ||
# manual run in actions tab - for all branches | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build & test | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- macos-latest | ||
|
||
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 | ||
echo "LDFLAGS=-L/opt/homebrew/opt/berkeley-db@4/lib ${LDFLAGS}" >> $GITHUB_ENV | ||
echo "CPPFLAGS=-I/opt/homebrew/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: | | ||
brew install openjdk | ||
echo "/opt/homebrew/opt/openjdk/bin" >> $GITHUB_PATH | ||
echo "JAVA_HOME=\"/Library/Java/JavaVirtualMachines/openjdk.jdk/Contents/Home\"" >> $GITHUB_ENV | ||
- 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 | ||
- 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="/opt/homebrew/opt/bison/bin/bison" PKG_CONFIG="/opt/homebrew/opt/pkg-config/bin/pkg-config" | ||
- name: Upload config.log | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: config.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.log | ||
path: _build/install.log | ||
|
||
- name: check | ||
run: | | ||
sed -i '' '/AT_SETUP(\[INDEXED file SUPPRESS WHEN ALL \+ KEYCHECK\])/a\ | ||
AT_SKIP_IF(\[true\])' tests/testsuite.src/run_file.at | ||
sed -i '' '/AT_SETUP(\[EXTFH: using ISAM callback\])/a\ | ||
AT_SKIP_IF(\[true\])' tests/testsuite.src/run_file.at | ||
sed -i '' '/AT_SETUP(\[trace feature\])/a\ | ||
AT_SKIP_IF(\[true\])' tests/testsuite.src/run_file.at | ||
sed -i '' '/AT_SETUP(\[trace feature with subroutine\])/a\ | ||
AT_SKIP_IF(\[true\])' tests/testsuite.src/run_file.at | ||
sed -i '' '/AT_SETUP(\[trace feature with indexed EXTFH\])/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: failure() | ||
with: | ||
name: testsuite.log | ||
path: _build/tests/testsuite.log |