forked from OCamlPro/gnucobol
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
750 additions
and
221 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: MacOS | ||
name: MacOS Workflow | ||
|
||
on: | ||
pull_request: | ||
|
@@ -12,28 +12,32 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
# - macos-latest-large # macos 14, amd64 | ||
- macos-latest # macos 14, arm64 | ||
isam: | ||
- db | ||
- visam | ||
|
||
runs-on: ${{ matrix.os }} | ||
#runs-on: macos-latest-large # macos 14, amd64 | ||
runs-on: macos-latest # macos 14, arm64 | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
|
||
- name: Configure git | ||
run: git config --global core.symlinks false | ||
|
||
- name: Set git user | ||
run: | | ||
git config --global user.name github-actions | ||
git config --global user.email [email protected] | ||
- name: Configure git | ||
run: git config --global core.symlinks false | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup build environment | ||
run: | | ||
echo "NPROC=`sysctl -n hw.ncpu`" >> $GITHUB_ENV | ||
export TERM="vt100" | ||
echo "TERM=$TERM" >> $GITHUB_ENV | ||
- name: Install packages | ||
run: | | ||
brew install pkg-config automake libtool help2man texinfo bison berkeley-db@4 json-c | ||
|
@@ -43,7 +47,7 @@ jobs: | |
echo "LDFLAGS=-L$opt/berkeley-db@4/lib ${LDFLAGS}" >> $GITHUB_ENV | ||
echo "CPPFLAGS=-I$opt/berkeley-db@4/include ${CPPFLAGS}" >> $GITHUB_ENV | ||
- name: Installing VISAM prerequisite | ||
- name: Install VISAM prerequisite | ||
if: ${{ matrix.isam == 'visam' }} | ||
run: | | ||
wget http://inglenet.ca/Products/GnuCOBOL/visam-2.2.tar.Z | ||
|
@@ -57,54 +61,49 @@ jobs: | |
echo "LIBRARY_PATH=/usr/local/visam-2.2/lib" >> $GITHUB_ENV | ||
echo "LD_LIBRARY_PATH=/usr/local/visam-2.2/lib" >> $GITHUB_ENV | ||
- name: bootstrap | ||
- name: Bootstrap | ||
run: | | ||
./build_aux/bootstrap install | ||
- name: Build environment setup | ||
- name: Configure | ||
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 CPPFLAGS="-DREAD_WRITE_NEEDS_FLUSH $CPPFLAGS" | ||
export CFLAGS="-Wno-unused-command-line-argument -Wno-deprecated-non-prototype -Wno-parentheses-equality $CFLAGS" | ||
../configure --with-${{ matrix.isam }} \ | ||
--with-indexed=${{ matrix.isam }} \ | ||
--enable-cobc-internal-checks \ | ||
--enable-hardening \ | ||
--with-curses=ncurses \ | ||
--prefix /opt/cobol/gnucobol | ||
- name: Upload config-${{ matrix.os }}-${{ matrix.isam }}.log | ||
uses: actions/upload-artifact@v4 | ||
- name: Build | ||
run: | | ||
make -C _build --jobs=$((${NPROC}+1)) | ||
- name: Upload config-${{ matrix.isam }}.log | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: config-${{ matrix.os }}-${{ matrix.isam }}.log | ||
name: config-${{ matrix.isam }}.log | ||
path: _build/config.log | ||
|
||
- name: make | ||
run: | | ||
make -C _build --jobs=$((${NPROC}+1)) | ||
# make install must be done before make check, otherwis | ||
# 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 | ||
- name: Install GnuCOBOL | ||
run: | | ||
sudo make -C _build install | ||
find /opt/cobol > _build/install.log | ||
- name: Upload install-${{ matrix.os }}-${{ matrix.isam }}.log | ||
- name: Upload install-${{ matrix.isam }}.log | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: install-${{ matrix.os }}-${{ matrix.isam }}.log | ||
name: install-${{ matrix.isam }}.log | ||
path: _build/install.log | ||
|
||
- name: check | ||
- name: Run testsuite | ||
run: | | ||
sed -i '' '/AT_SETUP(\[INDEXED file SUPPRESS WHEN ALL \+ KEYCHECK\])/a\ | ||
AT_SKIP_IF(\[true\])' tests/testsuite.src/run_file.at | ||
|
@@ -116,25 +115,36 @@ jobs: | |
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))" | ||
make -C _build check TESTSUITEFLAGS="--jobs=$((${NPROC}+1))" || \ | ||
make -C _build check TESTSUITEFLAGS="--recheck --verbose" | ||
- name: Upload testsuite-${{ matrix.os }}-${{ matrix.isam }}.log | ||
- name: Upload testsuite-${{ matrix.isam }}.log | ||
if: ${{ !cancelled() }} #-> always upload as build result documentation | ||
uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: testsuite-${{ matrix.os }}-${{ matrix.isam }}.log | ||
name: testsuite-${{ matrix.isam }}.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 | ||
- name: Run NIST85 testsuite | ||
run: | | ||
make -C _build/tests/cobol85 EXEC85 test \ | ||
--jobs=$((${NPROC}+1)) | ||
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.isam }} | ||
path: | | ||
_build/tests/cobol85/summary.* | ||
_build/tests/cobol85/**/*.log | ||
_build/tests/cobol85/**/*.out | ||
_build/tests/cobol85/**/duration.txt | ||
# + add packaging |
Oops, something went wrong.