Add Github actions support for library CI testing #2577
Merged
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 adds a re-usable
library
workflow for Github actions so that Sming libraries can be independently tested.It also tidies up the main
ci.yml
file and fixes a couple of minor related issues.The
library.yml
re-useable workflow is provided, which takes care of these tasks:samples
directory, for all supported architecturestest
directory.This is built for all architectures, and also executed for Host.
Builds are handled using :source:
Tools/ci/library/Makefile
.See also https://docs.github.com/en/actions/using-workflows/reusing-workflows.
To use this in a project, add a suitable workflow to the
.github/workflows
directory. Templates are provided in the.github/workflows/library
directory.Here is the basic
push
scenario:The
sming_repo
andsming_branch
inputs are provided if your library requires modifications to Sming which are not (yet) in the main repository.The
alias
input is required where the library repository name does not correspond with the working title. For example, thejerryscript
library is in a repository calledSming-jerryscript
, so must be checked out using a different name. If Sming contains a library (or Component) with the same name then it will be overridden,with a warning
Multiple matches found for Component 'jerryscript'
in the build log.The
ci-dispatch.yml
example demonstrates manual triggering, which allows these inputs to be easily changed. See https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow.Note that the workflow must be available in the library's default branch, or it will not appear in the github web page.