Files
TheRock/rocm-libraries/.github/workflows/therock-ci-nightly.yml
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

202 lines
7.8 KiB
YAML

name: TheRock CI Nightly
on:
schedule:
- cron: "0 7 * * *" # Runs nightly at 7 AM UTC
workflow_dispatch:
inputs:
projects:
type: string
description: "Insert space-separated list of projects to test or 'all' to test all projects. ex: 'projects/rocprim projects/hipcub'"
therock_ref_override:
type: string
description: "Optional explicit TheRock ref (branch/tag/SHA) to build against. Empty resolves the live tip of ROCm/TheRock@main."
default: ""
permissions:
contents: read
jobs:
setup:
name: "Setup"
runs-on: ubuntu-24.04
outputs:
therock_ref: ${{ steps.checkout_therock.outputs.commit }}
docker_image: ${{ steps.ci-env.outputs.docker-image }}
rocm_package_version: ${{ steps.rocm_package_version.outputs.rocm_package_version }}
linux_projects: ${{ steps.linux_projects.outputs.linux_projects }}
linux_build_runs_on: ${{ steps.linux_projects.outputs.build_runs_on }}
windows_projects: ${{ steps.windows_projects.outputs.windows_projects }}
windows_build_runs_on: ${{ steps.windows_projects.outputs.build_runs_on }}
test_type: ${{ steps.linux_projects.outputs.test_type }}
linux_package_targets: ${{ steps.configure_linux.outputs.package_targets }}
windows_package_targets: ${{ steps.configure_windows.outputs.package_targets }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
sparse-checkout: .github
sparse-checkout-cone-mode: true
fetch-depth: 2
- name: Load CI environment
id: ci-env
uses: ./.github/actions/ci-env
# Resolve the TheRock ref to build against exactly once here. By default
# this is the live tip of ROCm/TheRock@main; the checkout records the
# concrete SHA as steps.checkout_therock.outputs.commit, which is what
# every downstream job consumes (via needs.setup.outputs.therock_ref) so
# no other job re-resolves main. Set the therock_ref_override input to
# pin an explicit ref instead.
- name: Checkout TheRock repository
id: checkout_therock
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: "ROCm/TheRock"
path: TheRock
ref: ${{ inputs.therock_ref_override || 'main' }}
- name: Log locked TheRock ref
run: |
RESOLVED_REF="${{ steps.checkout_therock.outputs.commit }}"
COMMIT_URL="https://github.com/ROCm/TheRock/commit/${RESOLVED_REF}"
echo "Locked TheRock ref for this run: ${RESOLVED_REF} (${COMMIT_URL})"
{
echo "### Locked TheRock ref"
echo ""
echo "This nightly builds every job against ROCm/TheRock commit [\`${RESOLVED_REF}\`](${COMMIT_URL})."
} >> "$GITHUB_STEP_SUMMARY"
- name: Checkout CI config
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: ROCm/therock-ci-config
ref: main
path: ci-config
continue-on-error: true
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.12"
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install pydantic requests
- name: Compute package version
id: rocm_package_version
run: |
python TheRock/build_tools/compute_rocm_package_version.py \
--release-type=dev \
--override-git-sha=${{ steps.checkout_therock.outputs.commit }}
- name: Determine Linux projects to run
id: linux_projects
env:
PROJECTS: ${{ inputs.projects }}
PLATFORM: "linux"
CI_CONFIG_PATH: ci-config
run: |
python .github/scripts/therock_configure_ci.py
- name: Determine Windows projects to run
id: windows_projects
env:
PROJECTS: ${{ inputs.projects }}
PLATFORM: "windows"
CI_CONFIG_PATH: ci-config
run: |
python .github/scripts/therock_configure_ci.py
- name: Fetch Linux targets for build and test
env:
THEROCK_PACKAGE_PLATFORM: "linux"
# TODO(geomin12): Allow dynamic values of AMDGPU_FAMILIES, with opt-in options
AMDGPU_FAMILIES: "gfx94X, gfx950"
# Variable comes from ROCm organization variable 'ROCM_THEROCK_TEST_RUNNERS'
ROCM_THEROCK_TEST_RUNNERS: ${{ vars.ROCM_THEROCK_TEST_RUNNERS }}
LOAD_TEST_RUNNERS_FROM_VAR: true
id: configure_linux
run: python ./TheRock/build_tools/github_actions/fetch_package_targets.py
- name: Fetch Windows targets for build and test
env:
THEROCK_PACKAGE_PLATFORM: "windows"
AMDGPU_FAMILIES: "gfx1151"
CI_CONFIG_PATH: ci-config
id: configure_windows
run: python ./TheRock/build_tools/github_actions/fetch_package_targets.py
therock-ci-linux:
name: Linux (${{ matrix.projects.projects_to_test }} | ${{ matrix.target_bundle.amdgpu_family }})
permissions:
contents: read
id-token: write
needs: setup
if: ${{ needs.setup.outputs.linux_projects != '[]' }}
strategy:
fail-fast: false
matrix:
projects: ${{ fromJSON(needs.setup.outputs.linux_projects) }}
target_bundle: ${{ fromJSON(needs.setup.outputs.linux_package_targets) }}
uses: ./.github/workflows/therock-ci-linux.yml
secrets: inherit
with:
therock_ref: ${{ needs.setup.outputs.therock_ref }}
docker_image: ${{ needs.setup.outputs.docker_image }}
rocm_package_version: ${{ needs.setup.outputs.rocm_package_version }}
cmake_options: ${{ matrix.projects.cmake_options }}
projects_to_test: ${{ matrix.projects.projects_to_test }}
test_type: ${{ needs.setup.outputs.test_type }}
amdgpu_families: ${{ matrix.target_bundle.amdgpu_family }}
test_runs_on: ${{ matrix.target_bundle.test_machine }}
build_runs_on: ${{ needs.setup.outputs.linux_build_runs_on }}
therock-ci-windows:
name: Windows (${{ matrix.projects.projects_to_test }} | ${{ matrix.target_bundle.amdgpu_family }})
permissions:
contents: read
id-token: write
needs: setup
if: ${{ needs.setup.outputs.windows_projects != '[]' }}
strategy:
fail-fast: false
matrix:
projects: ${{ fromJSON(needs.setup.outputs.windows_projects) }}
target_bundle: ${{ fromJSON(needs.setup.outputs.windows_package_targets) }}
uses: ./.github/workflows/therock-ci-windows.yml
secrets: inherit
with:
therock_ref: ${{ needs.setup.outputs.therock_ref }}
rocm_package_version: ${{ needs.setup.outputs.rocm_package_version }}
cmake_options: ${{ matrix.projects.cmake_options }}
projects_to_test: ${{ matrix.projects.projects_to_test }}
test_type: ${{ needs.setup.outputs.test_type }}
amdgpu_families: ${{ matrix.target_bundle.amdgpu_family }}
test_runs_on: ${{ matrix.target_bundle.test_machine }}
build_runs_on: ${{ needs.setup.outputs.windows_build_runs_on }}
therock_ci_nightly_summary:
name: TheRock CI Nightly Summary
if: always()
needs:
- setup
- therock-ci-linux
- therock-ci-windows
runs-on: ubuntu-24.04
steps:
- name: Output failed jobs
run: |
echo '${{ toJson(needs) }}'
FAILED_JOBS="$(echo '${{ toJson(needs) }}' \
| jq --raw-output \
'map_values(select(.result!="success" and .result!="skipped")) | keys | join(",")' \
)"
if [[ "${FAILED_JOBS}" != "" ]]; then
echo "The following jobs failed: ${FAILED_JOBS}"
exit 1
fi