CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
220 lines
7.6 KiB
YAML
220 lines
7.6 KiB
YAML
name: rocprofiler-compute Continuous Integration
|
|
run-name: rocprofiler-compute-ci
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 6 * * *'
|
|
workflow_dispatch:
|
|
inputs:
|
|
mode:
|
|
description: 'Build mode'
|
|
required: false
|
|
default: 'continuous'
|
|
type: choice
|
|
options:
|
|
- continuous
|
|
- nightly
|
|
push:
|
|
branches: [ develop ]
|
|
paths:
|
|
- '.github/workflows/rocprofiler-compute-continuous-integration.yml'
|
|
- 'projects/rocprofiler-compute/**'
|
|
- '!**/*.md'
|
|
- '!**/*.rtf'
|
|
- '!**/*.rst'
|
|
- '!**/.markdownlint-ci2.yaml'
|
|
- '!**/.readthedocs.yaml'
|
|
- '!**/.spellcheck.local.yaml'
|
|
- '!**/.wordlist.txt'
|
|
- '!projects/rocprofiler-compute/docs/**'
|
|
- '!projects/rocprofiler-compute/source/docs/**'
|
|
- '!projects/rocprofiler-compute/source/python/gui/**'
|
|
- '!projects/rocprofiler-compute/docker/**'
|
|
- '!projects/rocprofiler-compute/CMakePresets.json'
|
|
pull_request:
|
|
paths:
|
|
- '.github/workflows/rocprofiler-compute-continuous-integration.yml'
|
|
- 'projects/rocprofiler-compute/**'
|
|
- '!**/*.md'
|
|
- '!**/*.rtf'
|
|
- '!**/*.rst'
|
|
- '!**/.markdownlint-ci2.yaml'
|
|
- '!**/.readthedocs.yaml'
|
|
- '!**/.spellcheck.local.yaml'
|
|
- '!**/.wordlist.txt'
|
|
- '!projects/rocprofiler-compute/docs/**'
|
|
- '!projects/rocprofiler-compute/source/docs/**'
|
|
- '!projects/rocprofiler-compute/source/python/gui/**'
|
|
- '!projects/rocprofiler-compute/docker/**'
|
|
- '!projects/rocprofiler-compute/CMakePresets.json'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
ROCPROFSYS_CI: ON
|
|
ROCM_PATH: "/opt/rocm"
|
|
|
|
jobs:
|
|
prepare_matrix:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
matrix: ${{ steps.generate_matrix.outputs.matrix }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
sparse-checkout: projects/rocprofiler-compute/.github
|
|
|
|
- name: Generate and output matrix
|
|
id: generate_matrix
|
|
working-directory: projects/rocprofiler-compute/.github
|
|
run: |
|
|
if [ '${{ github.event_name }}' = 'schedule' ] || [ '${{ inputs.mode }}' = 'nightly' ]; then
|
|
MATRIX_CONTENT=$(cat ci-matrix.yml | yq '.matrix-ubuntu-nightly' -I=0 -o=json)
|
|
else
|
|
MATRIX_CONTENT=$(cat ci-matrix.yml | yq '.matrix-ubuntu-ci' -I=0 -o=json)
|
|
fi
|
|
echo "matrix=${MATRIX_CONTENT}" >> $GITHUB_OUTPUT
|
|
|
|
ubuntu:
|
|
name: Ubuntu ${{ matrix.system.os-release }} • ${{ matrix.system.arch }}
|
|
needs: prepare_matrix
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
system: ${{ fromJSON(needs.prepare_matrix.outputs.matrix) }}
|
|
runs-on: ${{ matrix.system.runner }}
|
|
env:
|
|
HIP_PLATFORM: "amd"
|
|
OMPI_ALLOW_RUN_AS_ROOT: 1
|
|
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
|
|
permissions:
|
|
packages: read
|
|
container:
|
|
image: ghcr.io/rocm/rocprofiler-ubuntu:${{ matrix.system.os-release }}-compute-ci-multiarch
|
|
# --env-file /etc/podinfo/gha-gpu-isolation-settings - Required for GPU isolation on OSSCI MIXXX runners
|
|
options:
|
|
--privileged
|
|
--ipc host
|
|
--group-add video
|
|
--device /dev/kfd
|
|
--device /dev/dri
|
|
--cap-add CAP_SYS_ADMIN
|
|
--env-file /etc/podinfo/gha-gpu-isolation-settings
|
|
--pull always
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
ref: ${{ github.event_name == 'schedule' && 'rocprofiler-compute-develop' || github.ref }}
|
|
sparse-checkout: |
|
|
projects/rocprofiler-compute
|
|
shared/ctest
|
|
|
|
- name: Setup Environment
|
|
id: setup_env
|
|
run: |
|
|
if [ '${{ github.event_name }}' = 'schedule' ]; then
|
|
MODE=Nightly
|
|
ADD_COVERAGE="--coverage"
|
|
else
|
|
MODE=Continuous
|
|
ADD_COVERAGE=""
|
|
fi
|
|
echo "mode=${MODE}" >> $GITHUB_OUTPUT
|
|
echo "add_coverage=${ADD_COVERAGE}" >> $GITHUB_OUTPUT
|
|
|
|
if [ '${{ matrix.system.os-release }}' = '24.04' ]; then
|
|
CODE_NAME=noble
|
|
else
|
|
CODE_NAME=jammy
|
|
fi
|
|
echo "code_name=${CODE_NAME}" >> $GITHUB_OUTPUT
|
|
|
|
- name: Install dependencies
|
|
shell: bash
|
|
run: |
|
|
apt-get update
|
|
apt install -y libdw-dev pkg-config
|
|
echo "✅ ROCm Dependencies Installed!"
|
|
|
|
- name: Install Latest Nightly ROCm
|
|
run: |
|
|
set -e
|
|
mkdir ${{ env.ROCM_PATH }}
|
|
TARBALL_ROCM_VERSION=$(ls /opt/*.tar.gz | grep -Eo '*([0-9]+\.[0-9]+\.[0-9]+)*')
|
|
tar -xf ${{ env.ROCM_PATH }}-${TARBALL_ROCM_VERSION}-multiarch.tar.gz -C ${{ env.ROCM_PATH }}
|
|
rm ${{ env.ROCM_PATH }}-${TARBALL_ROCM_VERSION}-multiarch.tar.gz
|
|
echo "ROCm installed to: ${{ env.ROCM_PATH }}"
|
|
echo "✅ ROCm Installation Complete!"
|
|
|
|
- name: Output TheRock Manifest
|
|
run: |
|
|
cat ${{ env.ROCM_PATH }}/share/therock/therock_manifest.json
|
|
|
|
- name: Install Python Requirements
|
|
working-directory: projects/rocprofiler-compute
|
|
run: |
|
|
pip --version
|
|
for i in 1 2 3; do
|
|
pip install -r requirements.txt --break-system-packages --ignore-installed --timeout 60 && break
|
|
echo "⚠️ pip install attempt $i failed, retrying..."
|
|
sleep 10
|
|
done
|
|
for i in 1 2 3; do
|
|
pip install -r requirements-test.txt --break-system-packages --ignore-installed --timeout 60 && break
|
|
echo "⚠️ pip install attempt $i failed, retrying..."
|
|
sleep 10
|
|
done
|
|
echo "✅ pip requirements installed!"
|
|
|
|
- name: Configure, Build, and Test
|
|
id: test
|
|
continue-on-error: true
|
|
timeout-minutes: ${{ steps.setup_env.outputs.mode == 'Nightly' && 120 || 90 }}
|
|
working-directory: projects/rocprofiler-compute
|
|
run: |
|
|
set -e
|
|
git config --global --add safe.directory ${GITHUB_WORKSPACE}
|
|
git config --global --add safe.directory ${PWD}
|
|
PATH=${{ env.ROCM_PATH }}/bin:${{ env.ROCM_PATH }}/llvm/bin:$PATH \
|
|
LD_LIBRARY_PATH=${{ env.ROCM_PATH }}/lib:${{ env.ROCM_PATH }}/llvm/lib:${{ env.ROCM_PATH }}/lib/rocm_sysdeps/lib:$LD_LIBRARY_PATH \
|
|
python3 ./tools/run-ci.py \
|
|
--name "ROCm/rocprofiler-compute-${{ github.ref_name }}-ubuntu-${{ matrix.system.os-release }}-${{ matrix.system.gpu }}" \
|
|
--actor "${{ github.actor }}" \
|
|
--site ${{ matrix.system.runner }} \
|
|
--mode ${{ steps.setup_env.outputs.mode }} \
|
|
--build-jobs 16 \
|
|
${{ steps.setup_env.outputs.add_coverage }} \
|
|
-- \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_PREFIX_PATH=${{ env.ROCM_PATH }} \
|
|
-DENABLE_TESTS=ON \
|
|
-DINSTALL_TESTS=ON \
|
|
-DPYTEST_NUMPROCS=8 \
|
|
-- \
|
|
-L full \
|
|
-LE full_rocprofiler_compute_ci_exclude
|
|
|
|
- name: Upload Test Logs (on failure)
|
|
if: steps.test.outcome == 'failure'
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: failed-test-logs-ubuntu-${{ matrix.system.os-release }}-${{ matrix.system.arch }}
|
|
path: |
|
|
projects/rocprofiler-compute/build/ctest-results.xml
|
|
projects/rocprofiler-compute/build/Testing/Temporary/**
|
|
retention-days: 2
|
|
|
|
- name: Check Test Results
|
|
if: always()
|
|
shell: bash
|
|
run: |
|
|
if [[ "${{ steps.test.outcome }}" == "failure" ]]; then
|
|
echo "::error::Tests failed - see CDash for details: https://my.cdash.org/index.php?project=rocprofiler-compute"
|
|
exit 1
|
|
fi
|
|
echo "✅ All tests passed!"
|