add scala

This commit is contained in:
Sirius902 2021-02-04 20:03:17 -08:00
parent 6615ec4519
commit 48d3e39f9a
7 changed files with 29 additions and 0 deletions

View File

@ -222,6 +222,12 @@
"rust" "rust"
] ]
}, },
{
"name": "scala",
"aliases": [
"sc"
]
},
{ {
"name": "swift", "name": "swift",
"aliases": [ "aliases": [

4
lxc/executors/scala Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
cp code.code interim.scala
timeout -s KILL 10 xargs -a args.args -d '\n' scala interim.scala < stdin.stdin

View File

@ -60,6 +60,8 @@ echo -n 'testing ruby = '
../../cli/execute ruby ruby.rb ../../cli/execute ruby ruby.rb
echo -n 'testing rust = ' echo -n 'testing rust = '
../../cli/execute rust rust.rs ../../cli/execute rust rust.rs
echo -n 'testing scala = '
../../cli/execute scala scala.scala
echo -n 'testing swift = ' echo -n 'testing swift = '
../../cli/execute swift swift.swift ../../cli/execute swift swift.swift
echo -n 'testing typescript = ' echo -n 'testing typescript = '

3
lxc/tests/scala.scala Normal file
View File

@ -0,0 +1,3 @@
object Test extends App {
println("good")
}

View File

@ -125,6 +125,10 @@ echo 'rust'
lxc-attach --clear-env -n piston -- /bin/bash -l -c "rustc --version" lxc-attach --clear-env -n piston -- /bin/bash -l -c "rustc --version"
echo '---' echo '---'
echo 'scala'
lxc-attach --clear-env -n piston -- /bin/bash -l -c "scala -version"
echo '---'
echo 'swift' echo 'swift'
lxc-attach --clear-env -n piston -- /bin/bash -l -c "swift --version" lxc-attach --clear-env -n piston -- /bin/bash -l -c "swift --version"
echo '---' echo '---'

View File

@ -284,6 +284,7 @@ Content-Type: application/json
`python3`, `python3`,
`ruby`, `ruby`,
`rust`, `rust`,
`scala`,
`swift`, `swift`,
`typescript`, `typescript`,
`zig`, `zig`,

View File

@ -102,6 +102,15 @@ tar -xzf rust-1.49.0-x86_64-unknown-linux-gnu.tar.gz
cd rust-1.49.0-x86_64-unknown-linux-gnu cd rust-1.49.0-x86_64-unknown-linux-gnu
./install.sh ./install.sh
# install scala
# final binary: /opt/scala/scala-2.12.13/bin/scala
# get version: /opt/scala/scala-2.12.13/bin/scala -version
cd /opt && mkdir scala && cd scala
wget https://downloads.lightbend.com/scala/2.12.13/scala-2.12.13.tgz
tar -xzf scala-2.12.13.tgz
echo 'export PATH=$PATH:/opt/scala/scala-2.12.13/bin' >> /opt/.profile
source /opt/.profile
# install swift # install swift
# final binary: /opt/swift/swift-5.1.5-RELEASE-ubuntu18.04/usr/bin/swift # final binary: /opt/swift/swift-5.1.5-RELEASE-ubuntu18.04/usr/bin/swift
# get version: /opt/swift/swift-5.1.5-RELEASE-ubuntu18.04/usr/bin/swift --version # get version: /opt/swift/swift-5.1.5-RELEASE-ubuntu18.04/usr/bin/swift --version