Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
392a7b04
Commit
392a7b04
authored
Sep 23, 2014
by
peastman
Browse files
Merge pull request #626 from rmcgibbo/docs2
[WEB] Docs on S3
parents
fb95c56c
f77a7019
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
0 deletions
+49
-0
.travis.yml
.travis.yml
+15
-0
devtools/ci/push-docs-to-s3.py
devtools/ci/push-docs-to-s3.py
+34
-0
No files found.
.travis.yml
View file @
392a7b04
...
@@ -2,6 +2,12 @@ language: cpp
...
@@ -2,6 +2,12 @@ language: cpp
compiler
:
compiler
:
-
clang
-
clang
env
:
global
:
# encrypted AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY to push docs to s3
-
secure
:
"
VVKz+yOMbKsskR+PfU1HfKBWdGYYrmIXNWQz4nqXCjtg2MRCQmjDulFZaPVDvsBzis9BUhnzAQrBYUrAtN8bZSTYRg7ADFVGdPFicg3Sv0owcghTQwokIvbw3G+HDz/WAnFmqEhqm3t5pNVWNinyHpMM3zYZOVKagyj53cwAM0M="
-
secure
:
"
W2iPU6ooMujfzJNw9ElaEB8Go1rlNFJ5zEldr3FaH7SDRwqtqNOEp9CegCeG/hHtjg1j8TMyytQtvW+OaMKFIbq7Qqu7nIfwIFTV45vBHW6uwT/jAq/J3EgZ8K7JGyysVVHk86D8jT+xu90YVH5Tx/w97luxHOQGfSK8alhCszw="
before_install
:
before_install
:
-
sudo apt-get update -qq
-
sudo apt-get update -qq
-
sudo apt-get install -qq libpcre3 libpcre3-dev gromacs
-
sudo apt-get install -qq libpcre3 libpcre3-dev gromacs
...
@@ -24,3 +30,12 @@ script:
...
@@ -24,3 +30,12 @@ script:
-
# run the python tests too
-
# run the python tests too
-
cd python/tests
-
cd python/tests
-
nosetests -vv --processes=-1 --process-timeout=200
-
nosetests -vv --processes=-1 --process-timeout=200
after_success
:
# Get libraries necessary for building docs and pushing
# them to S3
-
sudo apt-get install python-sphinx python-yaml
-
sudo pip install sphinxcontrib-bibtex boto
-
make DoxygenApiDocs
-
make sphinxhtml
-
python devtools/ci/push-docs-to-s3.py
devtools/ci/push-docs-to-s3.py
0 → 100644
View file @
392a7b04
from
__future__
import
print_function
import
os
import
boto
import
simtk
from
boto.s3.key
import
Key
# The secret key is available as a secure environment variable
# on travis-ci to push the build documentation to Amazon S3.
AWS_ACCESS_KEY_ID
=
os
.
environ
[
'AWS_ACCESS_KEY_ID'
]
AWS_SECRET_ACCESS_KEY
=
os
.
environ
[
'AWS_SECRET_ACCESS_KEY'
]
BUCKET_NAME
=
'docs.openmm.org'
bucket_name
=
AWS_ACCESS_KEY_ID
.
lower
()
+
'-'
+
BUCKET_NAME
conn
=
boto
.
connect_s3
(
AWS_ACCESS_KEY_ID
,
AWS_SECRET_ACCESS_KEY
)
bucket
=
conn
.
get_bucket
(
BUCKET_NAME
)
def
upload
(
path
,
root
=
None
,
prefix
=
''
,
versioned
=
True
):
if
root
is
None
:
root
=
path
for
dirpath
,
dirnames
,
filenames
in
os
.
walk
(
path
):
for
filename
in
filenames
:
fn
=
os
.
path
.
join
(
dirpath
,
filename
)
k
=
Key
(
bucket
)
k
.
key
=
os
.
path
.
join
(
prefix
,
os
.
path
.
relpath
(
fn
,
root
))
if
versioned
:
k
.
key
=
os
.
path
.
join
(
simtk
.
version
.
short_version
,
k
.
key
)
print
(
'Uploading'
,
k
.
key
,
'...'
)
k
.
set_contents_from_filename
(
fn
)
upload
(
'api-c++/'
,
'build'
)
upload
(
'api-python/'
,
'build'
)
upload
(
'sphinx-docs/developerguide/html'
,
prefix
=
'developerguide'
)
upload
(
'sphinx-docs/userguide/html'
,
prefix
=
'userguide'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment