name: rocprofiler-sdk ROCm Release Compatibility permissions: contents: read on: workflow_dispatch: push: branches: - develop paths: - '.github/workflows/rocprofiler-sdk-rocm_release_compatibility.yml' - 'projects/rocprofiler-sdk/**' - '!**/*.md' - '!**/*.rtf' - '!**/*.rst' - '!**/.markdownlint-ci2.yaml' - '!**/.readthedocs.yaml' - '!**/.spellcheck.local.yaml' - '!**/.wordlist.txt' - '!projects/rocprofiler-sdk/CODEOWNERS' - '!projects/rocprofiler-sdk/source/docs/**' pull_request: paths: - '.github/workflows/rocprofiler-sdk-rocm_release_compatibility.yml' - 'projects/rocprofiler-sdk/**' - '!**/*.md' - '!**/*.rtf' - '!**/*.rst' - '!**/.markdownlint-ci2.yaml' - '!**/.readthedocs.yaml' - '!**/.spellcheck.local.yaml' - '!**/.wordlist.txt' - '!projects/rocprofiler-sdk/CODEOWNERS' - '!projects/rocprofiler-sdk/source/docs/**' 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: image: 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 timeout-minutes: 10 shell: bash run: | cd projects/rocprofiler-sdk git config --global --add safe.directory '*' apt update apt install -y wget build-essential cmake g++-11 g++-12 python3-pip libdw-dev libsqlite3-dev # Older ROCm versions don't provide these packages. apt install -y rccl-dev rccl-unittests || true apt install -y rocjpeg-dev rocjpeg-test rocdecode-dev rocdecode-test || true 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: | cd projects/rocprofiler-sdk 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 working-directory: projects/rocprofiler-sdk 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: cd projects/rocprofiler-sdk cmake --build build --target install