added deno
Fixes issue: https://github.com/engineer-man/piston/issues/18
This commit is contained in:
parent
3246ed6781
commit
084211cb46
|
@ -87,6 +87,9 @@ case "$lang" in
|
||||||
"node" | "js" | "javascript")
|
"node" | "js" | "javascript")
|
||||||
bin=node
|
bin=node
|
||||||
;;
|
;;
|
||||||
|
"deno" | "denojs" | "denots")
|
||||||
|
bin=deno
|
||||||
|
;;
|
||||||
"perl")
|
"perl")
|
||||||
bin=perl
|
bin=perl
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
cd /tmp/$2
|
||||||
|
|
||||||
|
if [[ -z $(grep '[^[:space:]]' args.args) ]]; then
|
||||||
|
runuser runner$1 -c "cd /tmp/$2 ; timeout -s KILL 3 deno code.code"
|
||||||
|
else
|
||||||
|
runuser runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 deno code.code"
|
||||||
|
fi
|
|
@ -47,3 +47,7 @@ echo 'testing python3'
|
||||||
../execute python3 test3.py
|
../execute python3 test3.py
|
||||||
echo 'testing haskell'
|
echo 'testing haskell'
|
||||||
../execute haskell test.hs
|
../execute haskell test.hs
|
||||||
|
echo 'testing deno js'
|
||||||
|
../execute deno testdeno.js
|
||||||
|
echo 'testing deno ts'
|
||||||
|
../execute deno testdeno.ts
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
console.log('good')
|
|
@ -0,0 +1 @@
|
||||||
|
console.log('good')
|
|
@ -69,3 +69,6 @@ echo '---'
|
||||||
echo 'haskell'
|
echo 'haskell'
|
||||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "ghc --version"
|
lxc-attach --clear-env -n piston -- /bin/bash -l -c "ghc --version"
|
||||||
echo '---'
|
echo '---'
|
||||||
|
echo 'deno'
|
||||||
|
lxc-attach --clear-env -n piston -- /bin/bash -l -c "deno --version"
|
||||||
|
echo '---'
|
||||||
|
|
10
readme.md
10
readme.md
|
@ -54,7 +54,7 @@ apt-get update
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
nano wget build-essential pkg-config libxml2-dev \
|
nano wget build-essential pkg-config libxml2-dev \
|
||||||
libsqlite3-dev mono-complete curl cmake libpython2.7-dev \
|
libsqlite3-dev mono-complete curl cmake libpython2.7-dev \
|
||||||
ruby libtinfo-dev
|
ruby libtinfo-dev unzip
|
||||||
|
|
||||||
# install python2
|
# install python2
|
||||||
# final binary: /opt/python2/Python-2.7.17/python
|
# final binary: /opt/python2/Python-2.7.17/python
|
||||||
|
@ -223,6 +223,14 @@ source /opt/.profile
|
||||||
# get version: /usr/bin/ghc --version
|
# get version: /usr/bin/ghc --version
|
||||||
apt install ghc
|
apt install ghc
|
||||||
|
|
||||||
|
# install deno
|
||||||
|
# final binary: /opt/.deno/bin/deno
|
||||||
|
# get version: /opt/.deno/bin/deno --version
|
||||||
|
curl -fsSL https://deno.land/x/install/install.sh | sh
|
||||||
|
echo 'export DENO_INSTALL="/opt/.deno"'
|
||||||
|
echo 'export PATH="$DENO_INSTALL/bin:$PATH"'
|
||||||
|
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
|
||||||
|
|
Loading…
Reference in New Issue