Skip to content

Add AMD ROCm/HIP platform support #453

Add AMD ROCm/HIP platform support

Add AMD ROCm/HIP platform support #453

name: CMake on Linux (x86_64)
on:
#push:
# branches: [ $default-branch ]
pull_request:
branches: ["LTS-C*"]
jobs:
build:
runs-on: [self-hosted, linux, x64]
strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations.
# Consider changing this to true when your workflow is stable.
fail-fast: false
matrix: #host,cuda,cuda_toolkit
include:
- host_compiler: "g++-13"
cuda_toolkit: "12.9"
- host_compiler: "g++-13"
cuda_toolkit: "13.0"
- host_compiler: "g++-13"
cuda_toolkit: "13.2"
- host_compiler: "clang++-21"
cuda_toolkit: "12.9"
- host_compiler: "clang++-21"
cuda_toolkit: "13.0"
- host_compiler: "clang++-21"
cuda_toolkit: "13.2"
steps:
- uses: actions/checkout@v4
- name: Set reusable strings and path
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
run: |
echo "build-output-dir=${{github.workspace}}/build" >> "$GITHUB_OUTPUT"
echo "PATH=/home/cudeiro/cmake-4.2.1-linux-x86_64/bin/:$PATH" >> "$GITHUB_ENV"
echo "CUDACXX=/usr/local/cuda-${{matrix.cuda_toolkit}}/bin/nvcc" >> "$GITHUB_ENV"
echo "CC=${{matrix.host_compiler}}" >> "$GITHUB_ENV"
echo "CXX=${{matrix.host_compiler}}" >> "$GITHUB_ENV"
- name: Configure CMake
run: |
cmake -G "Ninja" -B ${{steps.strings.outputs.build-output-dir}} -DCMAKE_BUILD_TYPE="Release" -S ${{github.workspace}}
- name: Build
run: |
cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Release
- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: |
ctest --build-config Release --output-junit test_results.xml