Skip to content

Commit

Permalink
Make 4.x CI more like 3.x CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeclerck committed Jan 31, 2025
1 parent 4199180 commit 7a7a611
Show file tree
Hide file tree
Showing 5 changed files with 759 additions and 218 deletions.
82 changes: 46 additions & 36 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: MacOS
name: MacOS Workflow

on:
pull_request:
Expand All @@ -12,14 +12,12 @@ 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:

Expand All @@ -34,6 +32,12 @@ jobs:
- 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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Loading

0 comments on commit 7a7a611

Please sign in to comment.