mirror of https://github.com/koreader/koreader
build: deploy doc update after sucess
parent
180b823157
commit
83cc67b660
@ -0,0 +1,16 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
make coverage
|
||||||
|
cd koreader-*/koreader && luajit $(which luacov-coveralls) -v
|
||||||
|
|
||||||
|
# get deploy key for doc repo
|
||||||
|
openssl aes-256-cbc -K $encrypted_dc71a4fb8382_key -iv $encrypted_dc71a4fb8382_iv \
|
||||||
|
-in .ci/koreader_doc.enc -out ~/.ssh/koreader_doc -d
|
||||||
|
ssh-add ~/.ssh/koreader_doc
|
||||||
|
git clone git@github.com:koreader/doc.git
|
||||||
|
# push doc update
|
||||||
|
make doc
|
||||||
|
cp -r doc/html/* doc/
|
||||||
|
pushd doc
|
||||||
|
git add .
|
||||||
|
git push origin gh-pages
|
@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# don't do this for clang
|
||||||
|
if [ "$CXX" = "g++" ];
|
||||||
|
then export CXX="g++-4.8" CC="gcc-4.8";
|
||||||
|
fi
|
||||||
|
# in case anything ignores the environment variables, override through PATH
|
||||||
|
mkdir bin
|
||||||
|
ln -s $(which gcc-4.8) bin/cc
|
||||||
|
ln -s $(which gcc-4.8) bin/gcc
|
||||||
|
ln -s $(which c++-4.8) bin/c++
|
||||||
|
ln -s $(which g++-4.8) bin/g++
|
@ -0,0 +1,32 @@
|
|||||||
|
ANSI_RED="\033[31;1m"
|
||||||
|
ANSI_GREEN="\033[32;1m"
|
||||||
|
ANSI_RESET="\033[0m"
|
||||||
|
ANSI_CLEAR="\033[0K"
|
||||||
|
|
||||||
|
travis_retry() {
|
||||||
|
local result=0
|
||||||
|
local count=1
|
||||||
|
while [ $count -le 3 ]; do
|
||||||
|
[ $result -ne 0 ] && {
|
||||||
|
echo -e "\n${ANSI_RED}The command \"$@\" failed. Retrying, $count of 3.${ANSI_RESET}\n" >&2
|
||||||
|
}
|
||||||
|
"$@"
|
||||||
|
result=$?
|
||||||
|
[ $result -eq 0 ] && break
|
||||||
|
count=$(($count + 1))
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
|
[ $count -gt 3 ] && {
|
||||||
|
echo -e "\n${ANSI_RED}The command \"$@\" failed 3 times.${ANSI_RESET}\n" >&2
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result
|
||||||
|
}
|
||||||
|
|
||||||
|
export PATH=$PWD/bin:$PATH
|
||||||
|
export PATH=$PATH:${TRAVIS_BUILD_DIR}/install/bin
|
||||||
|
if [ -f ${TRAVIS_BUILD_DIR}/install/bin/luarocks ]; then
|
||||||
|
# add local rocks to $PATH
|
||||||
|
eval $(luarocks path --bin)
|
||||||
|
fi
|
@ -0,0 +1,28 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
source "${CI_DIR}/common.sh"
|
||||||
|
|
||||||
|
# install our own updated luarocks
|
||||||
|
git clone https://github.com/torch/luajit-rocks.git
|
||||||
|
pushd luajit-rocks
|
||||||
|
git checkout 6529891
|
||||||
|
cmake . -DWITH_LUAJIT21=ON -DCMAKE_INSTALL_PREFIX=${TRAVIS_BUILD_DIR}/install
|
||||||
|
make install
|
||||||
|
popd
|
||||||
|
|
||||||
|
mkdir $HOME/.luarocks
|
||||||
|
cp ${TRAVIS_BUILD_DIR}/install/etc/luarocks/config.lua $HOME/.luarocks/config.lua
|
||||||
|
echo "wrap_bin_scripts = false" >> $HOME/.luarocks/config.lua
|
||||||
|
travis_retry luarocks --local install luafilesystem
|
||||||
|
travis_retry luarocks --local install ansicolors
|
||||||
|
travis_retry luarocks --local install busted 2.0.rc11-0
|
||||||
|
#- travis_retry luarocks --local install busted 1.11.1-1
|
||||||
|
#- mv -f $HOME/.luarocks/bin/busted_bootstrap $HOME/.luarocks/bin/busted
|
||||||
|
travis_retry luarocks --local install luacov
|
||||||
|
# luasec doesn't automatically detect 64-bit libs
|
||||||
|
travis_retry luarocks --local install luasec OPENSSL_LIBDIR=/usr/lib/x86_64-linux-gnu
|
||||||
|
travis_retry luarocks --local install luacov-coveralls --server=http://rocks.moonscript.org/dev
|
||||||
|
travis_retry luarocks --local install luacheck
|
||||||
|
travis_retry luarocks --local install lanes # for parallel luacheck
|
||||||
|
travis_retry luarocks --local install ldoc
|
Binary file not shown.
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
source "${CI_DIR}/common.sh"
|
||||||
|
|
||||||
|
travis_retry make fetchthirdparty
|
||||||
|
make all
|
||||||
|
travis_retry make testfront
|
||||||
|
luajit $(which luacheck) --no-color -q frontend | tee ./luacheck.out
|
||||||
|
test $(grep Total ./luacheck.out | awk '{print $2}') -le 63
|
Loading…
Reference in New Issue