Skip to content

ci adjustments

ci adjustments #308

Workflow file for this run

name: Windows MSYS2 Workflow
on:
# pull_request:
# branches: [ gcos4gnucobol-3.x ]
push:
# manual run in actions tab - for all branches
workflow_dispatch:
jobs:
prepare:
runs-on: windows-latest
timeout-minutes: 30
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
- name: Install packages
uses: msys2/setup-msys2@v2
with:
update: true
msystem: mingw64
install: autoconf automake libtool make flex bison help2man texinfo texinfo-tex
mingw-w64-x86_64-cc
mingw-w64-x86_64-gmp
mingw-w64-x86_64-gettext-runtime gettext-devel
- name: Bootstrap GnuCOBOL
shell: msys2 {0}
run: |
./build_aux/bootstrap install
- name: Configure GnuCOBOL
shell: msys2 {0}
run: |
mkdir _build
cd _build
../configure --without-db --without-curses --without-xml2 --without-json
- name: Build GnuCOBOL Source Distribution
shell: msys2 {0}
run: |
make -C _build --jobs=$(($(nproc)+1))
make -C _build --jobs=$(($(nproc)+1)) dist
- name: Upload config-dist.log
uses: actions/upload-artifact@v4
if: ${{ ! cancelled() }} #-> always upload as build result documentation
with:
name: config-dist.log
path: _build/config.log
- name: Upload dist tarball
uses: actions/upload-artifact@v4
with:
name: gnucobol-ci source distribution msys2
path: _build/gnucobol*.tar.gz
if-no-files-found: error
retention-days: 1
build:
strategy:
fail-fast: false
matrix:
include:
- { target: release, sys: mingw64, env: x86_64 }
- { target: debug, sys: mingw64, env: x86_64 }
- { target: debug, sys: ucrt64, env: ucrt-x86_64 }
- { target: debug, sys: clang64, env: clang-x86_64 }
- { target: debug, sys: mingw32, env: i686 }
runs-on: windows-latest,
needs: build

Check failure on line 83 in .github/workflows/windows-msys2.yml

View workflow run for this annotation

GitHub Actions / Windows MSYS2 Workflow

Invalid workflow file

The workflow is not valid. .github/workflows/windows-msys2.yml (Line: 83, Col: 12): Job 'build' depends on job 'build' which creates a cycle in the dependency graph.
timeout-minutes: 45
steps:
- name: Install packages
run: |
sudo apt -y update
sudo apt -y install build-essential libgmp-dev
sudo apt -y remove bison flex
- name: Get CI dist tarball
uses: actions/download-artifact@v4
with:
name: gnucobol-ci source distribution
- name: Build environment setup
run: |
tar -xvf gnucobol*.tar.* --strip-components=1
mkdir _build
# echo GITHUB_WORKSPACE=$env:GITHUB_WORKSPACE >> $env:GITHUB_ENV
If ("${{ matrix.target }}" -eq "release") {
echo DISTDIR=GnuCOBOL_mingw >> $env:GITHUB_ENV
echo CFGOPT="--with-pkgversion=GnuCOBOL-CI-MSYS2" >> $env:GITHUB_ENV
} else {
echo DISTDIR=GnuCOBOL_mingw_dbg >> $env:GITHUB_ENV
echo CFGOPT="--with-pkgversion=GnuCOBOL-CI-MSYS2-debug --enable-debug --enable-cobc-internal-checks --enable-hardening" >> $env:GITHUB_ENV
}
- name: Install packages
uses: msys2/setup-msys2@v2
with:
update: true
msystem: ${{matrix.sys}}
install: make
mingw-w64-${{matrix.env}}-cc
mingw-w64-${{matrix.env}}-gmp
mingw-w64-${{matrix.env}}-gettext-runtime
mingw-w64-${{matrix.env}}-ncurses
mingw-w64-${{matrix.env}}-libxml2
mingw-w64-${{matrix.env}}-cjson
mingw-w64-${{matrix.env}}-db
- name: Configure GnuCOBOL
shell: msys2 {0}
run: |
cd _build
../configure $CFGOPT --with-db --prefix=/opt/cobol/gnucobol
- name: Build GnuCOBOL
shell: msys2 {0}
run: |
make -C _build --jobs=$(($(nproc)+1))
- name: Upload config-${{matrix.sys}}-${{matrix.target}}.log
uses: actions/upload-artifact@v4
if: failure()
with:
name: config-${{matrix.sys}}-${{matrix.target}}.log
path: _build/config.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: Run NIST85 testsuite
shell: msys2 {0}
run: |
make -C _build/tests test --jobs=$(($(nproc)+1)) TESTSUITEFLAGS="--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.target }}
path: |
_build/tests/cobol85/summary.*
_build/tests/cobol85/**/*.log
_build/tests/cobol85/**/*.out
_build/tests/cobol85/**/duration.txt
- name: Run testuite
shell: msys2 {0}
run: |
# skip test as it sometimes works and sometimes not...
# instead of
# sed -i '/AT_SETUP(\[temporary path invalid\])/a AT_SKIP_IF(\[true\])' tests/testsuite.src/used_binaries.at
# use
sed -i '/used_binaries/{N;/temporary path invalid/{N;N;N;N;s/traceon/traceon; echo "workflow:1" >"$at_check_line_file"; at_fn_check_skip 77/;}}' tests/testsuite
# to work around regular hangs we run NIST first, then the internal
# and the later only with 2 jobs
make -C _build/tests check TESTSUITEFLAGS="--jobs=2" || \
make -C _build/tests check TESTSUITEFLAGS="--recheck --verbose"
- name: Upload testsuite-${{matrix.sys}}-${{matrix.target}}.log
uses: actions/upload-artifact@v4
if: ${{ ! cancelled() }} #-> always upload as build result documentation
with:
name: testsuite-${{matrix.sys}}-${{matrix.target}}.log
path: _build/tests/testsuite.log
- name: Package GnuCOBOL MinGW nightly
shell: msys2 {0}
run: |
make -C _build distmingw
tar -cvf GnuCOBOL_msys2-${{matrix.sys}}-${{matrix.target}}.tar \
_build/"${{ env.DISTDIR }}"
- name: Upload GnuCOBOL_mingw-${{matrix.sys}}-${{matrix.target}}.tar
uses: actions/upload-artifact@v4
with:
name: GnuCOBOL_msys2-${{matrix.sys}}-${{matrix.target}}.tar
path: GnuCOBOL_msys2-${{matrix.sys}}-${{matrix.target}}.tar