Skip to content

Refactor GH Actions workflow files to use matrices #17136

Closed

Description

@ScottTodd

These can reduce boilerplate: https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs. They do also change the presentation in the UI, for better or worse.

Places they could be useful:

ci.yml:

  • build_test_all_: arm64, windows, macos_arm64, macos_x86_64, linux
  • build_test_runtime_: arm64, windows, linux
  • configurations: asan,tsan,small_runtime,gcc,tracing,debug,byo_llvm (some re-use possible?)
  • cross_compile_and_test (linux riscv, generic riscv, emscripten): already used, but could rework the naming

pkgci.yml:

  • regression test: CPU, AMDGPU-Vulkan, AMDGPU-ROCm, NVIDIAGPU-Vulkan, NVIDIAGPU-CUDA

Similar issues:

Activity

  1. added
    infrastructure
    on Apr 23, 2024
  2. self-assigned this
    on Apr 23, 2024
  3. ScottTodd commented on Jun 3, 2024

    @ScottTodd
    MemberAuthor

    For the "configurations" jobs, I want to try adding a CMake preset for each configuration here: https://github.com/iree-org/iree/tree/main/build_tools/cmake/presets then setting up a matrix like

        strategy:
          fail-fast: false
          matrix:
            include:
              - name: gcc
                runs-on: ubuntu-20.04
                container: ...
                preset: .../gcc.json
                configure: true
                build: true
                test: true

    could then add some presets we want to test just the configure step. Tests enabled/disabled, samples enabled/disabled, all input plugins disabled, etc.

    If we feel that generates too many jobs and clutters PRs with checks, we could have the job just run nightly on a schedule instead of on pull_request and push events.

  4. ScottTodd commented on Jul 16, 2024

    @ScottTodd
    MemberAuthor

    Jobs using matrices really need their underlying runners to be stable and available in high enough quantities, so that the jobs can be always enabled and not conditional on a condition like presubmit vs postsubmit. #17927 is working around runner availability issues and the matrix isn't nicely compatible with optional jobs.

  5. ScottTodd commented on Jul 24, 2024

    @ScottTodd
    MemberAuthor

    Going to call this fixed for now. Not much more to track in this issue and may be moving away from matrices so we can more precisely control which jobs run after which triggers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

cleanup 🧹infrastructure

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions