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
173f7b10
Commit
173f7b10
authored
Sep 22, 2014
by
Robert McGibbon
Browse files
Push docs to S3
parent
fb95c56c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
0 deletions
+46
-0
.travis.yml
.travis.yml
+12
-0
devtools/ci/push-docs-to-s3.py
devtools/ci/push-docs-to-s3.py
+34
-0
No files found.
.travis.yml
View file @
173f7b10
...
@@ -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,9 @@ script:
...
@@ -24,3 +30,9 @@ 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
:
-
make DoxygenApiDocs
-
make sphinxhtml
-
sudo pip install boto
-
python devtools/ci/push-docs-to-s3.py
devtools/ci/push-docs-to-s3.py
0 → 100644
View file @
173f7b10
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