Skip to content
4 changes: 4 additions & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,10 @@
{
"type": "markdown",
"url": "https://github.com/ARMmbed/mbed-os-5-docs/blob/development/docs/reference/contributing/guidelines/workflow.md"
},
{
"type": "markdown",
"url": "https://github.com/ARMmbed/mbed-os-5-docs/blob/development/docs/reference/contributing/guidelines/ci.md"
}
]
}
Expand Down
55 changes: 55 additions & 0 deletions docs/reference/contributing/guidelines/ci.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
## Continuous integration

Continuous integration (CI) means mainly automatic testing for pull requests

### Travis CI

In Mbed OS [Travis CI](https://travis-ci.org/ARMmbed/mbed-os) is used as primary automatic testing and checking run environment.

Travis configuration is located in the [.travis.yml](https://github.com/ARMmbed/mbed-os/blob/master/.travis.yml) file in Mbed OS root directory. Mbed OS uses public travis so test results are publicly available and there are public [documentation available](https://docs.travis-ci.com/).

#### Tests

* **continuous-integration/travis-ci/pr** - Main run main
* **travis-ci/astyle** - Check code style using [astyle](http://astyle.sourceforge.net/)
* **travis-ci/docs** - [Doxygen](http://www.doxygen.org/) and naming checks:
** Assert that the Doxygen build produced no warnings
** Assert that all binary libraries are named correctly
** Assert that all assebler files are named correctly
* **travis-ci/events** - Check that Mbed OS compiles and run events tests
* **travis-ci/gitattributestest** - Check that no changes after clone. This check that .gitattributes is used right way
* **travis-ci/licence_check** - Checking that there is no GPL licence text in code
* **travis-ci/littlefs** - Testing littlefs without embedded hardware
* **travis-ci/tools-py2.7** - Run python tools tests with python 2.7

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What kind of tests jenkins runs?

Should travis also explain each jobs : docs, astyle etc ? like below in the jenkins?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point!

### Jenkins

[Jenkins](https://jenkins.io/) is used as internal testing and checking environment. Tests which have special requirements for execution enviroment are executed in internal Jenkins. In most cases test logs are published.

#### How it works:
* Jenkins uses a [scripted pipeline syntax](https://jenkins.io/doc/book/pipeline/)
* Jenkins scripts are not publicly available. There is Jenkinsfile in Mbed OS root folder but that is just trigger for tests.
* Jenkins selects required tests dynamically based on the code changes. For example: no tests are executed if only markdown (.md) file are changed
* Jenkins run first small amount of tests to provide fast feedback and then additional tests

#### Tests

* **continuous-integration/jenkins/pr-head** Jenkins main pipeline script execution status
* **jenkins-ci/build-ARM** - Build Mbed OS and examples with ARM. Related commands:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ARMmbed/mbed-os-maintainers What do you think about these checks inthe PR ?

My vote would be as it is now (build, exporters, mbed 2 build, test) rather than each toolchain own one (would end up with 20 checks?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a particular problem with having up to 20 merge checks.
Plus, I think it would complicate the pipeline a bit to have the subjobs merge reporting after the fact.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cmonr reporting is done already.. sub jobs report the status on checks and main pipeline send the summary post in the end of run.

* `mbed test --compile -t <toolchain> -m <target> `
* `python -u mbed-os/tools/test/examples/examples.py compile <toolchain> --mcu <target>`
* **jenkins-ci/build-GCC_ARM** - Build Mbed OS and examples with GCC_ARM
* **jenkins-ci/build-IAR** - Build Mbed OS and examples with IAR
* **jenkins-ci/cloud-client-test** - Test the change with [mbed-cloud-client](https://github.com/ARMmbed/mbed-cloud-client) using [mbed-cloud-client-example](https://github.com/ARMmbed/mbed-cloud-client-example)
* **jenkins-ci/dynamic-memory-usage** - Report dynamic memory usage compared to the master branch
* **jenkins-ci/exporter** - Export and build exported code. Related commands:
* `python -u mbed-os/tools/test/examples/examples.py export <exporter> --mcu <target>`
* **jenkins-ci/greentea-test** - Run [greentea tests](/docs/tools/testing/testing_greentea.html)
* **jenkins-ci/mbed2-build-ARM** - Build Mbed OS 2 with ARM. Related commands:
* `python tools/build_release.py -p <target> -t <toolchain>`
* **jenkins-ci/mbed2-build-GCC_ARM** - Build Mbed OS 2 with GCC_ARM
* **jenkins-ci/mbed2-build-IAR** - Build Mbed OS 2 with IAR
* **jenkins-ci/unittests** - Run [unit tests](/docs/tools/testing/unit_testing.html)
* **tools-test-linux** - Test that tools works on Linux
* **tools-test-mac** - Test that tools works on Mac
* **tools-test-windows** - Test that tools works on Windows
2 changes: 1 addition & 1 deletion docs/reference/contributing/guidelines/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ Time: 3 days for reviewers to leave feedback after the maintainers add the "need

#### The CI (Continuous Integration) testing

There are many CI systems available. Which CI tests we run against a particular pull request depends on the effect that pull request has on the code base. Irrespective of which CI tests run, Mbed OS has an all green policy, meaning that all the CI jobs that are triggered must pass before we merge the pull request.
There are many [CI systems available](/docs/reference/contributing/guidelines/ci.html) for testing Mbed OS pull requests and braches. Which CI tests we run against a particular pull request depends on the effect that pull request has on the code base. Irrespective of which CI tests run, Mbed OS has an all green policy, meaning that all the CI jobs that are triggered must pass before we merge the pull request.

Label: `needs: review`
Time: 1 day for CI to complete and report back results.
Expand Down