Skip to content

Commit

Permalink
idf version dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
elcritch committed Aug 27, 2024
1 parent 3264a5f commit 1df3413
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
14 changes: 11 additions & 3 deletions .devcontainer/Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,19 @@ ARG IMAGE=ghcr.io/embeddednim/esp-idf:${ESP_IDF_VERSION}-nim_${NIM_VERSION}-late

FROM $IMAGE AS build

ARG ESP_IDF_VERSION # inherit args
ARG NIM_VERSION

COPY . /app/

WORKDIR /app/
RUN nim -v
RUN nimble install -y
RUN : \
&& nimble install -y

RUN : \
&& nimble test
&& echo "NIM VERSION: " \
&& nim -v \
&& echo "ESP_IDF_VERSION: " $ESP_IDF_VERSION

# RUN : \
# && nimble test
3 changes: 1 addition & 2 deletions src/nesper/consts.nim
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ template ESP_IDF_VERSION_STR*: string = $ESP_IDF_MAJOR & "." & $ESP_IDF_MINOR &

static:
if ESP_IDF_VERSION == ESP_IDF_VERSION_VAL(0, 0, 0):
warning("ESP_IDF_VERSION: found: " & ESP_IDF_VER)
warning("ESP_IDF_VERSION: " & ESP_IDF_VERSION_STR)
warning("ESP_IDF_VERSION: " & ESP_IDF_VER)
error("Must set esp-idf version using `-d:ESP_IDF_VERSION=4.4` or using an environment variable `export ESP_IDF_VERSION=4.4`")
if ESP_IDF_MAJOR notin [4, 5]:
error("Incorrect esp-idf major version: " & $ESP_IDF_MAJOR)
Expand Down

0 comments on commit 1df3413

Please sign in to comment.