-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Essentially replace Zephyr SDK w/ NCS SDK * Basic README
- Loading branch information
1 parent
580469a
commit ce1a6b3
Showing
3 changed files
with
114 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: NCS development containers | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
base: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
strategy: | ||
matrix: | ||
sdk: [v2.5.0] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Docker buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Log into GitHub Container Registry | ||
# if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push base image | ||
id: build-and-push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./ncs/Dockerfile | ||
# push: ${{ github.event_name != 'pull_request' }} | ||
push: true | ||
platforms: linux/amd64 | ||
provenance: false | ||
tags: ghcr.io/${{ github.repository_owner }}/ncs:${{ matrix.sdk }}SDK | ||
build-args: | | ||
NCS_SDK_VERSION=${{ matrix.sdk }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,18 @@ | ||
# ncs | ||
Performance-optimized container images for building Nordic nRF Connect SDK applications. | ||
# NCS Container Images | ||
|
||
Develop nRF Connect SDK (NCS) applications using OCI-compatible Docker images. | ||
|
||
# Getting container images | ||
|
||
## Build images locally | ||
|
||
Building images locally ensures you can trust the source of the image, as well as allow you to modify the container image configuration. | ||
|
||
### Building with Docker CLI | ||
|
||
_Build the image_ | ||
|
||
``` | ||
docker build --build-arg NCS_SDK_VERSION=v2.5.0 -f "./ncs/Dockerfile" -t ncs:v2.5.0SDK "./ncs" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
FROM debian:stable-slim | ||
|
||
ARG NCS_SDK_VERSION=v2.5.0 | ||
|
||
# OS dependencies and packages | ||
|
||
RUN \ | ||
apt-get -y update \ | ||
&& apt-get -y install --no-install-recommends \ | ||
ca-certificates \ | ||
cmake \ | ||
device-tree-compiler \ | ||
git \ | ||
ninja-build \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# NCS SDK | ||
|
||
RUN \ | ||
apt-get -y update \ | ||
&& apt-get -y install --no-install-recommends \ | ||
wget \ | ||
&& wget https://developer.nordicsemi.com/.pc-tools/nrfutil/x64-linux/nrfutil \ | ||
&& chmod +x nrfutil \ | ||
&& mv nrfutil /usr/bin \ | ||
&& nrfutil install toolchain-manager \ | ||
&& nrfutil toolchain-manager install --ncs-version ${NCS_SDK_VERSION} \ | ||
&& apt-get remove -y --purge \ | ||
wget \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Python | ||
|
||
ENV VIRTUAL_ENV=/opt/venv | ||
RUN \ | ||
apt-get -y update \ | ||
&& apt-get -y install --no-install-recommends \ | ||
python3 \ | ||
python3-pip \ | ||
python3-venv \ | ||
&& python3 -m venv $VIRTUAL_ENV | ||
ENV PATH="$VIRTUAL_ENV/bin:$PATH" | ||
|
||
# West | ||
|
||
RUN pip install --no-cache-dir wheel west |