Merge pull request #56 from Vrganj/nim

add nim
This commit is contained in:
Brian Seymour 2021-01-24 23:02:11 -06:00 committed by GitHub
commit 382b9e09a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 30 additions and 0 deletions

5
lxc/executors/nim Normal file
View File

@ -0,0 +1,5 @@
#!/bin/bash
cd /tmp/$2
timeout -s KILL 10 nim --hints:off c code.code
timeout -s KILL 3 xargs -a args.args -d '\n' ./code

View File

@ -41,6 +41,8 @@ echo -n 'testing nasm 32 bit = '
../../cli/execute nasm nasm.nasm
echo -n 'testing nasm 64 bit = '
../../cli/execute nasm64 nasm64.nasm
echo -n 'testing nim = '
../../cli/execute nim nim.nim
echo -n 'testing node = '
../../cli/execute node node.js
echo -n 'testing paradoc = '

View File

@ -89,6 +89,10 @@ echo 'nasm64'
lxc-attach --clear-env -n piston -- /bin/bash -l -c "nasm -version"
echo '---'
echo 'nim'
lxc-attach --clear-env -n piston -- /bin/bash -l -c "nim -v"
echo '---'
echo 'node'
lxc-attach --clear-env -n piston -- /bin/bash -l -c "node --version"
echo '---'

View File

@ -274,6 +274,7 @@ Content-Type: application/json
`lua`,
`nasm`,
`nasm64`,
`nim`,
`node`,
`paradoc`,
`perl`,

View File

@ -136,6 +136,12 @@
"java"
]
},
{
"name": "nim",
"aliases": [
"nim"
]
},
{
"name": "node",
"aliases": [

View File

@ -252,6 +252,18 @@ rm zig-linux-x86_64-0.7.1.tar.xz
echo 'export PATH=$PATH:/opt/zig/zig' >> /opt/.profile
source /opt/.profile
# install nim
# final binary: /opt/nim/bin/nim
# get version: /opt/nim/bin/nim -v
cd /opt && mkdir nim && cd nim
wget https://nim-lang.org/download/nim-1.4.0-linux_x64.tar.xz
unxz nim-1.4.0-linux_x64.tar.xz
tar -xf nim-1.4.0-linux_x64.tar
cd nim-1.4.0
./install.sh /opt
echo 'export PATH=$PATH:/opt/nim/bin' >> /opt/.profile
source /opt/.profile
# create runnable users and apply limits
for i in {1..150}; do
useradd -M runner$i