Add D
This commit is contained in:
parent
b0c462d5ee
commit
ba19844c0e
|
@ -71,6 +71,7 @@ func Execute(res http.ResponseWriter, req *http.Request) {
|
||||||
"c",
|
"c",
|
||||||
"cpp", "c++",
|
"cpp", "c++",
|
||||||
"csharp", "cs", "c#",
|
"csharp", "cs", "c#",
|
||||||
|
"d",
|
||||||
"deno", "denojs", "denots",
|
"deno", "denojs", "denots",
|
||||||
"elixir", "exs",
|
"elixir", "exs",
|
||||||
"emacs", "elisp", "el",
|
"emacs", "elisp", "el",
|
||||||
|
|
|
@ -60,6 +60,9 @@ case "$lang" in
|
||||||
"csharp" | "cs" | "c#")
|
"csharp" | "cs" | "c#")
|
||||||
bin=csharp
|
bin=csharp
|
||||||
;;
|
;;
|
||||||
|
"d")
|
||||||
|
bin=dmd
|
||||||
|
;;
|
||||||
"elixir" | "exs")
|
"elixir" | "exs")
|
||||||
bin=elixir
|
bin=elixir
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
cd /tmp/$2
|
||||||
|
cp code.code code.d
|
||||||
|
timeout -s KILL 10 dmd code.d
|
||||||
|
runuser runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 ./code"
|
|
@ -9,6 +9,8 @@ echo 'testing cpp'
|
||||||
../execute cpp test.cpp
|
../execute cpp test.cpp
|
||||||
echo 'testing cs'
|
echo 'testing cs'
|
||||||
../execute cs test.cs
|
../execute cs test.cs
|
||||||
|
echo 'testing d'
|
||||||
|
../execute d test.d
|
||||||
echo 'testing deno ts'
|
echo 'testing deno ts'
|
||||||
../execute deno testdeno.ts
|
../execute deno testdeno.ts
|
||||||
echo 'testing elisp'
|
echo 'testing elisp'
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
import std.stdio;
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
writeln("good");
|
||||||
|
}
|
|
@ -29,6 +29,10 @@ echo "elixir"
|
||||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "elixir --version"
|
lxc-attach --clear-env -n piston -- /bin/bash -l -c "elixir --version"
|
||||||
echo '---'
|
echo '---'
|
||||||
|
|
||||||
|
echo 'd'
|
||||||
|
lxc-attach --clear-env -n piston -- /bin/bash -l -c "dmd --version"
|
||||||
|
echo '---'
|
||||||
|
|
||||||
echo 'deno'
|
echo 'deno'
|
||||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "deno --version"
|
lxc-attach --clear-env -n piston -- /bin/bash -l -c "deno --version"
|
||||||
echo '---'
|
echo '---'
|
||||||
|
|
11
readme.md
11
readme.md
|
@ -261,6 +261,16 @@ cd nim-1.4.0
|
||||||
echo 'export PATH=$PATH:/opt/nim/bin' >> /opt/.profile
|
echo 'export PATH=$PATH:/opt/nim/bin' >> /opt/.profile
|
||||||
source /opt/.profile
|
source /opt/.profile
|
||||||
|
|
||||||
|
# install d
|
||||||
|
# final binary: /opt/d/dmd2/linux/bin64/dmd
|
||||||
|
# get version: /opt/d/dmd2/linux/bin64/dmd --version
|
||||||
|
cd /opt && mkdir d && cd d
|
||||||
|
wget http://downloads.dlang.org/releases/2.x/2.095.0/dmd.2.095.0.linux.tar.xz
|
||||||
|
unxz dmd.2.095.0.linux.tar.xz
|
||||||
|
tar -xf dmd.2.095.0.linux.tar
|
||||||
|
echo 'export PATH=$PATH:/opt/d/dmd2/linux/bin64' >> /opt/.profile
|
||||||
|
source /opt/.profile
|
||||||
|
|
||||||
# create runnable users and apply limits
|
# create runnable users and apply limits
|
||||||
for i in {1..150}; do
|
for i in {1..150}; do
|
||||||
useradd -M runner$i
|
useradd -M runner$i
|
||||||
|
@ -363,6 +373,7 @@ If an invalid language is supplied, a typical response will look like the follow
|
||||||
- c
|
- c
|
||||||
- cpp
|
- cpp
|
||||||
- csharp
|
- csharp
|
||||||
|
- d
|
||||||
- deno
|
- deno
|
||||||
- elixir
|
- elixir
|
||||||
- emacs
|
- emacs
|
||||||
|
|
Loading…
Reference in New Issue