Skip to content

CI for forward-porting GC3 patches to GC4 #122

CI for forward-porting GC3 patches to GC4

CI for forward-porting GC3 patches to GC4 #122

name: Windows MSYS2 BDB (build only)
on:
pull_request:
branches: [ gc4 ]
push:
branches: [ gc3_to_gc4 ]
# manual run in actions tab - for all branches
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- windows-latest
target:
- debug
- release
runs-on: ${{ matrix.os }}
steps:
- name: Set git user
run: |
git config --global user.name github-actions
git config --global user.email [email protected]
- name: Checkout code
uses: actions/checkout@v4
- name: Setup environment
run: |
echo GITHUB_WORKSPACE=$env:GITHUB_WORKSPACE >> $env:GITHUB_ENV
If ("${{ matrix.target }}" -eq "release") {
echo DISTDIR=GnuCOBOL_mingw >> $env:GITHUB_ENV
echo CFGOPT="" >> $env:GITHUB_ENV
} Else {
echo DISTDIR=GnuCOBOL_mingw_dbg >> $env:GITHUB_ENV
echo CFGOPT="--enable-debug --enable-cobc-internal-checks --enable-hardening" >> $env:GITHUB_ENV
}
- name: Install packages
uses: msys2/setup-msys2@v2
with:
update: true
msystem: ucrt64
install: autoconf automake libtool make mingw-w64-ucrt-x86_64-ncurses mingw-w64-ucrt-x86_64-libxml2 mingw-w64-ucrt-x86_64-cjson mingw-w64-ucrt-x86_64-db mingw-w64-ucrt-x86_64-gmp libdb-devel mingw-w64-ucrt-x86_64-gcc flex bison gmp-devel help2man texinfo gettext-devel
- name: bootstrap
shell: msys2 {0}
run: |
./autogen.sh
autoconf
autoreconf --install --force
- name: configure
shell: msys2 {0}
run: |
mkdir _build
cd _build
../configure $CFGOPT --with-db --with-indexed=db --prefix /opt/cobol/gnucobol
- name: Upload config-${{ matrix.target }}.log
uses: actions/upload-artifact@v4
if: failure()
with:
name: config-${{ matrix.target }}.log
path: _build/config.log
- name: make
shell: msys2 {0}
run: |
cd _build
make --jobs=$(($(nproc)+1))
- name: install
shell: msys2 {0}
run: |
cd _build
make install
find /opt/cobol > install.log
- name: Upload install-${{ matrix.target }}.log
uses: actions/upload-artifact@v4
with:
name: install-${{ matrix.target }}.log
path: _build/install.log
- name: check
continue-on-error: true
shell: msys2 {0}
run: |
sed -i '/AT_SETUP(\[ACCEPT OMITTED (SCREEN)\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/run_accept.at
cd _build/tests
make check TESTSUITEFLAGS="--jobs=$(($(nproc)+1))"
- name: Upload testsuite-${{ matrix.target }}.log
uses: actions/upload-artifact@v4
with:
name: testsuite-${{ matrix.target }}.log
path: _build/tests/testsuite.log
- name: distmingw
shell: msys2 {0}
run: |
cd _build
make distmingw
- name: Upload GnuCOBOL_mingw-${{ matrix.target }}
uses: actions/upload-artifact@v4
with:
name: GnuCOBOL_mingw-${{ matrix.target }}
path: _build/${{ env.DISTDIR }}