NordicPlayground / nrf-docker

Dockerfile example for building nRF Connect SDK applications with GitHub Actions
BSD 3-Clause "New" or "Revised" License
70 stars 34 forks source link

Provide option to not install NCS #50

Closed matteoscordino closed 1 year ago

matteoscordino commented 1 year ago

Applications using a West T2 project topology (a.k.a. "Workflow 4" according to Nordic docs) would be downloading their own NCS repo with west in a typical CI/CD situation.

Specifically to our case, we use GitLab CI and we get the manifest repo downloaded before the CI script starts running, so the pre-existing NCS is both a waste of space and an inconvenience. Sure, we could use the pre-installed NCS if we made sure to pull the docker image that matches the NCS version referenced in our manifest, but that defeats the some of the benefits of the T2 topology, e.g.:

Our first approach was to start our CI script with:

This works, but it's wasteful of space and slow.

Our second attempt was to fork this repo to remove the NCS installation from the Dockerfile (lines 129:155), then in the CI script:

This means that the project is built with the NCS and all other dependencies as defined in the project's manifest. The drawback is that the python requirements need to be installed as part of the build, which takes some time (but can be cached at the CI level)

In short: