This commit is contained in:
Brian Seymour 2021-01-23 15:05:10 -06:00
commit ed773d26d3
7 changed files with 35 additions and 0 deletions

6
lxc/executors/d Normal file
View File

@ -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

View File

@ -13,6 +13,8 @@ echo -n 'testing crystal = '
../../cli/execute crystal crystal.cr ../../cli/execute crystal crystal.cr
echo -n 'testing csharp = ' echo -n 'testing csharp = '
../../cli/execute csharp csharp.cs ../../cli/execute csharp csharp.cs
echo -n 'testing d = '
../../cli/execute d test.d
echo -n 'testing deno = ' echo -n 'testing deno = '
../../cli/execute deno deno.ts ../../cli/execute deno deno.ts
echo -n 'testing elixir = ' echo -n 'testing elixir = '

5
lxc/tests/test.d Normal file
View File

@ -0,0 +1,5 @@
import std.stdio;
void main() {
writeln("good");
}

View File

@ -33,6 +33,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 '---'

View File

@ -257,6 +257,7 @@ Content-Type: application/json
`c`, `c`,
`cpp`, `cpp`,
`csharp`, `csharp`,
`d`,
`deno`, `deno`,
`elixir`, `elixir`,
`emacs`, `emacs`,

View File

@ -71,6 +71,13 @@
"cxx" "cxx"
] ]
}, },
{
"name": "d",
"aliases": [
"dlang",
"d"
]
},
{ {
"name": "deno", "name": "deno",
"aliases": [ "aliases": [

View File

@ -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 echo 'export PATH="$PATH:/opt/crystal/crystal-0.35.1-1/bin:$PATH"' >> /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