Skip to content
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
149 changes: 108 additions & 41 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,46 +61,113 @@ addons:
- doxygen-gui
- graphviz

# Change directory back to default build directory.
before_script:
- cd "${TRAVIS_BUILD_DIR}"

# Run the build script and generate documentation.
script:
- mkdir -p build
- cd build
- cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install -D CMAKE_INSTALL_PREFIX:PATH=${TESTINST_DIR} ..
- cmake --build .
- cd ..
- python setup.py build
- python setup.py sdist
- cd build
- cmake --build . --target install
- cd ..
- cp VERSION VERSION.SAVED
- echo "" >> VERSION
- echo "VERSION_PATCH = \"GitHub_MasterBranch\"" >> VERSION
- cd build
- cmake -D FILTER_PROTO2CPP_PY_PATH=${DEPS_DIR}/proto2cpp ..
- echo "EXCLUDE_PATTERNS = */osi3/*" >> Doxyfile
- echo "GENERATE_TREEVIEW = YES" >> Doxyfile
- doxygen
- cd ..
- python -m unittest discover tests
- mv VERSION.SAVED VERSION
- sh convert-to-proto3.sh
- mkdir -p build3
- cd build3
- cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install ..
- cmake --build .
- cd ..
jobs:
include:
# Run the build script and generate documentation.
- stage: test OSI protobuf

# Deploy the documentation on github (only for master branch).
deploy:
provider: pages
skip_cleanup: true
local_dir: doc/html
keep-history: true
github_token: ${GH_REPO_TOKEN}
on:
branch: master
name: 'Test protobuf 2.6.1 syntax'
script:
- cd "${TRAVIS_BUILD_DIR}"
- mkdir -p build
- cd build
- cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install -D CMAKE_INSTALL_PREFIX:PATH=${TESTINST_DIR} ..
- cmake --build .
- cd ..
- python setup.py build
- python setup.py sdist
- cd build
- cmake --build . --target install
- cd ..
- cp VERSION VERSION.SAVED
- echo "" >> VERSION
- echo "VERSION_PATCH = \"GitHub_MasterBranch\"" >> VERSION
- cd build
- cmake -D FILTER_PROTO2CPP_PY_PATH=${DEPS_DIR}/proto2cpp ..
- echo "EXCLUDE_PATTERNS = */osi3/*" >> Doxyfile
- echo "GENERATE_TREEVIEW = YES" >> Doxyfile
- doxygen
- cd ..
- python -m unittest discover tests
- mv VERSION.SAVED VERSION
- sh convert-to-proto3.sh
- mkdir -p build3
- cd build3
- cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install ..
- cmake --build .
- cd ..

- script:
- cd "${TRAVIS_BUILD_DIR}"
- bash convert-to-proto3.sh
- rm *.pb2
- mkdir -p build
- cd build
- cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install -D CMAKE_INSTALL_PREFIX:PATH=${TESTINST_DIR} ..
- cmake --build .
- cd ..
- python setup.py build
- python setup.py sdist
- cd build
- cmake --build . --target install
- cd ..
- cp VERSION VERSION.SAVED
- echo "" >> VERSION
- echo "VERSION_PATCH = \"GitHub_MasterBranch\"" >> VERSION
- cd build
- cmake -D FILTER_PROTO2CPP_PY_PATH=${DEPS_DIR}/proto2cpp ..
- echo "EXCLUDE_PATTERNS = */osi3/*" >> Doxyfile
- echo "GENERATE_TREEVIEW = YES" >> Doxyfile
- doxygen
- cd ..
- python -m unittest discover tests
- mv VERSION.SAVED VERSION
- sh convert-to-proto3.sh
- mkdir -p build3
- cd build3
- cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install ..
- cmake --build .
- cd ..
name: 'Test protobuf 3.0.0 syntax'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be positioned above "test: "?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let me check on my fork if it works

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to merge in the next 30min if possible :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason it needs to be under scripts


- stage: deploy
script:
- cd "${TRAVIS_BUILD_DIR}"
- mkdir -p build
- cd build
- cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install -D CMAKE_INSTALL_PREFIX:PATH=${TESTINST_DIR} ..
- cmake --build .
- cd ..
- python setup.py build
- python setup.py sdist
- cd build
- cmake --build . --target install
- cd ..
- cp VERSION VERSION.SAVED
- echo "" >> VERSION
- echo "VERSION_PATCH = \"GitHub_MasterBranch\"" >> VERSION
- cd build
- cmake -D FILTER_PROTO2CPP_PY_PATH=${DEPS_DIR}/proto2cpp ..
- echo "EXCLUDE_PATTERNS = */osi3/*" >> Doxyfile
- echo "GENERATE_TREEVIEW = YES" >> Doxyfile
- doxygen
- cd ..
- python -m unittest discover tests
- mv VERSION.SAVED VERSION
- sh convert-to-proto3.sh
- mkdir -p build3
- cd build3
- cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install ..
- cmake --build .
- cd ..

# Deploy the documentation on github (only for master branch).
deploy:
provider: pages
skip_cleanup: true
local_dir: doc/html
keep-history: true
github_token: ${GH_REPO_TOKEN}
on:
branch: master
5 changes: 5 additions & 0 deletions tests/test_invalid_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,11 @@ def test_field_multiplicity(self):
saveStatement = ""

for line in fin:

# Skipping test on multiplicity for protobuf 3.0.0
if '"proto3"' in line:
break

i += 1

# Divide statement and comment. Concatenate multi line statements.
Expand Down