Skip to content

Improve test and build workflow with conditional execution (#381)#1219

Open
MarcosBorgesPhD wants to merge 2 commits into
Safety-Critical-Rust-Consortium:mainfrom
MarcosBorgesPhD:fix-381-ci-automation
Open

Improve test and build workflow with conditional execution (#381)#1219
MarcosBorgesPhD wants to merge 2 commits into
Safety-Critical-Rust-Consortium:mainfrom
MarcosBorgesPhD:fix-381-ci-automation

Conversation

@MarcosBorgesPhD

Copy link
Copy Markdown
Contributor

This PR improves the build-guidelines.yml workflow by avoiding unnecessary tests when they are not needed. This is a first step toward addressing Issue #381.

The goal is not just to save compute time. It is also to avoid running unnecessary jobs that can slow down or block contributors because of unrelated issues elsewhere in the codebase.

What changed

A gatekeeper job now determines whether the checks need to run.

When relevant files change:

  • check-rust-examples runs
  • build runs

Otherwise, those jobs are skipped.

Warning

We need to check whether the GitHub branch protection settings accept build reporting success, failure, and now skipped.

The gatekeeper was chosen instead of paths filters to keep the build status always reported for PRs. With paths, the workflow could be skipped entirely, leaving GitHub without a status to evaluate for merge/branch protection.

The push tag trigger was removed since tag builds are already covered by workflow_call from deploy.yml.

A force_full_build input (default: true) was added to workflow_call allowing deploy.yml and nightly.yml to bypass the gatekeeper and force a full build when needed.

Files that trigger a full build

The workflow currently watches the following paths:

  • src/ (kept intentionally broad to avoid edge cases)
  • builder/
  • exts/
  • tests/rust-examples/
  • scripts/extract_rust_examples.py
  • scripts/migrate_rust_examples.py
  • .github/workflows/build-guidelines.yml
  • .github/workflows/check-rust-examples.yml
  • make.py
  • spec.lock
  • pyproject.toml
  • uv.lock

There are several dependencies between the build scripts and the documentation, so I’d rather err on the side of running the build than accidentally missing a case. If we discover additional dependencies later, we can easily expand the watched paths.

I’ll keep monitoring the workflow after this lands to make sure there aren’t any unexpected side effects. 😅

- Add a `gatekeeper` job to determine whether Rust example checks and
  the documentation build should run.
- Remove the `push.tags` trigger, as tag builds are already handled by
  `deploy.yml`.
- Add the `workflow_call` input `skip_filters` so `deploy.yml` and
  `nightly.yml` can force a full build and bypass the gatekeeper.
- Update the `check-rust-examples` and `build` jobs to run conditionally
  based on the gatekeeper output.
@netlify

netlify Bot commented Jul 16, 2026

Copy link
Copy Markdown

Deploy Preview for scrc-coding-guidelines ready!

Name Link
🔨 Latest commit 38064fa
🔍 Latest deploy log https://app.netlify.com/projects/scrc-coding-guidelines/deploys/6a5f1cc2ee854b00089ee45a
😎 Deploy Preview https://deploy-preview-1219--scrc-coding-guidelines.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant