Skip to content

Commit f63171e

Browse files
committed
feat: skips FTL is no change in macrobenchmark
1 parent 03b421c commit f63171e

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

.github/workflows/firebase_test_lab.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,33 @@ on:
66
workflow_dispatch:
77

88
jobs:
9+
# This job checks for any file changed within MacrobenchmarkSample/ folder
10+
# to distinguish if the build check for Macrobenchmark is needed to be run.
11+
# It sets the outputs.macrobenchmark to true/false based on the changes.
12+
# In the next build job, it checks for needs.changes.outputs.macrobenchmark == 'true'
13+
# or skips the job otherwise.
14+
changes:
15+
if: github.repository_owner == 'android'
16+
runs-on: ubuntu-latest
17+
# Set job outputs to values from filter step to be able to use it in next job
18+
outputs:
19+
macrobenchmark: ${{ steps.filter.outputs.macrobenchmark }}
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v2
23+
with:
24+
fetch-depth: 1
25+
- uses: dorny/paths-filter@v2
26+
id: filter
27+
with:
28+
filters: |
29+
macrobenchmark:
30+
- 'MacrobenchmarkSample/**'
31+
932
build:
10-
# Only run action for the main repo & not forks
11-
if: github.repository_owner == 'android'
33+
needs: changes
34+
# Only run action for the main repo & not forks and if change is in macrobenchmark sample
35+
if: github.repository_owner == 'android' && needs.changes.outputs.macrobenchmark == 'true'
1236
runs-on: ubuntu-latest
1337
steps:
1438
- name: Checkout

0 commit comments

Comments
 (0)