| # Copyright 2023 The IREE Authors | |
| # | |
| # Licensed under the Apache License v2.0 with LLVM Exceptions. | |
| # See https://llvm.org/LICENSE.txt for license information. | |
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| name: PkgCI | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| # Experimental branches can also get packages and tests automatically. | |
| - exppkg-* | |
| # Short term feature branches: | |
| - sdxl | |
| 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: | |
| uses: ./.github/workflows/setup.yml | |
| build_packages: | |
| name: Build Packages | |
| needs: setup | |
| if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'build_packages') | |
| uses: ./.github/workflows/pkgci_build_packages.yml | |
| # Package sanity checks. | |
| unit_test: | |
| name: Unit Test | |
| needs: [setup, build_packages] | |
| if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'unit_test') | |
| uses: ./.github/workflows/pkgci_unit_test.yml | |
| ########################### Hardware/accelerators ########################### | |
| # Jobs that run unit tests on special hardware platforms or accelerators | |
| ############################################################################# | |
| test_amd_w7900: | |
| name: Test AMD W7900 | |
| needs: [setup, build_packages] | |
| if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'test_amd_w7900') | |
| uses: ./.github/workflows/pkgci_test_amd_w7900.yml | |
| test_amd_r9700: | |
| name: Test AMD R9700 | |
| needs: [setup, build_packages] | |
| if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'test_amd_r9700') | |
| uses: ./.github/workflows/pkgci_test_amd_r9700.yml | |
| # TODO(#18238): migrate to new runner cluster | |
| # test_nvidia_t4: | |
| # name: Test NVIDIA T4 | |
| # needs: [setup, build_packages] | |
| # if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'test_nvidia_t4') | |
| # uses: ./.github/workflows/pkgci_test_nvidia_t4.yml | |
| test_android: | |
| name: Test Android | |
| needs: [setup, build_packages] | |
| if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'test_android') | |
| uses: ./.github/workflows/pkgci_test_android.yml | |
| with: | |
| write-caches: ${{ needs.setup.outputs.write-caches }} | |
| test_riscv64: | |
| name: Test RISC-V 64 | |
| needs: [setup, build_packages] | |
| if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'test_riscv64') | |
| uses: ./.github/workflows/pkgci_test_riscv64.yml | |
| with: | |
| write-caches: ${{ needs.setup.outputs.write-caches }} | |
| ################################# Frameworks ################################ | |
| # Jobs that test machine learning frameworks or their Python APIs | |
| ############################################################################# | |
| test_onnx: | |
| name: Test ONNX | |
| needs: [setup, build_packages] | |
| if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'test_onnx') | |
| uses: ./.github/workflows/pkgci_test_onnx.yml | |
| test_sharktank: | |
| name: Test Sharktank | |
| needs: [setup, build_packages] | |
| if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'test_sharktank') | |
| uses: ./.github/workflows/pkgci_test_sharktank.yml | |
| test_torch: | |
| name: Test Torch | |
| needs: [setup, build_packages] | |
| if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'test_torch') | |
| uses: ./.github/workflows/pkgci_test_torch.yml | |
| test_tensorflow: | |
| name: Test TensorFlow | |
| needs: [setup, build_packages] | |
| if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'test_tensorflow') | |
| uses: ./.github/workflows/pkgci_test_tensorflow.yml | |
| test_pjrt: | |
| name: Test PJRT plugin | |
| needs: [setup, build_packages] | |
| if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'test_pjrt') | |
| uses: ./.github/workflows/pkgci_test_pjrt.yml | |
| with: | |
| write-caches: ${{ needs.setup.outputs.write-caches }} | |
| ############################################################################## | |
| # Aggregate job status and alerting on failures. | |
| pkgci_summary: | |
| if: always() | |
| needs: | |
| - setup | |
| - build_packages | |
| - unit_test | |
| - test_amd_w7900 | |
| - test_amd_r9700 | |
| # - test_nvidia_t4 | |
| - test_android | |
| - test_riscv64 | |
| - test_onnx | |
| - test_sharktank | |
| - test_tensorflow | |
| - test_pjrt | |
| uses: ./.github/workflows/workflow_summary.yml | |
| secrets: inherit | |
| with: | |
| jobs-json: ${{ toJson(needs) }} |