touchstone icon indicating copy to clipboard operation
touchstone copied to clipboard

Skip when no changes to source code files?

Open IndrajeetPatil opened this issue 3 years ago • 4 comments
trafficstars

Given how expensive this workflow is, do you think {touchstone} should skip benchmarking when there is no change to any files containing source code?

E.g., here only a YAML file was changed, but we are still benchmarking ever commit in this PR, which is unnecessary since this file doesn't contain any source code and any change to it will have no effect on performance.

IndrajeetPatil avatar Sep 28 '22 07:09 IndrajeetPatil

Maybe source files are too restrictive. But we could restrict it to source files + DESCRIPTION + touchstone/*? I.e. if dependencies change, we don't want to skip.

lorenzwalthert avatar Sep 28 '22 10:09 lorenzwalthert

Yes, that sounds good to me!

Thanks for being open to the idea.

IndrajeetPatil avatar Sep 28 '22 10:09 IndrajeetPatil

You can easily implement this change directly in your workflow file by adding the paths node:

on: 
  pull_request:
    paths:
      # Filter by dir
     - "r/**"
     - "src/**"
     - "touchstone/**"
     # or file type
     - "*.r"
     # or specific files
     - ".github/workflows/touchstone-*.yaml"
     - DESCRIPTION

I think running without filter should be the default but we should probably add some documentation about this functionality :+1:

assignUser avatar Sep 28 '22 10:09 assignUser

Looks good. Should we add this to the template?

lorenzwalthert avatar Sep 28 '22 12:09 lorenzwalthert