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
libraryworkflow for Github actions so that Sming libraries can be independently tested.It also tidies up the main
ci.ymlfile and fixes a couple of minor related issues.The
library.ymlre-useable workflow is provided, which takes care of these tasks:samplesdirectory, for all supported architecturestestdirectory.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/workflowsdirectory. Templates are provided in the.github/workflows/librarydirectory.Here is the basic
pushscenario:The
sming_repoandsming_branchinputs are provided if your library requires modifications to Sming which are not (yet) in the main repository.The
aliasinput is required where the library repository name does not correspond with the working title. For example, thejerryscriptlibrary 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.ymlexample 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.