diff --git a/projects/rocprofiler-sdk/.github/workflows/rocm_release_compatibility.yml b/projects/rocprofiler-sdk/.github/workflows/rocm_release_compatibility.yml new file mode 100644 index 0000000000..11c031d3bd --- /dev/null +++ b/projects/rocprofiler-sdk/.github/workflows/rocm_release_compatibility.yml @@ -0,0 +1,112 @@ +name: ROCm Release Compatibility + +permissions: + contents: read + +on: + workflow_dispatch: + push: + branches: [ amd-staging, amd-mainline ] + paths-ignore: + - '*.md' + - 'source/docs/**' + - 'CODEOWNERS' + pull_request: + paths-ignore: + - '*.md' + - 'source/docs/**' + - 'CODEOWNERS' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + ROCM_PATH: "/opt/rocm" + PATH: "/usr/bin:$PATH" + +jobs: + rocm-release-compatibility: + strategy: + fail-fast: false + matrix: + rocm-release: ['6.2', '6.3', '6.4', 'latest'] + os: ['ubuntu-22.04'] + build-type: ['Release'] + + runs-on: ubuntu-latest + container: rocm/dev-${{ matrix.os }}:${{ matrix.rocm-release }} + + # define this for containers + env: + GIT_DISCOVERY_ACROSS_FILESYSTEM: 1 + + steps: + - name: Install Git + timeout-minutes: 25 + run: | + apt-get update + apt-get install -y software-properties-common + add-apt-repository -y ppa:git-core/ppa + apt-get update + apt-get install -y git + + - uses: actions/checkout@v4 + + - name: Install requirements + if: ${{ matrix.rocm-release == '6.2' }} + timeout-minutes: 10 + shell: bash + run: | + git config --global --add safe.directory '*' + apt-get update + apt-get install -y build-essential cmake g++-11 g++-12 python3-pip libdw-dev libsqlite3-dev + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 10 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11 + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 20 --slave /usr/bin/g++ g++ /usr/bin/g++-12 --slave /usr/bin/gcov gcov /usr/bin/gcov-12 + python3 -m pip install -U --user -r requirements.txt + + - name: Install requirements + if: ${{ matrix.rocm-release != '6.2' }} + timeout-minutes: 10 + shell: bash + run: | + git config --global --add safe.directory '*' + apt-get update + apt-get install -y build-essential cmake g++-11 g++-12 python3-pip libdw-dev libsqlite3-dev rccl-dev rccl-unittests rocjpeg-dev rocjpeg-test rocdecode-dev rocdecode-test + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 10 --slave /usr/bin/g++ g++ /usr/bin/g++-11 --slave /usr/bin/gcov gcov /usr/bin/gcov-11 + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 20 --slave /usr/bin/g++ g++ /usr/bin/g++-12 --slave /usr/bin/gcov gcov /usr/bin/gcov-12 + python3 -m pip install -U --user -r requirements.txt + + - name: List Files + shell: bash + run: | + echo "Number of processors: $(nproc)" + echo "PATH: ${PATH}" + echo "LD_LIBRARY_PATH: ${LD_LIBRARY_PATH}" + which-realpath() { echo -e "\n$1 resolves to $(realpath $(which $1))"; echo "$($(which $1) --version &> /dev/stdout | head -n 1)"; } + for i in python3 git cmake ctest gcc g++ gcov; do which-realpath $i; done + cat /opt/rocm/.info/version + ls -la + + - name: Configure and Build + timeout-minutes: 30 + shell: bash + run: + python3 ./source/scripts/run-ci.py -B build + --name ${{ github.repository }}-${{ github.ref_name }}-${{ matrix.os }}-rocm-${{ matrix.rocm-release }} + --build-jobs 4 + --site "$(hostname)" + --stages Start Update Configure Build Submit + --run-attempt ${{ github.run_attempt }} + --disable-cdash + -- + -DROCPROFILER_DEP_ROCMCORE=ON + -DROCPROFILER_BUILD_{TESTS,SAMPLES,DOCS}=OFF + -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} + -DCMAKE_INSTALL_PREFIX="$(realpath /opt/rocm)" + -DPython3_EXECUTABLE=$(which python3) + + - name: Install + timeout-minutes: 10 + run: + cmake --build build --target install