Skip to content

Commit 9b3f266

Browse files
committed
No hardcoded versions
1 parent b2a823f commit 9b3f266

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.github/workflows/build-rocm-only.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ jobs:
7979
# Add ROCm repository using modern GPG key handling
8080
wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/rocm-archive-keyring.gpg
8181
echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${{ env.ROCM_VERSION }}/ noble main" | sudo tee /etc/apt/sources.list.d/rocm.list
82+
83+
# Set ROCm repository to highest priority to avoid conflicts with Ubuntu packages
84+
echo "Package: *" | sudo tee /etc/apt/preferences.d/rocm-pin
85+
echo "Pin: origin repo.radeon.com" | sudo tee -a /etc/apt/preferences.d/rocm-pin
86+
echo "Pin-Priority: 1001" | sudo tee -a /etc/apt/preferences.d/rocm-pin
87+
8288
sudo apt-get update
8389
8490
- name: Install ROCm
@@ -92,8 +98,17 @@ jobs:
9298
apt-cache search hip | head -10
9399
}
94100
95-
# Install ROCm packages
96-
sudo apt-get install -y rocm-dev hip-dev hipblas-dev ninja-build
101+
# Check repository priorities
102+
echo "Checking repository priorities..."
103+
apt-cache policy hipcc rocm-cmake rocm-utils
104+
105+
# Install ROCm packages (APT preferences will ensure ROCm repo versions are used)
106+
echo "Installing ROCm packages..."
107+
sudo apt-get install -y \
108+
rocm-dev \
109+
hip-dev \
110+
hipblas-dev \
111+
ninja-build
97112
98113
- name: Setup ROCm Environment
99114
run: |

0 commit comments

Comments
 (0)