Merge pull request #10 from aveliz1999/kotlin-support
Add Kotlin support
This commit is contained in:
commit
b8e833f513
|
@ -73,6 +73,7 @@ func Execute(res http.ResponseWriter, req *http.Request) {
|
|||
"go",
|
||||
"java",
|
||||
"julia", "jl",
|
||||
"kotlin",
|
||||
"nasm", "asm",
|
||||
"node", "javascript", "js",
|
||||
"php",
|
||||
|
|
|
@ -66,6 +66,9 @@ case "$lang" in
|
|||
"julia" | "jl")
|
||||
bin=julia
|
||||
;;
|
||||
"kotlin")
|
||||
bin=kotlin
|
||||
;;
|
||||
"nasm" | "asm")
|
||||
bin=nasm
|
||||
;;
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
cd /tmp/$2
|
||||
cp code.code code.kt
|
||||
timeout -s KILL 10 kotlinc code.kt -include-runtime -d code.jar
|
||||
runuser runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 java -jar code.jar"
|
|
@ -24,6 +24,9 @@ echo '---'
|
|||
echo 'julia'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "julia --version"
|
||||
echo '---'
|
||||
echo 'kotlin'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "kotlinc -version"
|
||||
echo '---'
|
||||
echo 'nasm'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "nasm -version"
|
||||
echo '---'
|
||||
|
|
|
@ -145,6 +145,14 @@ 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
|
||||
|
||||
#install kotlin
|
||||
#final binary: /opt/kotlinc/bin/kotlinc
|
||||
cd /opt
|
||||
wget https://github.com/JetBrains/kotlin/releases/download/v1.3.72/kotlin-compiler-1.3.72.zip
|
||||
unzip kotlin-compiler-1.3.72.zip
|
||||
rm kotlin-compiler-1.3.72.zip
|
||||
echo 'export PATH=$PATH:/opt/kotlinc/bin' >> /opt/.profile
|
||||
source /opt/.profile
|
||||
|
||||
# create runnable users and apply limits
|
||||
for i in {1..150}; do
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
fun main(args: Array<String>) {
|
||||
println("good")
|
||||
}
|
|
@ -12,6 +12,8 @@ echo 'testing go'
|
|||
../lxc/execute go test.go
|
||||
echo 'testing java'
|
||||
../lxc/execute java test.java
|
||||
echo 'testing kotlin'
|
||||
../lxc/execute kotlin test.kt
|
||||
echo 'testing asm'
|
||||
../lxc/execute asm test.nasm
|
||||
echo 'testing js'
|
||||
|
|
Loading…
Reference in New Issue