libcrux
libcrux copied to clipboard
[CI] Only run actions on changed code
After looking into this, adding path filters to the top level of the workflow will break the way the merge queue is currently set up, because each required workflow needs to be triggered to get the result of the status check.
One way to implement this without using these path filters could be to add a setup job at the beginning of each workflow, that uses either the dorny/paths-filter action or a custom action to determine whether relevant files have changed, and then outputs whether to run the rest of the workflow.
In many cases, the workflow should be run if a crate and its dependencies have changed.
Example workflow for ECDH build/test using dorny/paths-filter:
- https://github.com/cryspen/libcrux/actions/runs/17941347380/workflow
Alternatively, the setup job could run a command like this (e.g., via a reusable workflow/action), to retrieve the paths for the dependencies:
cargo metadata --format-version=1 | jq -r '.packages[] | select(.name == "libcrux-ml-kem") | .dependencies[] | .path | select(. | .!= null)' | uniq
And check the paths that are output by this step for changed files, to determine whether to run the rest of the workflow.
This issue has been marked as stale due to a lack of activity for 60 days. If you believe this issue is still relevant, please provide an update or comment to keep it open. Otherwise, it will be closed in 7 days.