merge
This commit is contained in:
commit
30556fb45d
|
@ -70,6 +70,7 @@ func Execute(res http.ResponseWriter, req *http.Request) {
|
|||
"c",
|
||||
"cpp", "c++",
|
||||
"csharp", "cs", "c#",
|
||||
"elixir", "exs",
|
||||
"go",
|
||||
"java",
|
||||
"julia", "jl",
|
||||
|
@ -139,6 +140,8 @@ func launch(request Inbound, res http.ResponseWriter) {
|
|||
execlang = "cpp"
|
||||
case "cs", "c#":
|
||||
execlang = "csharp"
|
||||
case "elixir", "exs":
|
||||
execlang = "elixir"
|
||||
case "asm":
|
||||
execlang = "nasm"
|
||||
case "js", "javascript":
|
||||
|
|
|
@ -57,6 +57,9 @@ case "$lang" in
|
|||
"csharp" | "cs" | "c#")
|
||||
bin=csharp
|
||||
;;
|
||||
"elixir" | "exs")
|
||||
bin=elixir
|
||||
;;
|
||||
"go")
|
||||
bin=go
|
||||
;;
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
cd /tmp/$2
|
||||
runuser runner$1 -c "cd /tmp/$2 ; cat args.args ; xargs -d '\n' timeout -s KILL 3 elixir code.code"
|
|
@ -27,6 +27,9 @@ echo '---'
|
|||
echo 'kotlin'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "kotlinc -version"
|
||||
echo '---'
|
||||
echo "elixir"
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "elixir --version"
|
||||
echo "---"
|
||||
echo 'nasm'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "nasm -version"
|
||||
echo '---'
|
||||
|
|
20
readme.md
20
readme.md
|
@ -19,6 +19,9 @@ systemctl start libvirtd
|
|||
# ubuntu server 18.04:
|
||||
apt install lxc lxc-templates debootstrap libvirt0
|
||||
|
||||
# arch:
|
||||
sudo pacman -S lxc libvirt unzip
|
||||
|
||||
# everything else:
|
||||
# not documented, please open pull requests with commands for debian/arch/macos
|
||||
|
||||
|
@ -154,6 +157,23 @@ rm kotlin-compiler-1.3.72.zip
|
|||
echo 'export PATH=$PATH:/opt/kotlinc/bin' >> /opt/.profile
|
||||
source /opt/.profile
|
||||
|
||||
# install elixir and erlang
|
||||
# final binary: /opt/elixir/bin/elixir --version
|
||||
# erlang
|
||||
cd /opt && mkdir erlang && cd erlang
|
||||
wget http://erlang.org/download/otp_src_23.0.tar.gz
|
||||
gunzip -c otp_src_23.0.tar.gz | tar xf -
|
||||
cd otp_src_23.0 && ./configure
|
||||
make
|
||||
echo 'export PATH=$PATH:/opt/erlang/otp_src_23.0/bin' >> /opt/.profile
|
||||
source /opt/.profile
|
||||
# elixir
|
||||
cd /opt && mkdir elixir && cd elixir
|
||||
wget https://github.com/elixir-lang/elixir/releases/download/v1.10.3/Precompiled.zip
|
||||
mkdir elixir-1.10.3 && unzip Precompiled.zip -d elixir-1.10.3/
|
||||
echo 'export PATH=$PATH:/opt/elixir/elixir-1.10.3/bin' >> /opt/.profile
|
||||
source /opt/.profile
|
||||
|
||||
# create runnable users and apply limits
|
||||
for i in {1..150}; do
|
||||
useradd -M runner$i
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
IO.puts("good")
|
|
@ -8,6 +8,8 @@ echo 'testing cpp'
|
|||
../lxc/execute cpp test.cpp
|
||||
echo 'testing cs'
|
||||
../lxc/execute cs test.cs
|
||||
echo 'testing elixir'
|
||||
../lxc/exexute exs test.exs
|
||||
echo 'testing go'
|
||||
../lxc/execute go test.go
|
||||
echo 'testing java'
|
||||
|
|
Loading…
Reference in New Issue