-
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
Changes from 12 commits
5126f09
b898712
68d2d33
b6103e0
0907a97
9ab4b04
e739a4b
bd2d97e
bc9c511
0a8319f
6f8c5f7
83ac52e
b5fefcd
3c98cf3
5a307c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
name: Test release packages | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
type: string | ||
tag: | ||
type: string | ||
|
||
jobs: | ||
generate_release_matrix: | ||
runs-on: ubuntu-24.04 | ||
outputs: | ||
release_matrix: ${{ steps.configure.outputs.release_matrix }} | ||
steps: | ||
- name: Checking out repository | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: Retrieve asset metadata | ||
uses: KevinRohn/github-full-release-data@5412e32eb61d2860644150afb0bebeb8136921db # v2.0.6 | ||
id: release_json | ||
with: | ||
version: ${{ inputs.tag }} | ||
|
||
- name: Generating release matrix | ||
id: configure | ||
env: | ||
ASSET_FILES: ${{ steps.release_json.outputs.assets_array_json }} | ||
VERSION: ${{ inputs.version }} | ||
run: python ./build_tools/configure_release_matrix.py | ||
|
||
|
||
test_release_packages: | ||
runs-on: ${{ matrix.target.test-runs-on }} | ||
needs: generate_release_matrix | ||
permissions: | ||
contents: write | ||
strategy: | ||
matrix: | ||
target: ${{ fromJSON(needs.generate_release_matrix.outputs.release_matrix) }} | ||
env: | ||
FILE_NAME: ${{ matrix.target.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 | ||
Comment on lines
+78
to
+91
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 commentThe 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 |
||
|
||
# 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 "" >> ${{ github.workspace }}/test_notes.md | ||
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 | ||
|
||
- 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 }} | ||
append_body: true | ||
body_path: ${{ github.workspace }}/test_notes.md |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import os | ||
import json | ||
from configure_ci import set_github_output, amdgpu_family_info_matrix | ||
|
||
# This file helps generate a release test matrix for test_release_packages.yml | ||
|
||
|
||
def main(args): | ||
assets = json.loads(args.get("asset_files")) | ||
version = args.get("version") | ||
release_matrix = [] | ||
for asset in assets: | ||
asset_name = asset.get("name", "") | ||
# Test only today's release packages | ||
# for now, we can only run tests on gfx94X since we only have a linux gfx94X test machine | ||
if version in asset_name and "gfx94X" in asset_name: | ||
target_info = amdgpu_family_info_matrix.get("gfx94X").get("linux") | ||
target_info["file_name"] = asset_name | ||
release_matrix.append(target_info) | ||
|
||
set_github_output({"release_matrix": json.dumps(release_matrix)}) | ||
|
||
|
||
if __name__ == "__main__": | ||
args = {} | ||
args["asset_files"] = os.environ.get("ASSET_FILES", "[]") | ||
args["version"] = os.environ.get("VERSION", "") | ||
main(args) |
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 am not sure the job need to generate the release matrix to test for itself. This could be an input form the prior job. With this it's also more easy to trigger exactly one run on a specific system and for a specific GPU.