Skip to content

Commit

Permalink
only trigger 3p tests when deps.bzl changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sjain-stanford committed Oct 19, 2023
1 parent ee4ef13 commit d837214
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 13 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/bazelBuildAndTestLlvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@

name: Bazel Build and Test (llvm-project)

# Only run when llvm-project hash changes (deps.bzl)
on:
pull_request:
branches: [ main ]
branches:
- main
paths:
- 'deps.bzl'
push:
branches: [ main ]
branches:
- main
paths:
- 'deps.bzl'
workflow_dispatch:

# Ensure that only a single job or workflow using the same
Expand All @@ -32,7 +39,7 @@ jobs:

# Continually update cache even if there's a "hit" during
# restore to avoid the cache going stale over time
# https://github.com/actions/cache/blob/main/workarounds.md#update-a-cache
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
- name: Setup cache for bazel
uses: actions/cache@v3
with:
Expand All @@ -57,7 +64,7 @@ jobs:
-t mlir-tcp:ci \
.
- name: Bazel build and test stablehlo
- name: Bazel build and test llvm-project
run: |
docker run --rm \
-v "$(pwd)":"/opt/src/mlir-tcp" \
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/bazelBuildAndTestStablehlo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@

name: Bazel Build and Test (stablehlo)

# Only run when stablehlo hash changes (deps.bzl)
on:
pull_request:
branches: [ main ]
branches:
- main
paths:
- 'deps.bzl'
push:
branches: [ main ]
branches:
- main
paths:
- 'deps.bzl'
workflow_dispatch:

# Ensure that only a single job or workflow using the same
Expand All @@ -32,7 +39,7 @@ jobs:

# Continually update cache even if there's a "hit" during
# restore to avoid the cache going stale over time
# https://github.com/actions/cache/blob/main/workarounds.md#update-a-cache
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
- name: Setup cache for bazel
uses: actions/cache@v3
with:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/bazelBuildAndTestTcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ name: Bazel Build and Test (mlir-tcp)

on:
pull_request:
branches: [ main ]
branches:
- main
push:
branches: [ main ]
branches:
- main
workflow_dispatch:

# Ensure that only a single job or workflow using the same
Expand All @@ -32,7 +34,7 @@ jobs:

# Continually update cache even if there's a "hit" during
# restore to avoid the cache going stale over time
# https://github.com/actions/cache/blob/main/workarounds.md#update-a-cache
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
- name: Setup cache for bazel
uses: actions/cache@v3
with:
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/bazelBuildAndTestTorchmlir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@

name: Bazel Build and Test (torch-mlir)

# Only run when torch-mlir hash changes (deps.bzl)
on:
pull_request:
branches: [ main ]
branches:
- main
paths:
- 'deps.bzl'
push:
branches: [ main ]
branches:
- main
paths:
- 'deps.bzl'
workflow_dispatch:

# Ensure that only a single job or workflow using the same
Expand All @@ -32,7 +39,7 @@ jobs:

# Continually update cache even if there's a "hit" during
# restore to avoid the cache going stale over time
# https://github.com/actions/cache/blob/main/workarounds.md#update-a-cache
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
- name: Setup cache for bazel
uses: actions/cache@v3
with:
Expand Down

0 comments on commit d837214

Please sign in to comment.