merge main into amd-staging #1271
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright Advanced Micro Devices, Inc. | |
| # SPDX-License-Identifier: MIT | |
| # Multi-Arch CI | |
| # | |
| # This is a staging workflow for the sharded multi-arch build pipeline. | |
| # It mirrors ci.yml but uses multi_arch_build_portable_linux.yml instead of | |
| # ci_linux.yml. Once validated, ci.yml will be updated to use the multi-arch | |
| # sub-workflows directly. | |
| # | |
| # Same `ci:skip` rules as rockci-amd-staging.yml: only automated LLVM_MAIN_REVISION PRs | |
| # (matching title/body) skip presubmit; label alone is not enough. | |
| name: Multi-Arch CI amd-staging | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - multi_arch/** | |
| - release/therock-* | |
| workflow_dispatch: | |
| inputs: | |
| linux_amdgpu_families: | |
| type: string | |
| description: "Insert comma-separated list of Linux GPU families to build and test. ex: gfx94X, gfx120X" | |
| default: "" | |
| linux_test_labels: | |
| type: string | |
| description: "If enabled, reduce test set on Linux to the list of labels prefixed with 'test:'. ex: test:rocprim, test:hipcub" | |
| default: "" | |
| windows_amdgpu_families: | |
| type: string | |
| description: "Insert comma-separated list of Windows GPU families to build and test. ex: gfx94X, gfx120X" | |
| default: "" | |
| windows_test_labels: | |
| type: string | |
| description: "If enabled, reduce test set on Windows to the list of labels prefixed with 'test:' ex: test:rocprim, test:hipcub" | |
| default: "" | |
| prebuilt_stages: | |
| type: string | |
| default: "" | |
| description: "Comma-separated build stages to skip (or 'all' for all stages); artifacts are copied from baseline_run_id instead" | |
| baseline_run_id: | |
| type: string | |
| default: "" | |
| description: "Workflow run ID to copy prebuilt stage artifacts from; required when prebuilt_stages is set" | |
| pull_request: | |
| branches: [amd-staging] | |
| types: | |
| - labeled | |
| - opened | |
| - synchronize | |
| - reopened | |
| permissions: | |
| contents: read | |
| concurrency: | |
| # A PR number if a pull request and otherwise the commit hash. This cancels | |
| # queued and in-progress runs for the same PR (presubmit) or commit | |
| # (postsubmit). The workflow name is prepended to avoid conflicts between | |
| # different workflows. | |
| group: ${{ github.workflow }}-${{ github.event.number || github.sha }} | |
| cancel-in-progress: true | |
| jobs: | |
| setup: | |
| if: >- | |
| github.event_name != 'pull_request' || | |
| (github.event.pull_request && | |
| !( | |
| contains(github.event.pull_request.labels.*.name, 'ci:skip') && | |
| ( | |
| contains(github.event.pull_request.title, 'Update LLVM_MAIN_REVISION') || | |
| ( | |
| contains(github.event.pull_request.body, 'Automated update of') && | |
| contains(github.event.pull_request.body, 'LLVM_MAIN_REVISION') | |
| ) | |
| ) | |
| )) | |
| uses: ./.github/workflows/setup_multi_arch.yml | |
| with: | |
| build_variant: "release" | |
| linux_build_and_test: | |
| name: Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} | |
| needs: setup | |
| if: >- | |
| ${{ | |
| needs.setup.outputs.linux_build_config != '' && | |
| needs.setup.outputs.enable_build_jobs == 'true' | |
| }} | |
| uses: ./.github/workflows/multi_arch_ci_linux.yml | |
| secrets: inherit | |
| with: | |
| build_config: ${{ needs.setup.outputs.linux_build_config }} | |
| test_labels: ${{ needs.setup.outputs.linux_test_labels }} | |
| rocm_package_version: ${{ needs.setup.outputs.rocm_package_version }} | |
| test_type: ${{ needs.setup.outputs.test_type }} | |
| permissions: | |
| contents: read | |
| id-token: write | |
| windows_build_and_test: | |
| name: Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} | |
| needs: setup | |
| if: >- | |
| ${{ | |
| needs.setup.outputs.windows_build_config != '' && | |
| needs.setup.outputs.enable_build_jobs == 'true' | |
| }} | |
| uses: ./.github/workflows/multi_arch_ci_windows.yml | |
| secrets: inherit | |
| with: | |
| build_config: ${{ needs.setup.outputs.windows_build_config }} | |
| test_labels: ${{ needs.setup.outputs.windows_test_labels }} | |
| rocm_package_version: ${{ needs.setup.outputs.rocm_package_version }} | |
| test_type: 'smoke' | |
| permissions: | |
| contents: read | |
| id-token: write | |
| ci_summary: | |
| name: CI Summary | |
| if: always() | |
| needs: | |
| - setup | |
| - linux_build_and_test | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| repository: "ROCm/TheRock" | |
| ref: 'compiler/amd-staging' | |
| - name: Evaluate workflow results | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| run: | | |
| python build_tools/github_actions/workflow_summary.py \ | |
| --needs-json '${{ toJSON(needs) }}' |