Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ci enhancements #232

Merged
merged 10 commits into from
May 31, 2024
Merged

Conversation

deribaucourt
Copy link
Member

This PR improves the workflow display and optimizes runtime with caches

@deribaucourt deribaucourt marked this pull request as ready for review May 30, 2024 14:53
@deribaucourt deribaucourt marked this pull request as draft May 30, 2024 14:53
Now that we are getting more jobs, this commit lets them use more
accurate names which will be displayed in the workflows.
The matrix strategy can be used to test against multiple versions of
Node.js. However, we are only using one version of Node.js in every
context. This just created an unnecessary level of complexity in the
workflows displays.
The Github action setup-node has a built-in cache for node_modules,
which allows to save time by not having to reinstall all dependencies
every time. If we then clean and reinstall the dependencies, we lose
the benefit of the cache.

There is no need to clean the repository at the start of a pipeline
on non self-hosted runners.
Doc: https://github.com/marketplace/actions/clean-workspace
@deribaucourt
Copy link
Member Author

deribaucourt commented May 30, 2024

For comparison,

Without cache:

image
Run time: 11m

With Cache

image
Run time: 8m
(run time comparison subject to randomness. Would require ~10 runs each to have averaged values)

This should speed up the build by caching the bigger resources we
download outside of NodeJS.
This will make the pipeline faster and more reliable.
If another parsing request was already going, or the CI machine was
slow, race condtions could happen and the test would fail.
@deribaucourt deribaucourt force-pushed the ci-enhancements branch 3 times, most recently from 6c492f0 to c210a1e Compare May 31, 2024 08:45
Adding a layer is more complex and requires a full recipe parsing.
Just copying the recipe we want to parse is a lot faster.
…nfig

If the developper starts the integration tests debug configuration, the
configuration will be merged with his user configuration. This commit
resets the other bitbake configurations to prevent conflicts.
This test takes more than a minute and doesn't add much value. The
following parsing test already ensures the parsing engine works
correctly.
This optimisation resets the devtool workspace after the test has run
instead of removing the build directory. This will allow to reuse the
parsing cache and save time when running multiple tests.
@deribaucourt deribaucourt force-pushed the ci-enhancements branch 2 times, most recently from 4a88092 to 5ad1bf6 Compare May 31, 2024 12:43
This optimization will cut down parsing time and reuse the cache.

.bbappend are not included within poky/meta. We actually test bbappends
separately with busybox. They do not need to be tested again here.
@deribaucourt deribaucourt marked this pull request as ready for review May 31, 2024 13:13
@deribaucourt deribaucourt merged commit 99474ac into yoctoproject:staging May 31, 2024
5 checks passed
@deribaucourt deribaucourt deleted the ci-enhancements branch May 31, 2024 14:43
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.

2 participants