1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-04 10:19:16 +02:00

Merge pull request #313 from deltachat/ci-build-docs

Ci build docs and deploy
This commit is contained in:
holger krekel 2018-09-26 11:35:53 +02:00 committed by GitHub
commit f487266489
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 61 additions and 12 deletions

Binary file not shown.

34
.scripts/deploy.sh Executable file
View file

@ -0,0 +1,34 @@
#!/bin/bash
set -e
set -u
set -x
set -v
#Only attempt to deploy if we know the ssh key secrets, username and server
if test -z ${encrypted_49475b8073e9_key:+decryp_key} ; then exit 0; fi
if test -z ${encrypted_49475b8073e9_iv:+decrypt_iv} ; then exit 0; fi
if test -z ${DEPLOY_USER:+username} ; then exit 0; fi
if test -z ${DEPLOY_SERVER:+server} ; then exit 0; fi
# Prepare the ssh homedir.
#
# Decrypting the ssh private key for deploying to the server.
# See https://docs.travis-ci.com/user/encrypting-files/ for details.
mkdir -p -m 0700 ~/.ssh
openssl aes-256-cbc \
-K $encrypted_49475b8073e9_key \
-iv $encrypted_49475b8073e9_iv \
-in .credentials/delta.id_rsa.enc \
-out ~/.ssh/id_rsa -d
chmod 600 ~/.ssh/id_rsa
printf "Host *\n" >> ~/.ssh/config
printf " %sAuthentication no\n" ChallengeResponse Password KbdInteractive >> ~/.ssh/config
# Perform the actual deploy
rsync -avz \
-e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" \
$TRAVIS_BUILD_DIR/python/doc/_build/html/ \
${DEPLOY_USER}@${DEPLOY_SERVER}:build/${TRAVIS_BRANCH/\//_}

View file

@ -1,4 +1,8 @@
sudo: required sudo: required
language: c
env:
- DEPLOY_USER=delta DEPLOY_SERVER="py.delta.chat"
addons: addons:
apt: apt:
@ -10,8 +14,6 @@ addons:
- g++-7 - g++-7
- doxygen - doxygen
language: c
before_install: before_install:
- export CC=gcc-7 - export CC=gcc-7
- export CXX=g++-7 - export CXX=g++-7
@ -25,7 +27,7 @@ before_install:
- pushd cyrus-sasl2-2.1.27~101-g0780600+dfsg.orig && ./autogen.sh && make && sudo make install && popd - pushd cyrus-sasl2-2.1.27~101-g0780600+dfsg.orig && ./autogen.sh && make && sudo make install && popd
install: install:
- sudo apt install -y libssl-dev libsqlite3-dev libbz2-dev zlib1g-dev python3.5-dev - sudo apt install -y libssl-dev libsqlite3-dev libbz2-dev zlib1g-dev python3.5-dev sphinx-doc
script: script:
- mkdir -p builddir && cd builddir && meson && ninja -v && sudo ninja install - mkdir -p builddir && cd builddir && meson && ninja -v && sudo ninja install
@ -39,3 +41,15 @@ script:
- pip install tox - pip install tox
- ldd /usr/local/lib/x86_64-linux-gnu/libdeltachat.so - ldd /usr/local/lib/x86_64-linux-gnu/libdeltachat.so
- tox - tox
- pip install -e .
- pip install sphinx breathe
- cd doc
- make html
- cd ../..
deploy:
provider: script
skip_cleanup: true
script: .scripts/deploy.sh
on:
all_branches: true

View file

@ -8,6 +8,7 @@ SPHINXOPTS =
SPHINXBUILD = sphinx-build SPHINXBUILD = sphinx-build
PAPER = PAPER =
BUILDDIR = _build BUILDDIR = _build
RSYNCOPTS = -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
export HOME=/tmp/home export HOME=/tmp/home
export TESTHOME=$(HOME) export TESTHOME=$(HOME)
@ -79,7 +80,7 @@ doczip: html
python doczip.py $(DOCZIP) _build/html python doczip.py $(DOCZIP) _build/html
install: html install: html
rsync -avz _build/html/ delta@py.delta.chat:build/master rsync -avz $(RSYNCOPTS) _build/html/ delta@py.delta.chat:build/master
html: html: