Closed jainvikas8 closed 3 years ago
@adbridge this should be OK with the current flow (development tracking Mbed OS), although there was a point about reproducibility. This should however not apply with development as it should caught issues with master early?
@rajkan01 is updating all examples to add travis build for CMake (this nicely align) 💯
This won't work as the mbed-os.lib is overwritten on the development branch when we make a new release. See here for how the examples are currently maintained and released: https://confluence.arm.com/display/BSGSoftware/IOT-OS-M+Mbed+OS+Example+Maintenance
What you actually want to achieve is to always test the example on the development branch against the latest version of mbed-os. This can be done in the CI and I believe is how it is supposed to work anyway @jamesbeyond can confirm...and if not it could be adjusted to do so.
This won't work as the mbed-os.lib is overwritten on the development branch when we make a new release.
it's just implementation detail, we can fix the update flow for releasing.
What you actually want to achieve is to always test the example on the development branch against the latest version of mbed-os.
This is important detail we should focus on. What is development
branch in the examples. We should talk with the rest of the team to agree on this and update our example workflow accordingly. I recall we wanted previously non sha in .lib, before we had development branch. So lets revise this together.
Note, we are about to release the next version so this should not be merged at least until we release the next Mbed OS.
Development branch is precisely as the name states - it is for on-going development and it is where we take snapshots from to make the next release (along with mbed-os releases). If we want to make the change detailed on this PR then we would need to update our release script to adjust how we update and release the examples. One way we could do this would be for each new release to branch from 'development' to a staging branch e.g something like 'release-candidate'. We could update the version of mbed-os.lib on the staging branch before raising the PR from there to the release (ie master) branch.
What you actually want to achieve is to always test the example on the development branch against the latest version of mbed-os. This can be done in the CI and I believe is how it is supposed to work anyway @jamesbeyond can confirm...and if not it could be adjusted to do so.
I can confirm that, in mbed OS CI Jenkins test, we ignore all mbed-os.lib
file in all circumstances. the reason for that is we are not testing the mbed-os that sha pointed to, we are testing a future mbed-OS which contains the PR to be merged.
So change mbed-os.lib
in any example will not impact us
Testing the sha pointed mbed-os, is on example's own CircleCI test
Here's the user experience if we don't update the development branch to point to an mbed-os that it is supposed to work with:
$ mbed import https://github.com/ARMmbed/mbed-os-example-blinky
$ cd mbed-os-example-blinky
$ git checkout origin/development
$ mbed deploy
$ mbed build -t GCC_ARM -m K64F
ERROR because mbed-os.lib points to 6.4.0 release instead of master
$ cd mbed-os
$ git checkout origin/master
$ cd ..
$ mbed build -t GCC_ARM -m K64F
OK
If we ensure that the mbed-os.lib file always points to a working mbed-os.lib for a branch, we get this experience.
$ mbed import https://github.com/ARMmbed/mbed-os-example-blinky
$ cd mbed-os-example-blinky
$ git checkout origin/development
$ mbed deploy
$ mbed build -t GCC_ARM -m K64F
OK
@Patater as I said above we can change this but it requires updates to our release script
I've raised PRs to update mbed-os.lib for all examples and cloud examples. (One such example is https://github.com/ARMmbed/mbed-os-example-blinky-baremetal/pull/47)
After that, the release script will need updating to avoid changing mbed-os.lib on development
, only changing it for the main/default branch for tagged releases via release branches as commented previously.
Always point to the latest version of Mbed-OS for testing purpose