CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
118 lines
3.9 KiB
YAML
118 lines
3.9 KiB
YAML
# ---------------------------------------------------------------------------
|
|
# AMD-SMI manylinux Python wheel build.
|
|
#
|
|
# Builds portable AMD-SMI Python wheels (manylinux_2_28, RPM + Debian) and
|
|
# smoke-tests the import.
|
|
#
|
|
# Unlike TheRock CI, which builds native rpm/deb packages, this produces
|
|
# pip-installable wheels. No GPU required.
|
|
# ---------------------------------------------------------------------------
|
|
|
|
name: AMDSMI Manylinux Wheels
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [develop]
|
|
paths:
|
|
- 'projects/amdsmi/**'
|
|
- '!projects/amdsmi/docs/**'
|
|
- '!projects/amdsmi/**/*.md'
|
|
- '!projects/amdsmi/**/*.rst'
|
|
- '.github/workflows/amdsmi-manylinux-build.yml'
|
|
push:
|
|
branches: [develop]
|
|
paths:
|
|
- 'projects/amdsmi/**'
|
|
- '!projects/amdsmi/docs/**'
|
|
- '!projects/amdsmi/**/*.md'
|
|
- '!projects/amdsmi/**/*.rst'
|
|
- '.github/workflows/amdsmi-manylinux-build.yml'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build-amdsmi-wheels:
|
|
name: ${{matrix.target.name}}
|
|
runs-on: ${{matrix.target.runs-on}}
|
|
container: ${{matrix.target.container}}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
target:
|
|
- id: rpm
|
|
name: Build RPM Wheels (AlmaLinux 8 / manylinux_2_28)
|
|
runs-on: ubuntu-22.04
|
|
container: quay.io/pypa/manylinux_2_28_x86_64
|
|
python-bin: /opt/python/cp310-cp310/bin/python3
|
|
os-variant: AlmaLinux8
|
|
repair-flag: '--repair'
|
|
artifact-prefix: amdsmi-rpm-wheels
|
|
- id: debian
|
|
name: Build Debian Wheels (Ubuntu 22.04)
|
|
runs-on: ubuntu-22.04
|
|
container: ''
|
|
python-bin: python3
|
|
os-variant: Ubuntu22
|
|
repair-flag: ''
|
|
artifact-prefix: amdsmi-debian-wheels
|
|
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
|
|
|
|
- name: Install Debian build prerequisites
|
|
if: matrix.target.id == 'debian'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y git make gcc g++ cmake ninja-build libssl-dev libdrm-dev \
|
|
libnl-3-dev libnl-genl-3-dev libmnl-dev
|
|
|
|
- name: Install RPM build prerequisites
|
|
if: matrix.target.id == 'rpm'
|
|
run: |
|
|
dnf install -y libnl3-devel libmnl-devel
|
|
|
|
- name: Mark workspace safe for git
|
|
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
|
|
- name: Build wheels
|
|
run: |
|
|
${{matrix.target.python-bin}} \
|
|
"$GITHUB_WORKSPACE/projects/amdsmi/tools/build_wheel.py" \
|
|
--project-dir "$GITHUB_WORKSPACE/projects/amdsmi" \
|
|
--output-dir "$GITHUB_WORKSPACE/wheels" \
|
|
--os-variant ${{matrix.target.os-variant}} \
|
|
${{matrix.target.repair-flag}}
|
|
|
|
- name: Verify wheels exist
|
|
run: |
|
|
ls -al "$GITHUB_WORKSPACE/wheels"
|
|
if ! ls "$GITHUB_WORKSPACE"/wheels/*.whl >/dev/null 2>&1; then
|
|
echo "No wheels found; failing."
|
|
exit 1
|
|
fi
|
|
|
|
- name: Smoke test (install + import)
|
|
run: |
|
|
${{matrix.target.python-bin}} -m pip install --upgrade pip
|
|
${{matrix.target.python-bin}} -m pip install "$GITHUB_WORKSPACE"/wheels/*.whl
|
|
${{matrix.target.python-bin}} -c "import amdsmi; print('amdsmi import OK')"
|
|
|
|
- name: Upload wheels (by SHA)
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
|
with:
|
|
name: ${{matrix.target.artifact-prefix}}-${{github.sha}}
|
|
path: ${{github.workspace}}/wheels/*.whl
|
|
if-no-files-found: error
|
|
retention-days: 30
|
|
|
|
- name: Upload wheels (downloadable)
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
|
|
with:
|
|
name: ${{matrix.target.artifact-prefix}}
|
|
path: ${{github.workspace}}/wheels/*.whl
|
|
if-no-files-found: warn
|
|
retention-days: 90
|