Skip to content

CI: ignore build when no changes for executable#454

Merged
tusharmath merged 2 commits intotailcallhq:mainfrom
Yougigun:ci_ignore_build_when_no_change_on_binary
Oct 10, 2023
Merged

CI: ignore build when no changes for executable#454
tusharmath merged 2 commits intotailcallhq:mainfrom
Yougigun:ci_ignore_build_when_no_change_on_binary

Conversation

@Yougigun
Copy link
Copy Markdown
Contributor

@Yougigun Yougigun commented Oct 9, 2023

Summary:
Briefly describe the changes made in this PR.

  1. add script file to check if the changes in ./src and "cargo.toml" "cargo.lock" "fly.toml" "DockerFile". So if changes are in tests(.rs. i.e. integration test), the build workflow can still run for the test.
  2. using job condition if to skip deploy and release jobs.
  3. add restore-keys so that even if there is a tiny change in the cache, the cache can still be used for that non-change pkg.
  4. replace ::set-output name with echo "name=value" >> $GITHUB_OUTPUT.
    ref: GitHub Actions: Deprecating save-state and set-output commands
  5. update the revision of sys-curl for Sonoma or later version of macos.
    ref: fix: cargo test fail in Sonoma or later of macos #453

Issue Reference(s):
Fixes #443 .

Build & Testing:

  • I ran cargo test successfully.
  • I have run ./lint.sh to address and fix linting issues.

Checklist:

  • I have added relevant unit & integration tests.
  • I have updated the documentation accordingly (if applicable).
  • I have performed a self-review of my own code.

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 9, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (458716d) 84.20% compared to head (2793b45) 84.20%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #454   +/-   ##
=======================================
  Coverage   84.20%   84.20%           
=======================================
  Files          50       50           
  Lines        4532     4532           
=======================================
  Hits         3816     3816           
  Misses        716      716           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tusharmath
Copy link
Copy Markdown
Contributor

Thanks @Yougigun!
Just a teeny weeny comment 🙏
I was thinking this could become a really cool general purpose github action that could optimize build time. We could potentially write it in JS and add unit tests. Obviously as a separate project, outside the scope of this PR :)

Copy link
Copy Markdown
Contributor Author

@Yougigun Yougigun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tusharmath
fixed: add job name and delete the comment
the idea of turning it into GitHub action sounds good!

@tusharmath tusharmath enabled auto-merge (squash) October 10, 2023 12:25
@tusharmath
Copy link
Copy Markdown
Contributor

@Yougigun This is approved from my side. If you could please resolve the conflicts, I think we could get it merged.

auto-merge was automatically disabled October 10, 2023 14:34

Head branch was pushed to by a user without write access

@Yougigun Yougigun force-pushed the ci_ignore_build_when_no_change_on_binary branch from 950acb6 to 2793b45 Compare October 10, 2023 14:34
@Yougigun
Copy link
Copy Markdown
Contributor Author

@tusharmath
I just solved and rebased it. Is it all good now?

@tusharmath tusharmath merged commit 0450061 into tailcallhq:main Oct 10, 2023
@tusharmath
Copy link
Copy Markdown
Contributor

@Yougigun Thank you for this 🙏

@Yougigun Yougigun deleted the ci_ignore_build_when_no_change_on_binary branch October 10, 2023 15:12
digital-phoenix pushed a commit to digital-phoenix/tailcall that referenced this pull request Oct 12, 2023
* commit '234cd25e61d23bd2300a6e15bf0b9b4014a0073c': (25 commits)
  fix: cache control headers (tailcallhq#465)
  chore: update cron freq for PR staleness
  feat: group by endpoint (tailcallhq#451)
  chore: add codecov config
  CI: ignore build when no changes for executable (tailcallhq#454)
  feature: add `tc init` command (tailcallhq#403)
  fix: deploy (tailcallhq#457)
  fix(deps): update rust crate regex to 1.10.0 (tailcallhq#456)
  fix: cargo test fail in Sonoma or later of macos (tailcallhq#453)
  chore: update examples (tailcallhq#452)
  performance: improve for PathString impl for EvaluationContext (tailcallhq#430)
  chore: close stale branches after 2 days
  fix: restricted url for graphiQL (tailcallhq#447)
  performance: minor optimisation (tailcallhq#444)
  chore:update readme (tailcallhq#446)
  chore: update stale bot schedule
  chore: update stale bot message
  chore: use title case for job names in CI (tailcallhq#437)
  chore: remove write permissions
  chore: update stale YML permissions
  ...
@github-actions github-actions bot added the type: chore Routine tasks like conversions, reorganization, and maintenance work. label Dec 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: chore Routine tasks like conversions, reorganization, and maintenance work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimize CI/CD Pipeline to Skip builds & Deploy on Irrelevant Changes

2 participants