commit
b750de1f5e
|
@ -72,6 +72,7 @@ func Execute(res http.ResponseWriter, req *http.Request) {
|
||||||
"csharp", "cs", "c#",
|
"csharp", "cs", "c#",
|
||||||
"go",
|
"go",
|
||||||
"java",
|
"java",
|
||||||
|
"julia", "jl",
|
||||||
"nasm", "asm",
|
"nasm", "asm",
|
||||||
"node", "javascript", "js",
|
"node", "javascript", "js",
|
||||||
"php",
|
"php",
|
||||||
|
@ -141,6 +142,8 @@ func launch(request Inbound, res http.ResponseWriter) {
|
||||||
execlang = "nasm"
|
execlang = "nasm"
|
||||||
case "js", "javascript":
|
case "js", "javascript":
|
||||||
execlang = "node"
|
execlang = "node"
|
||||||
|
case "jl":
|
||||||
|
execlang = "julia"
|
||||||
case "python":
|
case "python":
|
||||||
execlang = "python3"
|
execlang = "python3"
|
||||||
case "ts":
|
case "ts":
|
||||||
|
|
|
@ -63,6 +63,9 @@ case "$lang" in
|
||||||
"java")
|
"java")
|
||||||
bin=java
|
bin=java
|
||||||
;;
|
;;
|
||||||
|
"julia" | "jl")
|
||||||
|
bin=julia
|
||||||
|
;;
|
||||||
"nasm" | "asm")
|
"nasm" | "asm")
|
||||||
bin=nasm
|
bin=nasm
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
cd /tmp/$2
|
||||||
|
runuser runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 julia code.code"
|
|
@ -21,6 +21,9 @@ echo '---'
|
||||||
echo 'java'
|
echo 'java'
|
||||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "java -version"
|
lxc-attach --clear-env -n piston -- /bin/bash -l -c "java -version"
|
||||||
echo '---'
|
echo '---'
|
||||||
|
echo 'julia'
|
||||||
|
lxc-attach --clear-env -n piston -- /bin/bash -l -c "julia --version"
|
||||||
|
echo '---'
|
||||||
echo 'nasm'
|
echo 'nasm'
|
||||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "nasm -version"
|
lxc-attach --clear-env -n piston -- /bin/bash -l -c "nasm -version"
|
||||||
echo '---'
|
echo '---'
|
||||||
|
|
|
@ -137,6 +137,15 @@ tar -xzf openjdk-14_linux-x64_bin.tar.gz
|
||||||
echo 'export PATH=$PATH:/opt/java/jdk-14/bin' >> /opt/.profile
|
echo 'export PATH=$PATH:/opt/java/jdk-14/bin' >> /opt/.profile
|
||||||
source /opt/.profile
|
source /opt/.profile
|
||||||
|
|
||||||
|
# install julia
|
||||||
|
#final binary: /opt/julia/julia-1.4.1/bin/julia --version
|
||||||
|
cd /opt && mkdir julia && cd julia
|
||||||
|
wget https://julialang-s3.julialang.org/bin/linux/x64/1.4/julia-1.4.1-linux-x86_64.tar.gz
|
||||||
|
tar -xzf julia-1.4.1-linux-x86_64.tar.gz
|
||||||
|
echo 'export PATH=$PATH:/opt/julia/julia-1.4.1/bin' >> /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
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
println("good")
|
|
@ -16,6 +16,8 @@ echo 'testing asm'
|
||||||
../lxc/execute asm test.nasm
|
../lxc/execute asm test.nasm
|
||||||
echo 'testing js'
|
echo 'testing js'
|
||||||
../lxc/execute js test.js
|
../lxc/execute js test.js
|
||||||
|
echo 'testing jl'
|
||||||
|
../lxc/execute jl test.jl
|
||||||
echo 'testing php'
|
echo 'testing php'
|
||||||
../lxc/execute php test.php
|
../lxc/execute php test.php
|
||||||
echo 'testing python2'
|
echo 'testing python2'
|
||||||
|
|
Loading…
Reference in New Issue