Skip to content

Update GH actions to 6.4, set GPU_TARGETS (#239) #154

Update GH actions to 6.4, set GPU_TARGETS (#239)

Update GH actions to 6.4, set GPU_TARGETS (#239) #154

name: Build Libraries
on:
push:
branches: [ amd-staging, amd-mainline, release/** ]
paths:
- 'Libraries/**'
- '.github/workflows/**'
pull_request:
branches: [ amd-staging, amd-mainline, release/** ]
paths:
- 'Libraries/**'
- '.github/workflows/**'
env:
ROCM_VERSION: 6.4
AMDGPU_INSTALLER_VERSION: 6.4.60400-1
GPU_TARGETS: gfx803;gfx900;gfx906;gfx908;gfx90a;gfx942;gfx1030;gfx1100;gfx1101;gfx1102;gfx1201
jobs:
build:
name: "Build Libraries Examples"
runs-on: self-hosted
container:
image: ubuntu:22.04
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
apt-get update -qq &&
apt-get install -y build-essential g++ glslang-tools \
python3 python3-pip libglfw3-dev libvulkan-dev locales wget
python3 -m pip install --upgrade pip
python3 -m pip install cmake
- name: Install ROCm Dev
run: |
export DEBIAN_FRONTEND=noninteractive
wget https://repo.radeon.com/amdgpu-install/${{ env.ROCM_VERSION }}/ubuntu/jammy/amdgpu-install_${{ env.AMDGPU_INSTALLER_VERSION }}_all.deb
apt-get -y install ./amdgpu-install_${{ env.AMDGPU_INSTALLER_VERSION }}_all.deb &&
apt-get update -qq &&
apt-get install -y \
rocm-dev rocm-llvm \
rocrand-dev hiprand-dev \
rocprim-dev hipcub-dev \
rocblas-dev hipblas-dev \
rocsolver-dev hipsolver-dev \
rocfft-dev hipfft-dev \
rocsparse-dev \
rocthrust-dev
rm -rf /var/lib/apt/lists/*
echo "/opt/rocm/bin" >> $GITHUB_PATH
echo "ROCM_PATH=/opt/rocm" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=/opt/rocm/lib:${LD_LIBRARY_PATH}" >> $GITHUB_ENV
apt-get autoclean
- name: Configure and Build
shell: bash
run: |
cd Libraries && mkdir build && cd build
cmake -DGPU_TARGETS="${GPU_TARGETS}" -S ..
cmake --build . -j 4
# Clean the workspace here since other jobs may not have the permissions to do so later
# (needed for self-hosted runners)
- name: Clean the workspace
run: find $GITHUB_WORKSPACE -mindepth 1 -delete