From 939e4d611b904f82486e29bf7522f0b7a0d7a71a Mon Sep 17 00:00:00 2001 From: Luis Machado Date: Fri, 8 May 2026 03:18:10 -0500 Subject: [PATCH] Add nightly build workflow and refactor CI for branch flexibility Introduces scheduled nightly builds of ROCgdb master branch and refactors the TheRock CI workflows to support building from different branches. Changes: - Add nightly-build.yml workflow that runs at 2:07 AM UTC daily - Support manual dispatch with configurable branch (defaults to master) - Add rocgdb_ref input to therock-ci-linux.yml for branch selection - Move extra_cmake_options from therock-ci.yml to therock-ci-linux.yml defaults to enable reuse across different workflow callers - Enable upstream builds for nightly with THEROCK_ROCGDB_UPSTREAM_BUILD flag This allows testing integration against master while keeping PR-based CI unchanged. Co-Authored-By: Claude Sonnet 4 --- .github/workflows/nightly-build.yml | 53 ++++++++++++++++++++++++++ .github/workflows/therock-ci-linux.yml | 13 +++++++ .github/workflows/therock-ci.yml | 8 ---- 3 files changed, 66 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/nightly-build.yml diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml new file mode 100644 index 00000000000..51a3a171b8f --- /dev/null +++ b/.github/workflows/nightly-build.yml @@ -0,0 +1,53 @@ +name: Nightly ROCgdb Build + +on: + schedule: + # Run at 2:00 AM UTC every night (avoid :00 and :30 to reduce API load) + - cron: '7 2 * * *' + workflow_dispatch: + inputs: + branch: + description: 'Branch to build (default: master)' + required: false + default: 'master' + type: string + +permissions: + contents: read + +jobs: + nightly-build-linux: + name: Nightly Build Linux + permissions: + contents: read + id-token: write + strategy: + fail-fast: false + matrix: + amdgpu_family: [gfx94X-dcgpu] + uses: ./.github/workflows/therock-ci-linux.yml + secrets: inherit + with: + amdgpu_families: ${{ matrix.amdgpu_family }} + artifact_group: nightly-${{ matrix.amdgpu_family }} + rocgdb_ref: ${{ inputs.branch || 'master' }} + extra_cmake_options: -DTHEROCK_ROCGDB_UPSTREAM_BUILD=ON + + nightly_build_summary: + name: Nightly Build Summary + if: always() + needs: + - nightly-build-linux + 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 diff --git a/.github/workflows/therock-ci-linux.yml b/.github/workflows/therock-ci-linux.yml index 9ecd4e6861b..1a4c6e98879 100644 --- a/.github/workflows/therock-ci-linux.yml +++ b/.github/workflows/therock-ci-linux.yml @@ -9,6 +9,18 @@ on: type: string extra_cmake_options: type: string + default: > + -DTHEROCK_ENABLE_ALL=OFF + -DTHEROCK_BUILD_TESTING=ON + -DTHEROCK_ENABLE_DEBUG_TOOLS=ON + -DTHEROCK_SHARED_PYTHON_EXECUTABLES=/opt/python-shared/cp310-cp310/bin/python3;/opt/python-shared/cp311-cp311/bin/python3;/opt/python-shared/cp312-cp312/bin/python3;/opt/python-shared/cp313-cp313/bin/python3;/opt/python-shared/cp314-cp314/bin/python3 + -DTHEROCK_DIST_PYTHON_EXECUTABLES=/opt/python/cp310-cp310/bin/python;/opt/python/cp311-cp311/bin/python;/opt/python/cp312-cp312/bin/python;/opt/python/cp313-cp313/bin/python + -DTHEROCK_USE_EXTERNAL_ROCGDB=ON + -DTHEROCK_ROCGDB_SOURCE_DIR=./rocgdb_under_test + rocgdb_ref: + type: string + required: false + description: 'Branch/ref to checkout for rocGDB (defaults to workflow trigger ref)' permissions: contents: read @@ -43,6 +55,7 @@ jobs: uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: path: rocgdb_under_test + ref: ${{ inputs.rocgdb_ref || github.ref }} - name: Install python deps run: | diff --git a/.github/workflows/therock-ci.yml b/.github/workflows/therock-ci.yml index be4ebf26d83..a428d715e40 100644 --- a/.github/workflows/therock-ci.yml +++ b/.github/workflows/therock-ci.yml @@ -51,14 +51,6 @@ jobs: with: amdgpu_families: ${{ matrix.amdgpu_family }} artifact_group: ${{ matrix.amdgpu_family }} - extra_cmake_options: > - -DTHEROCK_ENABLE_ALL=OFF - -DTHEROCK_BUILD_TESTING=ON - -DTHEROCK_ENABLE_DEBUG_TOOLS=ON - -DTHEROCK_SHARED_PYTHON_EXECUTABLES=/opt/python-shared/cp310-cp310/bin/python3;/opt/python-shared/cp311-cp311/bin/python3;/opt/python-shared/cp312-cp312/bin/python3;/opt/python-shared/cp313-cp313/bin/python3;/opt/python-shared/cp314-cp314/bin/python3 - -DTHEROCK_DIST_PYTHON_EXECUTABLES=/opt/python/cp310-cp310/bin/python;/opt/python/cp311-cp311/bin/python;/opt/python/cp312-cp312/bin/python;/opt/python/cp313-cp313/bin/python - -DTHEROCK_USE_EXTERNAL_ROCGDB=ON - -DTHEROCK_ROCGDB_SOURCE_DIR=./rocgdb_under_test therock_ci_summary: name: TheRock CI Summary