Add Crystal

This commit is contained in:
Vrganj 2021-01-04 20:52:46 +01:00
parent b0c462d5ee
commit 10d85553db
7 changed files with 26 additions and 0 deletions

View file

@ -57,6 +57,9 @@ case "$lang" in
"cpp" | "c++")
bin=cpp
;;
"crystal" | "cr")
bin=crystal
;;
"csharp" | "cs" | "c#")
bin=csharp
;;

3
lxc/executors/crystal Normal file
View file

@ -0,0 +1,3 @@
cd /tmp/$2
timeout -s KILL 10 crystal build code.code
runuser runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 ./code"

View file

@ -7,6 +7,8 @@ echo 'testing c'
../execute c test.c
echo 'testing cpp'
../execute cpp test.cpp
echo 'testing crystal'
../execute crystal test.cr
echo 'testing cs'
../execute cs test.cs
echo 'testing deno ts'

1
lxc/tests/test.cr Normal file
View file

@ -0,0 +1 @@
puts "good"

View file

@ -21,6 +21,10 @@ echo 'cpp'
lxc-attach --clear-env -n piston -- /bin/bash -l -c "g++ -v"
echo '---'
echo 'crystal'
lxc-attach --clear-env -n piston -- /bin/bash -l -c "crystal -v"
echo '---'
echo 'csharp'
lxc-attach --clear-env -n piston -- /bin/bash -l -c "mcs --version"
echo '---'