Fix bug 1008 #244
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
name: MacOS Workflow | |
on: | |
pull_request: | |
branches: [ gcos4gnucobol-3.x ] | |
push: | |
# manual run in actions tab - for all branches | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
# - macos-latest-large # macos 14, amd64 | |
- macos-latest # macos 14, arm64 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Configure git | |
run: git config --global core.symlinks false | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install packages | |
run: | | |
brew install automake libtool help2man texinfo bison berkeley-db@4 json-c | |
opt="/opt/homebrew/opt" | |
echo "$opt/pkg-config/bin" >> $GITHUB_PATH | |
echo "LDFLAGS=-L$opt/berkeley-db@4/lib ${LDFLAGS}" >> $GITHUB_ENV | |
echo "CPPFLAGS=-I$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: bootstrap | |
run: | | |
./build_aux/bootstrap install | |
- 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 | |
../configure --enable-cobc-internal-checks \ | |
--enable-hardening \ | |
--prefix /opt/cobol/gnucobol-gcos \ | |
- name: make | |
run: | | |
make -C _build --jobs=$((${NPROC}+1)) | |
- name: Upload config.log | |
uses: actions/upload-artifact@v4 | |
with: | |
name: config-${{ matrix.os }}.log | |
path: _build/config.log | |
if: failure() | |
# 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: | | |
sudo make -C _build install | |
find /opt/cobol > _build/install.log | |
- name: Upload install.log | |
uses: actions/upload-artifact@v4 | |
with: | |
name: install-${{ matrix.os }}.log | |
path: _build/install.log | |
- name: check | |
run: | | |
make -C _build check \ | |
TESTSUITEFLAGS="--jobs=$((${NPROC}+1))" | |
- name: Upload testsuite.log | |
uses: actions/upload-artifact@v4 | |
if: ${{ ! cancelled() }} #-> always upload as build result documentation | |
with: | |
name: testsuite-${{ matrix.os }}.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: Run NIST85 testsuite | |
run: | | |
make -C _build/tests test --jobs=$((${NPROC}+1)) | |
- name: Upload NIST85 Test Suite results | |
if: ${{ ! cancelled() }} #-> always upload as build result documentation | |
uses: actions/upload-artifact@v4 | |
with: | |
name: NIST85 results on ${{ matrix.os }} | |
path: | | |
_build/tests/cobol85/summary.* | |
_build/tests/cobol85/**/*.log | |
_build/tests/cobol85/**/*.out | |
_build/tests/cobol85/**/duration.txt |