diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2f16c93ac4..e6cb3196de 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -134,6 +134,19 @@ Clang_Format: script: - CI/check_clang_format.sh +Teal: + stage: checks + extends: .Ubuntu_Image + before_script: + - apt-get update + - apt-get -y install curl wget make build-essential libreadline-dev git-core zip unzip + script: + - CI/teal_ci.sh + artifacts: + paths: + - build_teal + + Ubuntu_GCC_Debug: extends: .Ubuntu cache: diff --git a/CI/teal_ci.sh b/CI/teal_ci.sh new file mode 100755 index 0000000000..61cfdb05bc --- /dev/null +++ b/CI/teal_ci.sh @@ -0,0 +1,46 @@ +pushd . + +echo "Install lua 5.1" +cd ~ +curl -R -O https://www.lua.org/ftp/lua-5.1.5.tar.gz +tar -zxf lua-5.1.5.tar.gz +rm lua-5.1.5.tar.gz +cd lua-5.1.5/ +make linux +cd ~ +PATH=$PATH:~/lua-5.1.5/src + +echo "Install luarocks" +luarocksV="3.9.2" +wget https://luarocks.org/releases/luarocks-$luarocksV.tar.gz +tar zxpf luarocks-$luarocksV.tar.gz +rm luarocks-$luarocksV.tar.gz +cd luarocks-$luarocksV/ +./configure --with-lua-bin=$HOME/lua-5.1.5/src --with-lua-include=$HOME/lua-5.1.5/src --prefix=$HOME/luarocks +make build +make install +cd ~ +rm -r luarocks-$luarocksV +PATH=$PATH:~/luarocks/bin + +echo "Install openmwluadocumentor" +git clone https://gitlab.com/ptmikheev/openmw-luadocumentor.git +cd openmw-luadocumentor +luarocks make luarocks/openmwluadocumentor-0.2.0-1.rockspec +cd ~ +rm -r openmw-luadocumentor + + +echo "Install Teal Cyan" +git clone https://github.com/teal-language/cyan.git --depth 1 +cd cyan +luarocks make cyan-dev-1.rockspec + +luarocks show openmwluadocumentor +luarocks show cyan + +LUAROCKS=~/luarocks/bin +export LUAROCKS +popd +pushd docs +./build_teal.sh ../build_teal diff --git a/docs/build_teal.sh b/docs/build_teal.sh old mode 100644 new mode 100755 index dac453a4a4..0325842068 --- a/docs/build_teal.sh +++ b/docs/build_teal.sh @@ -1,8 +1,11 @@ +# Requires the LUAROCKS variable to be set to the luarocks/bin directory, e. g. `~/.luarocks/bin` +# takes an absolute path to the output directory as the argument + DOCS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" FILES_DIR=$(realpath $DOCS_DIR/../files) -OUTPUT_DIR=$(realpath $DOCS_DIR/$1) -DOCUMENTOR_PATH=~/.luarocks/bin/openmwluadocumentor -TEAL_PATH=~/.luarocks/bin/tl +OUTPUT_DIR=$1 +DOCUMENTOR_PATH=$LUAROCKS/openmwluadocumentor +TEAL_PATH=$LUAROCKS/cyan rm -rf $OUTPUT_DIR mkdir $OUTPUT_DIR @@ -17,12 +20,12 @@ build_path() { } cd $FILES_DIR -build_path lua_api/openmw/*lua +build_path "lua_api/openmw/*lua" data_paths=$($DOCS_DIR/source/luadoc_data_paths.sh) for path in $data_paths do - build_path data/$path + build_path "data/$path" done cd $OUTPUT_DIR diff --git a/docs/source/install_luadocumentor_in_docker.sh b/docs/source/install_luadocumentor_in_docker.sh index 35ed9bef08..e0b331a0a7 100644 --- a/docs/source/install_luadocumentor_in_docker.sh +++ b/docs/source/install_luadocumentor_in_docker.sh @@ -14,15 +14,16 @@ cd ~ PATH=$PATH:~/lua-5.1.5/src echo "Install luarocks" -wget https://luarocks.org/releases/luarocks-2.4.2.tar.gz -tar zxpf luarocks-2.4.2.tar.gz -rm luarocks-2.4.2.tar.gz -cd luarocks-2.4.2/ +luarocksV="3.9.2" +wget https://luarocks.org/releases/luarocks-$luarocksV.tar.gz +tar zxpf luarocks-$luarocksV.tar.gz +rm luarocks-$luarocksV.tar.gz +cd luarocks-$luarocksV/ ./configure --with-lua-bin=$HOME/lua-5.1.5/src --with-lua-include=$HOME/lua-5.1.5/src --prefix=$HOME/luarocks make build make install cd ~ -rm -r luarocks-2.4.2 +rm -r luarocks-$luarocksV PATH=$PATH:~/luarocks/bin echo "Install openmwluadocumentor" diff --git a/docs/source/luadoc_data_paths.sh b/docs/source/luadoc_data_paths.sh old mode 100644 new mode 100755