-
Notifications
You must be signed in to change notification settings - Fork 508
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
common: integrate all PMem workflows
Signed-off-by: Jan Michalski <[email protected]>
- Loading branch information
Showing
10 changed files
with
247 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: PMEM test prepare | ||
description: PMDK testing procedure for self-hosted runners equipped with PMEM | ||
inputs: | ||
ndctl_enable: | ||
description: Build with RAS support | ||
required: false | ||
default: y | ||
fault_injection: | ||
description: Build with the fault injection capability | ||
required: false | ||
default: '0' | ||
runs: | ||
using: composite | ||
steps: | ||
- run: echo 'WORKDIR=utils/gha-runners' >> "$GITHUB_ENV" | ||
shell: bash | ||
- run: | | ||
echo '::group::Get system information' | ||
$WORKDIR/get-system-info.sh | ||
echo '::endgroup::' | ||
shell: bash | ||
- env: | ||
FAULT_INJECTION: ${{ inputs.fault_injection }} | ||
NDCTL_ENABLE: ${{ inputs.ndctl_enable }} | ||
run: | | ||
echo '::group::Build' | ||
$WORKDIR/build-pmdk.sh | ||
echo '::endgroup::' | ||
shell: bash | ||
|
||
- run: | | ||
echo '::group::Create testconfig files' | ||
$WORKDIR/../create-testconfig.sh | ||
for testconfig in src/test/testconfig.sh src/test/testconfig.py; do | ||
echo "$testconfig" | ||
cat $testconfig | ||
echo | ||
done | ||
echo '::endgroup::' | ||
shell: bash |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: PMEM test procedure | ||
description: PMDK testing procedure for self-hosted runners equipped with PMEM | ||
inputs: | ||
test_script: | ||
description: | | ||
'sh' for RUNTESTS.sh, 'py' for RUNTESTS.py. The default is 'both'. | ||
required: false | ||
default: 'both' | ||
build: | ||
description: Build type to be tested. | ||
required: true | ||
test_type: | ||
description: Test type to be run. Supported values are short, medium, long, check (short+medium), all (short+medium+long). | ||
required: false | ||
default: 'all' | ||
test_label: | ||
description: Limit testing to tests that have the given label assigned. | ||
required: false | ||
default: '' | ||
force_enable: | ||
description: Force the use of a specific Valgrind tool. | ||
required: false | ||
default: '' | ||
runs: | ||
using: composite | ||
steps: | ||
# Run tests employing the Bash-based test framework. | ||
- if: inputs.test_script != 'py' # run for 'sh' and 'both' | ||
working-directory: src/test | ||
env: | ||
TEST_LABEL: ${{ inputs.test_label }} | ||
# TEST_BUILD and TEST_TYPE environment variables are overwritten by | ||
# testconfig.sh hence the respective values have to be provided as | ||
# command parameters (-b and -t respectively). | ||
run: | | ||
echo '::group::Tests Bash' | ||
cmd="./RUNTESTS.sh -b ${{ inputs.build }} -t ${{ inputs.test_type }}" | ||
[ "${{ inputs.force_enable }}" != '' ] && | ||
cmd="$cmd --force-enable ${{ inputs.force_enable }}" | ||
bash -c "$cmd" | ||
echo '::endgroup::' | ||
shell: bash | ||
|
||
# Run tests employing the Python-based test framework. | ||
- if: inputs.test_script != 'sh' # run for 'py' and 'both' | ||
working-directory: src/test | ||
run: | | ||
echo '::group::Tests Python' | ||
cmd="./RUNTESTS.py -b ${{ inputs.build }} -t ${{ inputs.test_type }}" | ||
[ "${{ inputs.test_label }}" != '' ] && | ||
cmd="$cmd --test-label ${{ inputs.test_label }}" | ||
[ "${{ inputs.force_enable }}" != '' ] && | ||
cmd="$cmd --force-enable ${{ inputs.force_enable }}" | ||
bash -c "$cmd" | ||
echo '::endgroup::' | ||
shell: bash |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# A common matrix for running tests on PMEM. | ||
# | ||
# This workflow is run on 'self-hosted' runners. | ||
name: PMEM test matrix | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
force_enable: | ||
required: true | ||
type: string | ||
timeout_minutes: | ||
required: false | ||
type: number | ||
default: 360 # The jobs.<job_id>.timeout-minutes default. | ||
|
||
jobs: | ||
job: | ||
name: ${{ matrix.force_enable }}, ${{ matrix.test_script }}, ${{ matrix.os }}, ${{ matrix.build }} | ||
if: github.repository == 'pmem/pmdk' | ||
runs-on: [self-hosted, "${{ matrix.os }}"] | ||
timeout-minutes: ${{ inputs.timeout_minutes }} | ||
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 }} |
Oops, something went wrong.