parent
0c4c6e7ad5
commit
0e2131eb1d
|
@ -199,6 +199,13 @@
|
|||
"php5"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "prolog",
|
||||
"aliases": [
|
||||
"prolog",
|
||||
"plg"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "python3",
|
||||
"aliases": [
|
||||
|
|
|
@ -283,6 +283,22 @@ MIX_ENV=prod mix escript.build --force
|
|||
echo 'export PATH=$PATH:/opt/05AB1E/05AB1E' >> /opt/.profile
|
||||
source /opt/.profile
|
||||
|
||||
|
||||
# install prolog
|
||||
# final binary: /opt/swipl/swipl-<version>/build/src/swipl
|
||||
cd /opt && mkdir swipl && cd swipl
|
||||
SUB_DIR=swipl-8.2.4
|
||||
wget https://www.swi-prolog.org/download/stable/src/$SUB_DIR.tar.gz
|
||||
tar -xf $SUB_DIR.tar.gz
|
||||
rm $SUB_DIR.tar.gz
|
||||
cd $SUB_DIR
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DSWIPL_PACKAGES_JAVA=OFF -DSWIPL_PACKAGES_X=OFF -DMULTI_THREADED=OFF -G Ninja ..
|
||||
ninja
|
||||
echo "export PATH=\$PATH:/opt/swipl/$SUB_DIR/build/src" >> /opt/.profile
|
||||
source /opt/.profile
|
||||
|
||||
# create runnable users and apply limits
|
||||
for i in {1..150}; do
|
||||
useradd -M runner$i
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd /tmp/$1
|
||||
|
||||
sed 's/^.*$/:- forall((Goal = (\0), call(Goal)), (write(Goal), nl))./' input.input |
|
||||
cat code.code - > code.pl
|
||||
|
||||
timeout -s KILL 3 swipl -g true -t halt code.pl
|
||||
|
|
@ -52,6 +52,8 @@ echo -n 'testing perl = '
|
|||
../../cli/execute perl perl.pl
|
||||
echo -n 'testing php = '
|
||||
../../cli/execute php php.php
|
||||
echo -n 'testing prolog = '
|
||||
../../cli/execute prolog prolog.pl
|
||||
echo -n 'testing python2 = '
|
||||
../../cli/execute python2 python2.py
|
||||
echo -n 'testing python3 = '
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
:- write('good'), nl.
|
|
@ -105,6 +105,10 @@ echo 'php'
|
|||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "php -v"
|
||||
echo '---'
|
||||
|
||||
echo 'prolog'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "swipl --version"
|
||||
echo '---'
|
||||
|
||||
echo 'python2'
|
||||
lxc-attach --clear-env -n piston -- /bin/bash -l -c "python -V"
|
||||
echo '---'
|
||||
|
|
Loading…
Reference in New Issue