-
Notifications
You must be signed in to change notification settings - Fork 24
Adding release test capability #352
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
5126f09
Testing releases
geomin12 b898712
Removing unused import
geomin12 68d2d33
Merge branch 'main' of https://github.com/geomin12/TheRock into relea…
geomin12 b6103e0
Adding test
geomin12 0907a97
Adding branch push
geomin12 9ab4b04
Adding push for release-test
geomin12 e739a4b
pre-commit
geomin12 bd2d97e
try this
geomin12 bc9c511
Resolving changes back
geomin12 0a8319f
Changing owner
geomin12 6f8c5f7
PR comments
geomin12 83ac52e
PR comments
geomin12 b5fefcd
PR comment
geomin12 3c98cf3
precommit
geomin12 5a307c7
Making test notes less noisy
geomin12 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,110 @@ | ||
name: Test release packages | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
type: string | ||
tag: | ||
type: string | ||
file_name: | ||
type: string | ||
target: | ||
type: string | ||
|
||
jobs: | ||
generate_target_to_run: | ||
runs-on: ubuntu-24.04 | ||
outputs: | ||
test_runs_on: ${{ steps.configure.outputs.test-runs-on }} | ||
steps: | ||
- name: Checking out repository | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: Generating target to run | ||
id: configure | ||
env: | ||
TARGET: ${{ inputs.target }} | ||
run: python ./build_tools/configure_target_run.py | ||
|
||
|
||
test_release_packages: | ||
runs-on: ${{ needs.generate_target_to_run.outputs.test_runs_on }} | ||
needs: generate_target_to_run | ||
permissions: | ||
contents: write | ||
env: | ||
FILE_NAME: ${{ inputs.file_name }} | ||
VENV_DIR: ${{ github.workspace }}/.venv | ||
THEROCK_BIN_DIR: ${{ github.workspace }}/artifacts/output_dir/bin | ||
TAG_NAME: ${{ inputs.tag }} | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
# Downloading release tag assets to artifacts directory | ||
- name: Download release artifacts | ||
uses: robinraju/release-downloader@daf26c55d821e836577a15f77d86ddc078948b05 # v1.12 | ||
with: | ||
tag: ${{ env.TAG_NAME }} | ||
fileName: ${{ env.FILE_NAME }} | ||
out-file-path: 'artifacts' | ||
|
||
- name: Extract tar asset file | ||
run: | | ||
mkdir -p ${{ github.workspace }}/artifacts/output_dir | ||
tar -xf artifacts/${FILE_NAME} -C ${{ github.workspace }}/artifacts/output_dir | ||
|
||
- name: Setting up Python | ||
id: setup_python | ||
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Create Python venv | ||
run: | | ||
python -m venv ${VENV_DIR} | ||
source ${VENV_DIR}/bin/activate | ||
pip install -r requirements-test.txt | ||
|
||
- name: Run Sanity check | ||
if: '!cancelled()' | ||
id: sanity-check | ||
run: | | ||
source ${VENV_DIR}/bin/activate | ||
pytest tests/ \ | ||
--log-cli-level=info | ||
|
||
- name: Run hipBLASLt tests | ||
if: '!cancelled()' | ||
id: hipblaslt-tests | ||
run: | | ||
source ${VENV_DIR}/bin/activate | ||
${THEROCK_BIN_DIR}/hipblaslt-test --gtest_filter=*pre_checkin* | ||
|
||
- name: Run rocBLAS tests | ||
if: '!cancelled()' | ||
id: rocblas-tests | ||
run: | | ||
ROCBLAS_TENSILE_LIBPATH="${THEROCK_BIN_DIR}/lib/rocblas/library/" | ||
source ${VENV_DIR}/bin/activate | ||
${THEROCK_BIN_DIR}/rocblas-test --yaml ${THEROCK_BIN_DIR}/rocblas_smoke.yaml | ||
|
||
# Creating a markdown file for testing notes since environment variables cannot be resolved in markdown | ||
- name: Append results to markdown file | ||
if: '!cancelled()' | ||
run: | | ||
echo "[${{ inputs.version }}] Test results for ${{ env.FILE_NAME }}" >> ${{ github.workspace }}/test_notes.md | ||
echo "* SANITY_CHECK=${{ steps.sanity-check.outcome }}" >> ${{ github.workspace }}/test_notes.md | ||
echo "* HIPBLASLT_CHECK=${{ steps.hipblaslt-tests.outcome }}" >> ${{ github.workspace }}/test_notes.md | ||
echo "* ROCBLAS_CHECK=${{ steps.rocblas-tests.outcome }}" >> ${{ github.workspace }}/test_notes.md | ||
echo "" >> ${{ github.workspace }}/test_notes.md | ||
echo "For previous test results, refer to the summary tab for the previous 'Test release package' workflow run" >> ${{ github.workspace }}/test_notes.md | ||
echo "$(<${{ github.workspace }}/test_notes.md )" >> $GITHUB_STEP_SUMMARY | ||
|
||
- name: Report test notes to the release body | ||
if: '!cancelled()' | ||
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1 | ||
with: | ||
tag_name: ${{ env.TAG_NAME }} | ||
body_path: ${{ github.workspace }}/test_notes.md |
This file contains hidden or 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,27 @@ | ||
import os | ||
import json | ||
from configure_ci import set_github_output, amdgpu_family_info_matrix | ||
|
||
# This file helps configure which target to run | ||
|
||
# TODO (geomin12): this is very hard-coded to a very specific use-case. | ||
# Once portable_linux_package_matrix.yml matures, this will mature as well | ||
|
||
|
||
def main(args): | ||
target = args.get("target") | ||
for key in amdgpu_family_info_matrix.keys(): | ||
# If the amdgpu_family matrix key is inside the target (ex: gfx94X in gfx94X-dcgpu) | ||
if key in target: | ||
test_runs_on_machine = ( | ||
amdgpu_family_info_matrix.get(key).get("linux").get("test-runs-on") | ||
) | ||
# if there is a test machine available for this target | ||
if test_runs_on_machine: | ||
set_github_output({"test-runs-on": test_runs_on_machine}) | ||
|
||
|
||
if __name__ == "__main__": | ||
args = {} | ||
args["target"] = os.environ.get("TARGET", "") | ||
main(args) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we reuse here what you've recently added to the CI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll need to do some rework on both sides to consolidate and share tests, since it seems duplicating
and for these tests, it'll involve some upload/download assets and hopefully that won't be too costly in time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll actually scope this PR to just adding the capability to test, then in a future PR, i'll work on consolidating and combining the test efforts