pkarashchenko commented on a change in pull request #5732:
URL: https://github.com/apache/incubator-nuttx/pull/5732#discussion_r826911719



##########
File path: tools/ci/cibuild.sh
##########
@@ -381,6 +381,24 @@ function rust {
   fi
 }
 
+function zig {
+  mkdir -p "${prebuilt}"/zig
+  add_path "${prebuilt}"/zig
+
+  if ! type zig &> /dev/null; then
+    case ${os} in
+      Darwin)
+        brew install zig
+        ;;
+      Linux)
+        # Currently Debian don't install zig (only built)
+        export ZIG_HOME=${prebuilt}/zig
+       curl -sL 
https://ziglang.org/download/0.9.1/zig-linux-x86_64-0.9.1.tar.xz | tar -xJC 
"${prebuilt}"/zig --strip-components=1

Review comment:
       ```suggestion
           export ZIG_HOME=${prebuilt}/zig
           curl -sL 
https://ziglang.org/download/0.9.1/zig-linux-x86_64-0.9.1.tar.xz | tar -xJC 
"${prebuilt}"/zig --strip-components=1
   ```

##########
File path: tools/ci/docker/linux/Dockerfile
##########
@@ -68,6 +69,12 @@ RUN mkdir -p $CARGO_HOME \
   && $CARGO_HOME/bin/rustup target add thumbv6m-none-eabi \
   && $CARGO_HOME/bin/rustup target add thumbv7m-none-eabi
 
+# Install Zig from NuttX
+ENV ZIG_HOME=/tools/zig
+
+RUN mkdir -p $ZIG_HOME && \
+   curl -sL https://ziglang.org/download/0.9.1/zig-linux-x86_64-0.9.1.tar.xz | 
tar -xJC $ZIG_HOME --strip-components=1 

Review comment:
       ```suggestion
   RUN mkdir -p $ZIG_HOME \
     && curl -sL 
https://ziglang.org/download/0.9.1/zig-linux-x86_64-0.9.1.tar.xz | tar -xJC 
$ZIG_HOME --strip-components=1 
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to