Skip to content

Commit

Permalink
CI: adding minimal build
Browse files Browse the repository at this point in the history
additional:
* added NIST85 summary and duration files to the NIST result artifact
* adjust artifact names to prevent conflicts
  • Loading branch information
GitMensch committed Sep 27, 2024
1 parent f5989ba commit d772b38
Showing 1 changed file with 96 additions and 9 deletions.
105 changes: 96 additions & 9 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,105 @@
name: Ubuntu Workflow

on:

pull_request:
branches: [ gcos4gnucobol-3.x ]
push:
# manual run in actions tab - for all branches
workflow_dispatch:


jobs:

minmal_build:
name: Build and test with minimal dependencies
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}

steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Install packages
run: |
sudo apt-get update
sudo apt-get install automake libtool bison flex help2man
- name: Set git user
run: |
git config --global user.name github-actions
git config --global user.email [email protected]
- name: Build environment setup
run: |
./build_aux/bootstrap
mkdir _build
- name: Configure
run: |
cd _build
../configure --disable-dependency-tracking \
--without-db --without-curses \
--without-xml2 --without-json \
--without-iconv --disable-nls
- name: Upload config.log
uses: actions/upload-artifact@v4
if: failure()
with:
name: config-${{ matrix.os }}-${{ job.name }}.log
path: _build/config.log

- name: Build
run: |
make -C _build --jobs=$(($(nproc)+1))
- name: run internal tests
run: |
make -C _build check TESTSUITEFLAGS="--jobs=$(($(nproc)+1))" || \
make -C _build check TESTSUITEFLAGS="--recheck --verbose"
- name: Upload testsuite.log
uses: actions/upload-artifact@v4
if: failure()
with:
name: testsuite-${{ matrix.os }}-${{ job.name }}.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: Upload NIST85 Test Suite results
uses: actions/upload-artifact@v4
with:
name: NIST85 results on ${{ matrix.os }}-${{ job.name }}
path: |
_build/tests/cobol85/summary.*
_build/tests/cobol85/**/*.log
_build/tests/cobol85/**/*.out
_build/tests/cobol85/**/duration.txt
build:
name: Build, test and provide nightly
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}

steps:
Expand Down Expand Up @@ -70,7 +156,7 @@ jobs:
uses: actions/upload-artifact@v4
if: failure()
with:
name: config-${{ matrix.os }}.log
name: config-${{ matrix.os }}-${{ job.name }}.log
path: _build/config.log

- name: Build
Expand All @@ -91,7 +177,7 @@ jobs:
if: failure()
with:
# Assume there's only one directory matching `_build/gnucobol-*`:
name: testsuite-${{ matrix.os }}.log
name: testsuite-${{ matrix.os }}-${{ job.name }}.log
path: _build/gnucobol-${{ env.VERSION }}/_build/sub/tests/testsuite.log

- name: Upload dist tarball
Expand All @@ -118,10 +204,12 @@ jobs:
- name: Upload NIST85 Test Suite results
uses: actions/upload-artifact@v4
with:
name: NIST85 results on ${{ matrix.os }}
name: NIST85 results on ${{ matrix.os }}-${{ job.name }}
path: |
_build/tests/cobol85/summary.*
_build/tests/cobol85/**/*.log
_build/tests/cobol85/**/*.out
_build/tests/cobol85/**/duration.txt
coverage:
Expand Down Expand Up @@ -163,7 +251,7 @@ jobs:
uses: actions/upload-artifact@v4
if: failure()
with:
name: config-${{ matrix.os }}.log
name: config-${{ matrix.os }}-${{ job.name }}.log
path: _build/config.log

- name: Build
Expand All @@ -182,13 +270,13 @@ jobs:
uses: actions/upload-artifact@v4
if: failure()
with:
name: testsuite-${{ matrix.os }}.log
name: testsuite-${{ matrix.os }}-${{ job.name }}.log
path: _build/tests/testsuite.log

- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.os }}
name: coverage
path: _build/GnuCOBOL-**-coverage

- name: Cache newcob.val
Expand All @@ -212,7 +300,7 @@ jobs:
- name: Upload extended coverage report
uses: actions/upload-artifact@v4
with:
name: extended-coverage-${{ matrix.os }}
name: extended-coverage
path: _build/extended-coverage

- name: Upload coverage to codecov
Expand All @@ -223,4 +311,3 @@ jobs:
# Shall fail until we have a working account on codecov.io
fail_ci_if_error: false # optional (default = false)
verbose: true # optional (default = false)

0 comments on commit d772b38

Please sign in to comment.