Files
TheRock/rocm-systems/.github/workflows/rocr-runtime-wsl.yml
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

131 lines
4.2 KiB
YAML

name: ROCR Runtime WSL
on:
workflow_dispatch:
pull_request:
paths:
- "projects/rocr-runtime/**"
- "projects/clr/**"
- "projects/hip/**"
- "projects/hip-tests/**"
- ".github/workflows/rocr-runtime-wsl.yml"
- "shared/amdgpu-windows-interop/wkmi"
push:
branches:
- develop
paths:
- "projects/rocr-runtime/**"
- "projects/clr/**"
- "projects/hip/**"
- "projects/hip-tests/**"
- ".github/workflows/rocr-runtime-wsl.yml"
- "shared/amdgpu-windows-interop/wkmi"
permissions:
contents: read
jobs:
rocr-runtime-wsl-test:
name: ROCR Runtime WSL Test
runs-on: rocr-runtime-libhsakmt-wsl
defaults:
run:
shell: powershell
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
sparse-checkout: |
projects/rocr-runtime
shared/amdgpu-windows-interop/wkmi
.dvc
sparse-checkout-cone-mode: true
- name: Configure MSVC and Windows SDK
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
- name: Set up DVC
uses: iterative/setup-dvc@4bdfd2b0f6f1ad7e08afadb03b1a895c352a5239 # v2.0.0
with:
version: '3.62.0'
- name: Pull DVC files
shell: powershell
run: |
cd ${{ github.workspace }}
dvc pull shared/amdgpu-windows-interop/wkmi/lnx/lib/libwkmi.a.dvc
- name: Detect Windows SDK version
id: detect-sdk
shell: powershell
run: |
$sdkPath = "C:\Program Files (x86)\Windows Kits\10\Include"
if (Test-Path $sdkPath) {
$versions = Get-ChildItem $sdkPath -Directory | Sort-Object Name -Descending
$latestVersion = $versions[0].Name
echo "Found Windows SDK version: $latestVersion"
echo "SDK_VERSION=$latestVersion" >> $env:GITHUB_OUTPUT
echo "SDK_BASE_PATH=$sdkPath\$latestVersion" >> $env:GITHUB_OUTPUT
} else {
echo "Windows SDK not found at $sdkPath"
exit 1
}
- name: Set up WSL with Ubuntu
uses: Vampire/setup-wsl@6a8db447be7ed35f2f499c02c6e60ff77ef11278 # v6.0.0
with:
distribution: Ubuntu-24.04
update: true
additional-packages: build-essential cmake ninja-build
- name: Copy repository into WSL
shell: wsl-bash {0}
run: |
set -euo pipefail
# Copy the checked out repository to WSL home directory
cp -r /mnt/c/a/rocm-systems/rocm-systems ~/rocm-systems
ls -la ~/rocm-systems/projects/rocr-runtime/
- name: Verify WSL environment
shell: wsl-bash {0}
run: |
set -euo pipefail
echo "Testing WSL environment..."
cmake --version
ninja --version
echo "ROCR Runtime project location:"
ls -la ~/rocm-systems/projects/rocr-runtime/
- name: Build libhsakmt with Windows SDK
shell: wsl-bash {0}
env:
WIN_SDK_VERSION: ${{ steps.detect-sdk.outputs.SDK_VERSION }}
run: |
set -euo pipefail
cd ~/rocm-systems/projects/rocr-runtime/libhsakmt
echo "Building libhsakmt in WSL with Windows SDK..."
# Use the detected Windows SDK version from the host
WIN_SDK_VERSION="${WIN_SDK_VERSION:-10.0.26100.0}"
export win_sdk="/mnt/c/Program Files (x86)/Windows Kits/10/Include/${WIN_SDK_VERSION}/"
echo "Using Windows SDK version: ${WIN_SDK_VERSION}"
echo "Windows SDK path: ${win_sdk}"
# Verify the Windows SDK is accessible from WSL
if [ ! -d "${win_sdk}" ]; then
echo "ERROR: Windows SDK not found at ${win_sdk}"
echo "Available SDK versions:"
ls -la "/mnt/c/Program Files (x86)/Windows Kits/10/Include/" || echo "SDK directory not accessible"
exit 1
fi
# Build the library
mkdir -p build
cd build
cmake .. -G Ninja -DWIN_SDK="${win_sdk}/shared"
ninja
echo "libhsakmt build completed successfully!"