ci: add multi-arch CI with baked-ROCm images for 2 new distros (so far) #788
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Applications CUDA | |
| on: | |
| push: | |
| branches: [ amd-staging, amd-mainline, release/** ] | |
| paths: | |
| - 'Applications/**' | |
| - '.github/workflows/**' | |
| pull_request: | |
| branches: [ amd-staging, amd-mainline, release/** ] | |
| paths: | |
| - 'Applications/**' | |
| - '.github/workflows/**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.number || github.sha }} | |
| cancel-in-progress: true | |
| env: | |
| DEBIAN_FRONTEND: noninteractive | |
| ROCM_VERSION: '7.2' | |
| AMDGPU_INSTALLER_VERSION: 7.2.70200-1 | |
| jobs: | |
| build: | |
| name: "Build Applications CUDA" | |
| runs-on: ubuntu-latest | |
| container: | |
| image: nvidia/cuda:12.8.1-cudnn-devel-ubuntu22.04 | |
| defaults: | |
| run: | |
| shell: bash | |
| 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 git | |
| python3 -m pip install --upgrade pip | |
| python3 -m pip install cmake | |
| - name: Install Hip for CUDA | |
| run: | | |
| 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 hip-dev hipify-clang | |
| 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 | |
| - name: Setup ROCm Libraries monorepo | |
| run: | | |
| git clone --no-checkout --depth=1 --filter=tree:0 https://github.com/ROCm/rocm-libraries.git | |
| cd rocm-libraries | |
| git sparse-checkout init --cone | |
| git sparse-checkout set projects/hipcub projects/hiprand | |
| git checkout develop | |
| - name: Build and install hipCUB | |
| run: | | |
| cd rocm-libraries/projects/hipcub; mkdir build; cd build | |
| HIP_PLATFORM=nvidia cmake -DCMAKE_CXX_COMPILER=nvcc .. | |
| make -j | |
| make install | |
| - name: Build and install hipRAND | |
| run: | | |
| cd rocm-libraries/projects/hiprand; mkdir build; cd build | |
| HIP_PLATFORM=nvidia CXX=g++ cmake -DBUILD_WITH_LIB=CUDA -DHIP_CUDA_lowest_cc=60 .. | |
| make -j | |
| make install | |
| - name: Configure and Build | |
| run: | | |
| cd Applications && mkdir build && cd build | |
| cmake -DROCM_EXAMPLES_GPU_LANGUAGE=CUDA .. | |
| cmake --build . -j |