Skip to content

Add an initial test_linux_packages sub-workflow to our CI #31

Add an initial test_linux_packages sub-workflow to our CI

Add an initial test_linux_packages sub-workflow to our CI #31

# Copyright 2025 Advanced Micro Devices, Inc.
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
name: Test Linux Packages
on:
workflow_dispatch:
pull_request:
push:
branches:
- ADHOCBUILD
jobs:
test_rocm_info:
name: "Sanity ROCM Test"
runs-on: linux-mi300-1gpu-ossci
strategy:
fail-fast: true
defaults:
run:
shell: bash
env:
VENV_DIR: ${{ github.workspace }}/.venv
# MOSTLY BOILER PLATE ABOVE.
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install the AWS tool
run: ./dockerfiles/install_awscli.sh
- name: "Setting up Python"
id: setup_python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Create Python venv
run: python -m venv ${VENV_DIR}
- name: Download and Unpack Artifacts
run: |
source ${VENV_DIR}/bin/activate
BUILD_ARTIFACTS_DIR="build/artifacts"
# TODO(sosa): We should infer this from the runner. For Libs and Above it should be based on the
# runner, everything else is generic. Use just generic since this is all core/below.
VARIANT="_generic"
echo "Making ${BUILD_ARTIFACTS_DIR} directory"
mkdir -p "${BUILD_ARTIFACTS_DIR}"
echo "Downloading artifacts"
#aws s3 cp s3://therock-artifacts/${{github.run_id}}/core-runtime_run"${VARIANT}".tar.xz "${BUILD_ARTIFACTS_DIR}" --no-sign-request
#aws s3 cp s3://therock-artifacts/${{github.run_id}}/core-runtime_lib"${VARIANT}".tar.xz "${BUILD_ARTIFACTS_DIR}" --no-sign-request
#aws s3 cp s3://therock-artifacts/${{github.run_id}}/sysdeps_lib"${VARIANT}".tar.xz "${BUILD_ARTIFACTS_DIR}" --no-sign-request
#aws s3 cp s3://therock-artifacts/${{github.run_id}}/base_lib"${VARIANT}".tar.xz "${BUILD_ARTIFACTS_DIR}" --no-sign-request
aws s3 cp s3://therock-artifacts/13592953077/core-runtime_run"${VARIANT}".tar.xz "${BUILD_ARTIFACTS_DIR}" --no-sign-request
aws s3 cp s3://therock-artifacts/13592953077/core-runtime_lib"${VARIANT}".tar.xz "${BUILD_ARTIFACTS_DIR}" --no-sign-request
aws s3 cp s3://therock-artifacts/13592953077/sysdeps_lib"${VARIANT}".tar.xz "${BUILD_ARTIFACTS_DIR}" --no-sign-request
aws s3 cp s3://therock-artifacts/13592953077/base_lib"${VARIANT}".tar.xz "${BUILD_ARTIFACTS_DIR}" --no-sign-request
echo "Unpacking artifacts"
set -x
pushd "${BUILD_ARTIFACTS_DIR}"
python
sudo -E python ${{ github.workspace }}/build_tools/fileset_tool.py artifact-flatten *.tar.xz -o / --verbose
popd
set +x
- name: Run rocminfo
run: |
echo "Running rocminfo"
/bin/rocminfo