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 ecfaecb commit 6338a7f
Show file tree
Hide file tree
Showing 3 changed files with 28 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
17 changes: 17 additions & 0 deletions .github/workflows/pmem_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
# Exclude all Valgrind tests. All tests employing Valgrind tooling are run
# in the dedicated workflows below.
force_enable: '["none"]'
valgrind: 0


# Test the default build with force-enabled Valgrind tooling for (persistent)
Expand All @@ -25,6 +26,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 +35,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 +55,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 +78,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 +90,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 +104,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 6338a7f

Please sign in to comment.