Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote docs #60

Merged
merged 1 commit into from
Apr 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .ci/rsa_keys.tar.enc
Binary file not shown.
Binary file added .ci/secret.tar.enc
Binary file not shown.
11 changes: 7 additions & 4 deletions .nengobones.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,20 @@ docs_conf_py:
travis_yml:
python: 3.6
jobs:
- stage: basic
script: static
- stage: advanced
script: docs
- script: static
- script: remote-docs

ci_scripts:
- template: static
- template: docs
pip_install:
- numpy>=1.13.0,<1.17
- matplotlib
- template: remote-script
remote_script: docs
output_name: remote-docs
host: fpga-ci
travis_var_key: 2895d60e3414

codecov_yml: {}

Expand Down
101 changes: 0 additions & 101 deletions .templates/docs.sh.template

This file was deleted.

38 changes: 38 additions & 0 deletions .templates/remote-script.sh.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{% extends "templates/remote.sh.template" %}

{% block remote_install %}
{{ super() }}
pip install nengo-bones
bones-generate --output-dir .ci ci-scripts || REMOTE_STATUS=1
bash .ci/{{ remote_script }}.sh install || REMOTE_STATUS=1

FPGA_CONFIG="\$HOME/fpga_config"

# A valid fpga_config should be in the $HOME dir of the remote machine
if [ ! -f "\$FPGA_CONFIG" ]; then
echo "ERROR: There must be a valid fpga_config file in \$HOME"
exit 1
fi

cp -f "\$FPGA_CONFIG" ~/"$BUILD_DIR"/{{ pkg }}

{% endblock %}

{% block remote_script %}
{{ super() }}
export TRAVIS_BRANCH="$TRAVIS_BRANCH"
export TRAVIS_TAG="$TRAVIS_TAG"
export TEST_ARGS="$TEST_ARGS"

bash .ci/{{ remote_script }}.sh script || REMOTE_STATUS=1
{% endblock %}

{% block after_script %}
{% if remote_script == "docs" %}
REMOTE_FAILED_FILE="tmp/nengo-fpga-$TRAVIS_JOB_NUMBER/{{ pkg }}/$TRAVIS_JOB_NUMBER.failed"
ssh -q {{ host }} [[ -e "$REMOTE_FAILED_FILE" ]] && scp {{ host }}:"$REMOTE_FAILED_FILE" .
exe rsync -azh "{{ host }}:./tmp/{{ pkg }}-$TRAVIS_JOB_NUMBER/{{ pkg }}-docs" ..
{% endif %}
exe bash .ci/{{ remote_script }}.sh after_script
{{ super() }}
{% endblock %}
8 changes: 1 addition & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,9 @@ jobs:
-
env:
SCRIPT="static"
stage: basic
-
env:
SCRIPT="docs"
addons:
apt:
packages:
- pandoc
stage: advanced
SCRIPT="remote-docs"

before_install:
# export travis_terminate for use in scripts, from here:
Expand Down
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ Release History
(`#58 <https://github.com/nengo/nengo-fpga/pull/58>`__)
- Make all variable names lowercase.
(`#59 <https://github.com/nengo/nengo-fpga/pull/59>`__)
- Dwitch to remote doc script that tracks nengo-bones.
(`#60 <https://github.com/nengo/nengo-fpga/pull/60>`__)

**Fixed**

Expand Down