Provide option to not install NCS #51
Answered
by
coderbyheart
matteoscordino
asked this question in
General
Replies: 1 comment 2 replies
-
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
coderbyheart
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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:
west init -l
in the manifest repo that is being builtwest update --narrow -o=--depth=1
ZEPHYR_BASE
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:
west init -l
in the manifest repo that is being builtwest update --narrow -o=--depth=1
, which gets the NCS and various repos from the manifest on diskpython
requirements from thezephyr
,nrf
andbootloader
directoriesThis 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:
ARG
(I propose the installation is on by default, and theARG
allows skipping it) and explains inREADME.md
how to use this feature. I would like to first check that this approach makes sense, though =)Beta Was this translation helpful? Give feedback.
All reactions