diff --git a/lxc/executors/d b/lxc/executors/d new file mode 100644 index 0000000..60b3225 --- /dev/null +++ b/lxc/executors/d @@ -0,0 +1,6 @@ +#!/bin/bash + +cd /tmp/$2 +cp code.code code.d +timeout -s KILL 10 dmd code.d +xtimeout -s KILL 3 args -a args.args -d '\n' ./code diff --git a/lxc/test_all_lxc b/lxc/test_all_lxc index 5d4c0f9..320dc8d 100755 --- a/lxc/test_all_lxc +++ b/lxc/test_all_lxc @@ -13,6 +13,8 @@ echo -n 'testing crystal = ' ../../cli/execute crystal crystal.cr echo -n 'testing csharp = ' ../../cli/execute csharp csharp.cs +echo -n 'testing d = ' +../../cli/execute d test.d echo -n 'testing deno = ' ../../cli/execute deno deno.ts echo -n 'testing elixir = ' diff --git a/lxc/tests/test.d b/lxc/tests/test.d new file mode 100644 index 0000000..e46985a --- /dev/null +++ b/lxc/tests/test.d @@ -0,0 +1,5 @@ +import std.stdio; + +void main() { + writeln("good"); +} diff --git a/lxc/versions b/lxc/versions index 60b8fae..1d112df 100755 --- a/lxc/versions +++ b/lxc/versions @@ -33,6 +33,10 @@ echo "elixir" lxc-attach --clear-env -n piston -- /bin/bash -l -c "elixir --version" echo '---' +echo 'd' +lxc-attach --clear-env -n piston -- /bin/bash -l -c "dmd --version" +echo '---' + echo 'deno' lxc-attach --clear-env -n piston -- /bin/bash -l -c "deno --version" echo '---' diff --git a/readme.md b/readme.md index 136eaa5..7c615a9 100644 --- a/readme.md +++ b/readme.md @@ -257,6 +257,7 @@ Content-Type: application/json `c`, `cpp`, `csharp`, +`d`, `deno`, `elixir`, `emacs`, diff --git a/shared/languages.json b/shared/languages.json index 87cb7f3..369c388 100644 --- a/shared/languages.json +++ b/shared/languages.json @@ -71,6 +71,13 @@ "cxx" ] }, + { + "name": "d", + "aliases": [ + "dlang", + "d" + ] + }, { "name": "deno", "aliases": [ diff --git a/var/install.txt b/var/install.txt index cf0b207..a9cd61a 100644 --- a/var/install.txt +++ b/var/install.txt @@ -231,6 +231,16 @@ tar -xzf crystal-0.35.1-1-linux-x86_64.tar.gz echo 'export PATH="$PATH:/opt/crystal/crystal-0.35.1-1/bin:$PATH"' >> /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 for i in {1..150}; do useradd -M runner$i