Skip to content
master
Switch branches/tags
Code

Latest commit

…1400)

* [skip changelog] Run relevant workflows on release branch creation

The trunk-based development strategy is employed by this repository. This means that the release branch may contain a
subset of the history of the default branch.

The status of the GitHub Actions workflows should be evaluated before making a release. However, this is not so simple as
checking the status of the commit at the tip of the release branch. The reason is that, for the sake of efficiency, the
workflows are configured to run only when the processes are relevant to the trigger event (e.g., no need to run the Go
unit tests for a change to the readme).

In the case of the default branch, you can simply set the workflow runs filter to that branch and then check the result
of the latest run of each workflow of interest. However, that was not possible to do with the release branch since it
might be that the workflow was never run in that branch. The status of the latest run of the workflow in the default
branch might not match the status for the release branch if the release branch does not contain the full history.

For this reason, it will be helpful to trigger all relevant workflows on the creation of a release branch. This will
ensure that each of those workflows will always have at least one run in the release branch. Subsequent commits pushed to
the branch can run based on their usual trigger filters and the status of the latest run of each workflow in the branch
will provide an accurate indication of the state of that branch.

Branches are created for purposes other than releases, most notably feature branches to stage work for a pull request.
Because the workflows are very comprehensive, it would not be convenient or efficient to run them on the creation of
every feature branch.

Unfortunately, GitHub Actions does not support filters on the `create` event of branch creation like it does for the
`push` and `pull_request` events. There is support for a `branches` filter of the `push` event, but that filter is an AND
to the `paths` filter and this application requires an OR. For this reason, the workflows must be triggered by the
creation of any branch. The unwanted job runs are prevented by adding a `run-determination` job with the branch filter
handled by Bash commands. The other jobs of the workflow use this `run-determination` job as a dependency, only running
when it indicates they should via a job output. Because this minimal `run-determination` job runs very quickly, it is
roughly equivalent to the workflow having been skipped entirely for non-release branch creations. This approach has been
in use for some time already in the website deployment workflow.

* [skip changlog] Simplify jobs run determination logic

Co-authored-by: Cristian Maglie <[email protected]>

Co-authored-by: Cristian Maglie <[email protected]>
1985936

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time

arduino-cli

cli-logo

Arduino CLI is an all-in-one solution that provides Boards/Library Managers, sketch builder, board detection, uploader, and many other tools needed to use any Arduino compatible board and platform.

Test Go status Test Integration status Publish Nightly Build status Deploy Website status Codecov

Note: this software is currently under active development: anything can change at any time, API and UI must be considered unstable until we release version 1.0.0.

Docs

For guidance on installation and development, see the User documentation.

Quickstart

  1. Install the Arduino CLI
  2. Follow the Getting Started guide to check out what the CLI can do
  3. Browse the Commands reference to see all the available commands
  4. Should you have an issue, read the FAQ page

How to contribute

Contributions are welcome!

Please read the document How to contribute which will show you how to build the source code, run the tests, and contribute your changes to the project.

Thanks to all our contributors!

Beta testing

Nightly builds are available for beta testing.

Security

If you think you found a vulnerability or other security-related bug in the Arduino CLI, please read our security policy and report the bug to our Security Team 🛡️ Thank you!

e-mail contact: [email protected]