Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run spdk/autorun_post on common tests artifacts #24

Merged
merged 2 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
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
51 changes: 50 additions & 1 deletion .github/workflows/spdk-common-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ on:
type: string
default: ''

env:
spdk_path: './spdk'
jobs:
checkout_spdk:
runs-on: ubuntu-latest
env:
is_called: ${{ inputs.client_payload != '' && fromJson(inputs.client_payload) != '' || false }}
gerrit_ref: ${{ inputs.gerrit_ref }}
spdk_path: './spdk'
steps:
# Required to use locally defined actions
- name: Checkout the spdk-ci repo locally
Expand All @@ -49,6 +50,54 @@ jobs:
needs: checkout_spdk
uses: ./.github/workflows/per_patch.yml

summary:
# 22.04 used on purpose; it has lcov+gcov versions that are compatible with what
# is used in cijoe's Fedora 40 images. Using lcov+gcov from ubuntu-latest results
# in warnings and/or failures.
runs-on: ubuntu-22.04
needs:
- tests
steps:
- name: Download the SPDK repository
uses: actions/[email protected]
with:
name: repository
path: ${{ github.workspace }}/spdk

- name: Download artifact tarballs
uses: actions/[email protected]
with:
pattern: 'autorun_*_artifacts'

- name: Show artifacts
run: |
tar xf ${{ env.spdk_path }}/repository.tar.gz -C ${{ env.spdk_path }}

# TODO: either use an official lcov image or create our own
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine to me for now, but in the end we should use the container image used for testing (#26).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but in the end we should use the container image used for testing

Definietly!

# TODO: get rid of pandas dependency in spdk/autorun_post.py.
# It's ~1GB with all it's dependecies, which is an overkill for
# a few table operations.
sudo apt-get update && sudo apt-get install -y lcov python3-pandas

# Favourite part <3
# lcov when registers /opt/spdk/** paths for files when running in Qemu
# spawned by cijoe. But the working directory and paths are different
# in this step so need to replace them.
# TODO: This should be an option in autorun_post.py script itself.
sed -i -e "s#^SF:/[^/]*/spdk/#SF:$PWD/spdk/#" */cov_total.info

spdk/autorun_post.py -s -d ./ -r ./spdk

- name: Upload artifacts
uses: actions/[email protected]
with:
name: _autorun_summary_output
path: |
doc
coverage
ut_coverage
post_process

report:
# Only run if it was triggered by Gerrit event, with JSON for it
if: ${{ needs.checkout_spdk.outputs.is_called == 'true' }}
Expand Down
8 changes: 4 additions & 4 deletions cijoe/workflows/autorun_in_qemu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ steps:

- name: autorun_unittest
run: |
mkdir -p /opt/output/unittest
output_dir=/opt/output/unittest /opt/spdk/autorun.sh /opt/configs/unittest.conf
mkdir -p /opt/output
output_dir=/opt/output /opt/spdk/autorun.sh /opt/configs/unittest.conf

- name: autorun_nvme
run: |
mkdir -p /opt/output/nvme
output_dir=/opt/output/nvme /opt/spdk/autorun.sh /opt/configs/nvme.conf
mkdir -p /opt/output
output_dir=/opt/output /opt/spdk/autorun.sh /opt/configs/nvme.conf

- name: output_listing
run: |
Expand Down