Skip to content

Commit

Permalink
add EOL check to travis CI (onnx#420)
Browse files Browse the repository at this point in the history
* add EOL check to travis CI

* install dos2unix package in travis

* fix the line ending
  • Loading branch information
dzhulgakov authored Jan 15, 2018
1 parent 9df6b68 commit cf2e52b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 14 deletions.
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ python:
- "2.7"
- "3.6"

addons:
apt:
packages:
- dos2unix

install:
- ./.travis/install.sh

Expand All @@ -24,4 +29,4 @@ env:
- USE_NINJA=false
- USE_NINJA=true
- ONNX_ML=1 USE_NINJA=false
- ONNX_ML=1 USE_NINJA=true
- ONNX_ML=1 USE_NINJA=true
7 changes: 6 additions & 1 deletion .travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@ cd $onnx_dir
pip install pytest-cov nbval
pytest

# check line endings to be UNIX
find . -type f -regextype posix-extended -regex '.*\.(py|cpp|md|h|cc|proto|proto3|in)' | xargs dos2unix
git status
git diff --exit-code

# check auto-gen files up-to-date
python onnx/defs/gen_doc.py
python onnx/gen_proto.py
backend-test-tools generate-data
git status
git diff --exit-code
git diff --exit-code
24 changes: 12 additions & 12 deletions onnx/onnx_pb.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Copyright (c) Facebook Inc. and Microsoft Corporation.
// Licensed under the MIT license.

#ifndef ONNX_ONNX_PB_H
#define ONNX_ONNX_PB_H

#ifdef ONNX_ML
#include "onnx/onnx-ml.pb.h"
#else
#include "onnx/onnx.pb.h"
#endif

// Copyright (c) Facebook Inc. and Microsoft Corporation.
// Licensed under the MIT license.

#ifndef ONNX_ONNX_PB_H
#define ONNX_ONNX_PB_H

#ifdef ONNX_ML
#include "onnx/onnx-ml.pb.h"
#else
#include "onnx/onnx.pb.h"
#endif

#endif // ! ONNX_ONNX_PB_H

0 comments on commit cf2e52b

Please sign in to comment.