Skip to content

Commit

Permalink
common: introduce pmem_test_matrix.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
janekmi committed Aug 25, 2023
1 parent c0ae2b0 commit 1983596
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 70 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/pmem_test_matrix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# A common matrix for running tests on PMEM.
#
# This workflow is run on 'self-hosted' runners.
name: PMEM test matrix

on:
workflow_call:
inputs:
name:
required: true
type: string
force_enable:
required: true
type: string

jobs:
job:
name: ${{ inputs.name }}
if: github.repository == 'pmem/pmdk'
runs-on: [self-hosted, "${{ matrix.os }}" ]
strategy:
fail-fast: false
matrix:
force_enable: ${{ fromJSON(inputs.force_enable) }}
test_script: [sh, py]
os: [rhel, opensuse]
build: [debug, nondebug]

steps:
- uses: actions/checkout@v3

- name: Test prepare
uses: ./.github/actions/pmem_test_prepare

- name: Test run
uses: ./.github/actions/pmem_test_run
with:
test_script: ${{ matrix.test_script }}
build: ${{ matrix.build }}
force_enable: ${{ matrix.force_enable }}
84 changes: 14 additions & 70 deletions .github/workflows/pmem_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,86 +12,30 @@ on:
jobs:
# Test the default build with the basic test suite.
basic:
name: Basic
if: github.repository == 'pmem/pmdk'
runs-on: [self-hosted, "${{ matrix.os }}" ]
strategy:
fail-fast: false
matrix:
test_script: [sh, py]
os: [rhel, opensuse]
build: [debug, nondebug]

steps:
- uses: actions/checkout@v3

- name: Test prepare
uses: ./.github/actions/pmem_test_prepare

- name: Test run
uses: ./.github/actions/pmem_test_run
with:
test_script: ${{ matrix.test_script }}
build: ${{ matrix.build }}
# Exclude all Valgrind tests. All tests employing Valgrind tooling are
# run in the dedicated workflows below.
force_enable: none
uses: ./.github/workflows/pmem_test_matrix.yml
with:
name: Basic
# Exclude all Valgrind tests. All tests employing Valgrind tooling are run
# in the dedicated workflows below.
force_enable: '["none"]'


# Test the default build with force-enabled Valgrind tooling for (persistent)
# memory error detection.
forced_xmemcheck:
name: Memory
if: github.repository == 'pmem/pmdk'
runs-on: [self-hosted, "${{ matrix.os }}" ]
strategy:
fail-fast: false
matrix:
force_enable: [pmemcheck, memcheck]
test_script: [sh, py]
os: [rhel, opensuse]
build: [debug, nondebug]

steps:
- uses: actions/checkout@v3

- name: Test prepare
uses: ./.github/actions/pmem_test_prepare

- name: Test run
uses: ./.github/actions/pmem_test_run
with:
test_script: ${{ matrix.test_script }}
build: ${{ matrix.build }}
force_enable: ${{ matrix.force_enable }}
uses: ./.github/workflows/pmem_test_matrix.yml
with:
name: Memory
force_enable: '["pmemcheck", "memcheck"]'


# Test the default build with force-enabled Valgrind tooling for thread error
# detection.
forced_drd_helgrind:
name: Thread
if: github.repository == 'pmem/pmdk'
runs-on: [self-hosted, "${{ matrix.os }}" ]
strategy:
fail-fast: false
matrix:
force_enable: [drd, helgrind]
test_script: [sh, py]
os: [rhel, opensuse]
build: [debug, nondebug]

steps:
- uses: actions/checkout@v3

- name: Test prepare
uses: ./.github/actions/pmem_test_prepare

- name: Test run
uses: ./.github/actions/pmem_test_run
with:
test_script: ${{ matrix.test_script }}
build: ${{ matrix.build }}
force_enable: ${{ matrix.force_enable }}
uses: ./.github/workflows/pmem_test_matrix.yml
with:
name: Thread
force_enable: '["drd", "helgrind"]'


# Static builds are tested in this limited scope only.
Expand Down

0 comments on commit 1983596

Please sign in to comment.