From 9ea45313340bac5db6f083b90b43759cd8c4f886 Mon Sep 17 00:00:00 2001 From: Nuolong Date: Sat, 3 Oct 2020 05:12:44 -0400 Subject: [PATCH 1/5] Zig support attempt --- Dockerfile.code | 7 +++++-- scripts/run.py | 5 +++++ tests/test_code_echo.sh | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/Dockerfile.code b/Dockerfile.code index 82ca68e..5b1d329 100644 --- a/Dockerfile.code +++ b/Dockerfile.code @@ -3,13 +3,16 @@ MAINTAINER Peter Bui ENV DEBIAN_FRONTEND noninteractive +# Repository configuration for Zip +RUN echo 'deb https://dl.bintray.com/dryzig/zig-ubuntu bionic main' | sudo tee -a /etc/apt/sources.list + RUN apt update -y # Run-time dependencies RUN apt install -y python3-tornado python3-requests python3-yaml curl -# Language Support: C, C++, Python3, Bash, Ruby, Nodejs, Java, golang, Guile, Perl6, Haskell -RUN apt install -y gcc g++ python3 bash ruby nodejs default-jdk-headless golang guile-2.0 perl6 ghc +# Language Support: C, C++, Python3, Bash, Ruby, Nodejs, Java, golang, Guile, Perl6, Haskell, Zip +RUN apt install -y gcc g++ python3 bash ruby nodejs default-jdk-headless golang guile-2.0 perl6 ghc zip # Language Support: rust RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y && mv /root/.cargo/bin/* /usr/local/bin/ diff --git a/scripts/run.py b/scripts/run.py index 19f92a0..21eb12b 100755 --- a/scripts/run.py +++ b/scripts/run.py @@ -107,6 +107,11 @@ def usage(exit_code=0): './{executable}', ('.rs',) ), + Language('Zig', + '', + 'zig run {source}', + ('.zig',) + ), ) def get_language_from_source(source, language_name=None): diff --git a/tests/test_code_echo.sh b/tests/test_code_echo.sh index 7388b57..51240d3 100755 --- a/tests/test_code_echo.sh +++ b/tests/test_code_echo.sh @@ -193,6 +193,40 @@ echo -n "Testing Haskell ... " curl -F source=@$SOURCE localhost:9206/code/test-echo rm -f $SOURCE +# Zig +SOURCE=$(mktemp -t dredd_XXXXXXX.zig) +cat > $SOURCE < Date: Sat, 3 Oct 2020 05:19:44 -0400 Subject: [PATCH 2/5] fixed an indent --- Dockerfile.code | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.code b/Dockerfile.code index 5b1d329..6427477 100644 --- a/Dockerfile.code +++ b/Dockerfile.code @@ -4,7 +4,7 @@ MAINTAINER Peter Bui ENV DEBIAN_FRONTEND noninteractive # Repository configuration for Zip -RUN echo 'deb https://dl.bintray.com/dryzig/zig-ubuntu bionic main' | sudo tee -a /etc/apt/sources.list +RUN echo 'deb https://dl.bintray.com/dryzig/zig-ubuntu bionic main' | sudo tee -a /etc/apt/sources.list RUN apt update -y From 3121e0709f403be319e039ab593b93fb4232b550 Mon Sep 17 00:00:00 2001 From: Nuolong Date: Sat, 3 Oct 2020 05:21:17 -0400 Subject: [PATCH 3/5] Well this is embarassing. (indent pt.2) --- Dockerfile.code | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.code b/Dockerfile.code index 6427477..d21a63f 100644 --- a/Dockerfile.code +++ b/Dockerfile.code @@ -4,7 +4,7 @@ MAINTAINER Peter Bui ENV DEBIAN_FRONTEND noninteractive # Repository configuration for Zip -RUN echo 'deb https://dl.bintray.com/dryzig/zig-ubuntu bionic main' | sudo tee -a /etc/apt/sources.list +RUN echo 'deb https://dl.bintray.com/dryzig/zig-ubuntu bionic main' | sudo tee -a /etc/apt/sources.list RUN apt update -y From 3c8a16a763cf16fc13308d2d04014373a9dfc0b1 Mon Sep 17 00:00:00 2001 From: Nuolong Date: Sat, 3 Oct 2020 05:23:23 -0400 Subject: [PATCH 4/5] Something is wrong with my editor's indentation --- Dockerfile.code | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.code b/Dockerfile.code index d21a63f..f0f6a4d 100644 --- a/Dockerfile.code +++ b/Dockerfile.code @@ -4,7 +4,7 @@ MAINTAINER Peter Bui ENV DEBIAN_FRONTEND noninteractive # Repository configuration for Zip -RUN echo 'deb https://dl.bintray.com/dryzig/zig-ubuntu bionic main' | sudo tee -a /etc/apt/sources.list +RUN echo 'deb https://dl.bintray.com/dryzig/zig-ubuntu bionic main' | sudo tee -a /etc/apt/sources.list RUN apt update -y From 968040e7cac6615a70f8d725928c4b876b89b7b3 Mon Sep 17 00:00:00 2001 From: Nuolong Date: Sat, 3 Oct 2020 05:28:08 -0400 Subject: [PATCH 5/5] changed three 'zip' into 'zig' --- Dockerfile.code | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile.code b/Dockerfile.code index f0f6a4d..92a8063 100644 --- a/Dockerfile.code +++ b/Dockerfile.code @@ -3,7 +3,7 @@ MAINTAINER Peter Bui ENV DEBIAN_FRONTEND noninteractive -# Repository configuration for Zip +# Repository configuration for Zig RUN echo 'deb https://dl.bintray.com/dryzig/zig-ubuntu bionic main' | sudo tee -a /etc/apt/sources.list RUN apt update -y @@ -11,8 +11,8 @@ RUN apt update -y # Run-time dependencies RUN apt install -y python3-tornado python3-requests python3-yaml curl -# Language Support: C, C++, Python3, Bash, Ruby, Nodejs, Java, golang, Guile, Perl6, Haskell, Zip -RUN apt install -y gcc g++ python3 bash ruby nodejs default-jdk-headless golang guile-2.0 perl6 ghc zip +# Language Support: C, C++, Python3, Bash, Ruby, Nodejs, Java, golang, Guile, Perl6, Haskell, Zig +RUN apt install -y gcc g++ python3 bash ruby nodejs default-jdk-headless golang guile-2.0 perl6 ghc zig # Language Support: rust RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y && mv /root/.cargo/bin/* /usr/local/bin/