Test release packages #680
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
name: Test release packages | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
type: string | |
tag: | |
type: string | |
file_name: | |
type: string | |
target: | |
type: string | |
permissions: | |
contents: read | |
jobs: | |
generate_target_to_run: | |
name: 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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
- name: Generating target to run | |
id: configure | |
env: | |
TARGET: ${{ inputs.amdgpu_family }} | |
PLATFORM: "linux" | |
run: python ./build_tools/github_actions/configure_target_run.py | |
test_release_packages: | |
# If there is a test machine available | |
if: ${{ needs.generate_target_to_run.outputs.test_runs_on != '' }} | |
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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
# 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@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
with: | |
python-version: 3.11 | |
- name: Create Python venv and other dependencies | |
run: | | |
python -m venv ${VENV_DIR} | |
source ${VENV_DIR}/bin/activate | |
pip install -r requirements-test.txt | |
sudo apt install libgfortran5 -y | |
pip freeze | |
- 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 )" >> $GITHUB_STEP_SUMMARY |