-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Introduce Code Documentation Workflow Dependent on CMake Workflow #68
Draft
franziska-wegner
wants to merge
10
commits into
main
Choose a base branch
from
franziska-wegner/2024/january/CI/make-workflow-compact
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Introduce Code Documentation Workflow Dependent on CMake Workflow #68
franziska-wegner
wants to merge
10
commits into
main
from
franziska-wegner/2024/january/CI/make-workflow-compact
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rm workflow Why: * Make workflow run less resource consuming by reusing results, * The build fails not multiple times for different workflows, but once, * Gives the workflow structure, * Reduces the workflow size and simplifies adding new workflows easily. On branch franziska-wegner/2024/january/CI/make-workflow-compact Changes to be committed: modified: .github/workflows/cmake-multi-platform.yml new file: .github/workflows/code-documentation.yml
franziska-wegner
added
documentation
Improvements or additions to documentation
enhancement
New feature or request
CI/CD
Changes in the CI process
labels
Jan 2, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #68 +/- ##
=======================================
Coverage 94.37% 94.37%
=======================================
Files 49 49
Lines 4921 4921
=======================================
Hits 4644 4644
Misses 277 277 ☔ View full report in Codecov by Sentry. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CI/CD
Changes in the CI process
documentation
Improvements or additions to documentation
enhancement
New feature or request
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR separates workflows by task such that they become reusable [7], e.g., the
cmake
workflow which content is required and duplicated in the other workflows will run in the end only once. This will save computational power and time in the end. There are different events that may trigger workflows given in [6]. Another option is to call the workflows in the main workflow directly [8]. For the two former options there is a big difference in reusability of the dependent workflows. It is worth testing the context reusability of both versions (see below).Advantage:
Unfortunately the dependent workflows do not inherent the whole environment. As such we need to make sure to maintain the build directory and the installations for the upcoming workflows. There are two approaches given by GitHub, (1) Caching, and (2) Artifacts. A docker solution is also given in [8].
Caching makes more sense in our case as we need the result directly and only for the workflows that depend on a particular workflow, i.e., the
build
directory is not a long living artifact, but a short term object only required for the dependent workflows [4]. The caching approach is also less time consuming and thus, preferable.In total, we add and modify the following files to have the resulting dependency graph:
modified:
.github/workflows/cmake-multi-platform.yml
new file:
.github/workflows/code-documentation.yml
[1] https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows
[2] https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
[3] https://docs.github.com/en/organizations/managing-organization-settings/configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-organization
[4] https://levelup.gitconnected.com/github-actions-how-to-share-data-between-jobs-fc1547defc3e
[5] https://stackoverflow.com/questions/58457140/dependencies-between-workflows-on-github-actions
[6] https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run
[7] https://docs.github.com/en/actions/using-workflows/reusing-workflows
[8] https://stackoverflow.com/questions/57498605/github-actions-share-workspace-artifacts-between-jobs