Replace `build_all` job from `ci.yml` with `ci_linux_x64_clang.yml`. (#18107)
Cleanup relating to https://github.com/iree-org/iree/issues/16203 and
https://github.com/iree-org/iree/issues/17957.
After https://github.com/iree-org/iree/pull/18070, no jobs in `ci.yml`
are depending on the output of the `build_all` job. All jobs using the
compiler now live in `pkgci.yml` and use packages instead of the
"install dir".
* The reusable
[`build_all.yml`](https://github.com/iree-org/iree/blob/main/.github/workflows/build_all.yml)
workflow is still in use from benchmarking workflows, but those are
unmaintained and may be deleted soon.
* After this is merged I'll set the `linux_x64_clang` check to
"required", so PRs will need it to be passing before they can be merged.
* Now that `ci.yml` is pruned to just a few remaining jobs
(`build_test_all_bazel`, `build_test_runtime`, `small_runtime`,
`tracing`), we can also limit when the workflow runs at all. I've added
some `paths` patterns so this won't run on push events if only files
under `docs/` are changed, for example.
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d0a74bf..7d22051 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -27,11 +27,43 @@
# https://docs.github.com/en/actions/hosting-your-own-runners/using-self-hosted-runners-in-a-workflow
on:
- workflow_dispatch:
- pull_request:
push:
branches:
- main
+ paths:
+ - ".github/workflows/ci.yml"
+ - ".github/workflows/setup.yml"
+ - ".bazelrc"
+ - ".bazelversion"
+ - "WORKSPACE"
+ - "CMakeLists.txt"
+ - "build_tools/**"
+ - "compiler/**"
+ - "llvm-external-projects/**"
+ - "runtime/**"
+ - "samples/**"
+ - "tests/**"
+ - "third_party/**"
+ - "tools/**"
+ pull_request:
+ branches:
+ - main
+ paths:
+ - ".github/workflows/ci.yml"
+ - ".github/workflows/setup.yml"
+ - ".bazelrc"
+ - ".bazelversion"
+ - "WORKSPACE"
+ - "CMakeLists.txt"
+ - "build_tools/**"
+ - "compiler/**"
+ - "llvm-external-projects/**"
+ - "runtime/**"
+ - "samples/**"
+ - "tests/**"
+ - "third_party/**"
+ - "tools/**"
+ workflow_dispatch:
concurrency:
# A PR number if a pull request and otherwise the commit hash. This cancels
@@ -55,16 +87,6 @@
################################### Basic ####################################
# Jobs that build all of IREE "normally"
##############################################################################
- # TODO(scotttodd): drop this job in favor of ci_linux_x64_clang.yml once no jobs depend on it
- build_all:
- needs: setup
- if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'build_all')
- uses: ./.github/workflows/build_all.yml
- with:
- runner-group: ${{ needs.setup.outputs.runner-group }}
- runner-env: ${{ needs.setup.outputs.runner-env }}
- write-caches: ${{ needs.setup.outputs.write-caches }}
- run-tests: true
build_test_all_bazel:
needs: setup
@@ -370,7 +392,6 @@
- setup
# Basic
- - build_all
- build_test_all_bazel
# Accelerators
diff --git a/.github/workflows/ci_linux_x64_clang.yml b/.github/workflows/ci_linux_x64_clang.yml
index 049c268..380ce0a 100644
--- a/.github/workflows/ci_linux_x64_clang.yml
+++ b/.github/workflows/ci_linux_x64_clang.yml
@@ -7,14 +7,36 @@
name: CI - Linux x64 clang
on:
+ push:
+ branches:
+ - main
+ paths:
+ - ".github/workflows/ci_linux_x64_clang.yml"
+ - ".github/workflows/setup.yml"
+ - "CMakeLists.txt"
+ - "build_tools/**"
+ - "compiler/**"
+ - "llvm-external-projects/**"
+ - "runtime/**"
+ - "samples/**"
+ - "tests/**"
+ - "third_party/**"
+ - "tools/**"
pull_request:
branches:
- main
paths:
- ".github/workflows/ci_linux_x64_clang.yml"
- schedule:
- # Weekday mornings at 09:15 UTC = 01:15 PST (UTC - 8).
- - cron: "15 9 * * 1-5"
+ - ".github/workflows/setup.yml"
+ - "CMakeLists.txt"
+ - "build_tools/**"
+ - "compiler/**"
+ - "llvm-external-projects/**"
+ - "runtime/**"
+ - "samples/**"
+ - "tests/**"
+ - "third_party/**"
+ - "tools/**"
workflow_dispatch:
concurrency:
@@ -31,6 +53,7 @@
linux_x64_clang:
needs: setup
+ if: contains(fromJson(needs.setup.outputs.enabled-jobs), 'linux_x64_clang')
runs-on:
- self-hosted # must come first
- runner-group=${{ needs.setup.outputs.runner-group }}
diff --git a/.github/workflows/ci_linux_x64_clang_asan.yml b/.github/workflows/ci_linux_x64_clang_asan.yml
index e291c5c..e634bde 100644
--- a/.github/workflows/ci_linux_x64_clang_asan.yml
+++ b/.github/workflows/ci_linux_x64_clang_asan.yml
@@ -12,6 +12,7 @@
- main
paths:
- ".github/workflows/ci_linux_x64_clang_asan.yml"
+ - ".github/workflows/setup.yml"
- "CMakeLists.txt"
- "build_tools/**"
- "compiler/**"
@@ -26,6 +27,7 @@
- main
paths:
- ".github/workflows/ci_linux_x64_clang_asan.yml"
+ - ".github/workflows/setup.yml"
- "CMakeLists.txt"
- "build_tools/**"
- "compiler/**"
diff --git a/README.md b/README.md
index 690690a..a89e14e 100644
--- a/README.md
+++ b/README.md
@@ -39,7 +39,7 @@
| Host platform | Build status |
| -- | --: |
-Linux | [](https://github.com/iree-org/iree/actions/workflows/ci_linux_x64_clang.yml?query=branch%3Amain+event%3Apush)<br>[](https://github.com/iree-org/iree/actions/workflows/ci_linux_arm64_clang.yml?query=branch%3Amain+event%3Aschedule)
+Linux | [](https://github.com/iree-org/iree/actions/workflows/ci_linux_x64_clang.yml?query=branch%3Amain+event%3Apush)<br>[](https://github.com/iree-org/iree/actions/workflows/ci_linux_arm64_clang.yml?query=branch%3Amain+event%3Aschedule)
macOS | [](https://github.com/iree-org/iree/actions/workflows/ci_macos_x64_clang.yml?query=branch%3Amain+event%3Aschedule)
Windows | [](https://github.com/iree-org/iree/actions/workflows/ci_windows_x64_msvc.yml?query=branch%3Amain+event%3Aschedule)