Skip to content

Commit

Permalink
common: add GHA test w/o Valgrind
Browse files Browse the repository at this point in the history
disable valgrind in builds that do not need them

Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@intel.com>
  • Loading branch information
grom72 committed Mar 20, 2024
1 parent 2f6011e commit bf1a77a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/actions/pmem_test_prepare/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ inputs:
description: Build with the fault injection capability
required: false
default: '0'
valgrind:
description: Build with Valgrind support
required: true

runs:
using: composite
steps:
Expand All @@ -30,6 +34,7 @@ runs:
- env:
FAULT_INJECTION: ${{ inputs.fault_injection }}
NDCTL_ENABLE: ${{ inputs.ndctl_enable }}
VALGRIND: ${{ inputs.valgrind }}
run: |
echo '::group::Build'
$WORKDIR/build-pmdk.sh
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/pmem_test_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
force_enable:
required: true
type: string
valgrind:
required: true
type: string
timeout_minutes:
required: false
type: number
Expand All @@ -28,11 +31,14 @@ jobs:
os: [rhel, opensuse]
build: [debug, nondebug]


steps:
- uses: actions/checkout@v4

- name: Test prepare
uses: ./.github/actions/pmem_test_prepare
with:
valgrind: ${{ inputs.valgrind }}

- name: Test run
uses: ./.github/actions/pmem_test_run
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/pmem_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ on:
jobs:
# Test the default build with the basic test suite.
Basic:
strategy:
matrix:
VALGRIND: [0, 1]
uses: ./.github/workflows/pmem_test_matrix.yml
with:
# Exclude all Valgrind tests. All tests employing Valgrind tooling are run
# in the dedicated workflows below.
force_enable: '["none"]'
valgrind: ${{ matrix.VALGRIND }}


# Test the default build with force-enabled Valgrind tooling for (persistent)
Expand All @@ -25,6 +29,7 @@ jobs:
uses: ./.github/workflows/pmem_test_matrix.yml
with:
force_enable: '["pmemcheck", "memcheck"]'
valgrind: 1


# Test the default build with force-enabled Valgrind tooling for thread error
Expand All @@ -33,6 +38,7 @@ jobs:
uses: ./.github/workflows/pmem_test_matrix.yml
with:
force_enable: '["drd", "helgrind"]'
valgrind: 1
# 9h = 7h20m (the longest workflow execution time) + ~20% leeway.
timeout_minutes: 540

Expand All @@ -52,6 +58,8 @@ jobs:

- name: Test prepare
uses: ./.github/actions/pmem_test_prepare
with:
valgrid: 1

- name: Test run
uses: ./.github/actions/pmem_test_run
Expand All @@ -73,6 +81,7 @@ jobs:
uses: ./.github/actions/pmem_test_prepare
with:
fault_injection: '1'
valgrind: 1

- name: Test run
uses: ./.github/actions/pmem_test_run
Expand All @@ -84,6 +93,8 @@ jobs:
# By default, PMDK is built with NDCTL in order to provide RAS features.
# This build is only viable as long as DAOS builds PMDK with NDCTL_ENABLE=n
# https://github.com/daos-stack/pmdk/pull/12
# It should be removed as soon as following PR is merged
# https://github.com/daos-stack/pmdk/pull/35
ndctl_enable_n:
name: Without ndctl
if: github.repository == 'pmem/pmdk'
Expand All @@ -96,8 +107,17 @@ jobs:
uses: ./.github/actions/pmem_test_prepare
with:
ndctl_enable: n
valgrind: 0

- name: Test run
uses: ./.github/actions/pmem_test_run
with:
build: nondebug # only the production build is considered

# Test the default build with the basic test suite.
Basic_w_Valgrind:
uses: ./.github/workflows/pmem_test_matrix.yml
with:
# Exclude all Valgrind tests but keep Valgrind tools built-in.
force_enable: '["none"]'
valgrind: 1

0 comments on commit bf1a77a

Please sign in to comment.