Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 35 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,22 @@ jobs:
# Simple tests on Linux; except the ParFORM case, they probably pass unless
# the committer has forgotten running "make check".
check:
name: Test (${{ matrix.test }}) for ${{ matrix.bin }}
name: Test (${{ matrix.test }}) for ${{ matrix.bin }}${{ matrix.nthreads && format(' -w{0}', matrix.nthreads) || '' }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- {bin: form, test: default, timeout: 10}
- {bin: tform, test: default, timeout: 10}
- {bin: form, test: default}
- {bin: tform, test: default}
- {bin: tform, test: default, nthreads: 2}
- {bin: parform, test: default, timeout: 15}
- {bin: form, test: checkpoint, timeout: 10}
- {bin: tform, test: checkpoint, timeout: 10}
- {bin: form, test: checkpoint}
- {bin: tform, test: checkpoint}
- {bin: form, test: forcer, timeout: 60}
- {bin: tform, test: forcer, timeout: 60}
- {bin: tform, test: multithreaded, timeout: 10}
- {bin: tform, test: forcer, nthreads: 2, timeout: 60}
- {bin: tform, test: multithreaded}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -81,20 +83,15 @@ jobs:
esac

- name: Test
run: |
testset=''
if [ "${{ matrix.test }}" != "default" ]; then
testset='-C ${{ matrix.test }}'
fi
./check/check.rb ./sources/${{ matrix.bin }} --stat $testset --timeout ${{ matrix.timeout }}
run: ./check/check.rb ./sources/${{ matrix.bin }} --stat ${{ matrix.nthreads && format('-w{0}', matrix.nthreads) || '' }} ${{ matrix.timeout && format('--timeout {0}', matrix.timeout) || '' }} ${{ matrix.test != 'default' && format('-C {0}', matrix.test) || '' }}
env:
FORMPATH: ${{ github.workspace }}/formlib

# Check memory errors (e.g., uninitialized values and memory leaks)
# thoroughly by using Valgrind on Linux. To maximize the use of concurrent
# jobs, we divide the tests into smaller parts.
valgrind-check:
name: Valgrind check for ${{ matrix.bin }} (${{ matrix.group }})
name: Valgrind check for ${{ matrix.bin }}${{ matrix.nthreads && format(' -w{0}', matrix.nthreads) || '' }} (${{ matrix.group }})
runs-on: ubuntu-20.04
strategy:
fail-fast: false
Expand All @@ -115,6 +112,16 @@ jobs:
- {bin: tvorm, group: 8/10}
- {bin: tvorm, group: 9/10}
- {bin: tvorm, group: 10/10}
- {bin: tvorm, nthreads: 2, group: 1/10}
- {bin: tvorm, nthreads: 2, group: 2/10}
- {bin: tvorm, nthreads: 2, group: 3/10}
- {bin: tvorm, nthreads: 2, group: 4/10}
- {bin: tvorm, nthreads: 2, group: 5/10}
- {bin: tvorm, nthreads: 2, group: 6/10}
- {bin: tvorm, nthreads: 2, group: 7/10}
- {bin: tvorm, nthreads: 2, group: 8/10}
- {bin: tvorm, nthreads: 2, group: 9/10}
- {bin: tvorm, nthreads: 2, group: 10/10}
- {bin: parvorm, group: 1/10}
- {bin: parvorm, group: 2/10}
- {bin: parvorm, group: 3/10}
Expand Down Expand Up @@ -168,17 +175,21 @@ jobs:
run: make -C sources -j 4 ${{ matrix.bin }}

- name: Test
run: ./check/check.rb valgrind ./sources/${{ matrix.bin }} --stat -g ${{ matrix.group }} --retries 5
run: ./check/check.rb valgrind ./sources/${{ matrix.bin }} --stat -g ${{ matrix.group }} --retries 5 ${{ matrix.nthreads && format('-w{0}', matrix.nthreads) || '' }}

# Generate LCOV coverage data to be posted to coveralls.io. Note that
# we measure code coverage only for tests checked with Valgrind.
coverage:
name: Code coverage for ${{ matrix.bin }}
name: Code coverage for ${{ matrix.bin }}${{ matrix.nthreads && format(' -w{0}', matrix.nthreads) || '' }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
bin: [vorm, tvorm, parvorm]
include:
- {bin: vorm}
- {bin: tvorm}
- {bin: tvorm, nthreads: 2}
- {bin: parvorm}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -219,7 +230,7 @@ jobs:
run: make -C sources -j 4 ${{ matrix.bin }}

- name: Test
run: ./check/check.rb ./sources/${{ matrix.bin }} --stat --timeout 30
run: ./check/check.rb ./sources/${{ matrix.bin }} --stat --timeout 30 ${{ matrix.nthreads && format('-w{0}', matrix.nthreads) || '' }}

- name: Generate LCOV coverage data
run: |
Expand All @@ -229,7 +240,7 @@ jobs:
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
flag-name: ${{ matrix.bin }}
flag-name: ${{ matrix.bin }}${{ matrix.nthreads && format(' -w{0}', matrix.nthreads) || '' }}
parallel: true

# Post LCOV coverage data to coveralls.io.
Expand All @@ -244,13 +255,17 @@ jobs:

# Tests with a 32-bit container.
check-i386:
name: 32-bit container check for ${{ matrix.bin }}${{ matrix.nthreads && format(' -w{0}', matrix.nthreads) || '' }}
runs-on: ubuntu-latest
container:
image: i386/debian:11.5
strategy:
fail-fast: false
matrix:
bin: [form, tform]
include:
- {bin: form}
- {bin: tform}
- {bin: tform, nthreads: 2}
steps:
# We have to use v1.
# See https://github.com/actions/checkout/issues/334
Expand All @@ -277,4 +292,4 @@ jobs:
run: make -C sources -j 4 ${{ matrix.bin }}

- name: Test
run: ./check/check.rb ./sources/${{ matrix.bin }} --stat --wordsize 2
run: ./check/check.rb ./sources/${{ matrix.bin }} --stat --wordsize 2 ${{ matrix.nthreads && format('-w{0}', matrix.nthreads) || '' }}