Skip to content

Conversation

@typhoonzero
Copy link
Contributor

@typhoonzero typhoonzero commented Jul 5, 2017

Add golang pre-commit and fix travis build configs

Found a related PR: #2745

@@ -1,6 +1,6 @@
cc_library(paddle_go_optimizer DEPS paddle_optimizer paddle_proto glog gflags protobuf)
target_link_libraries(paddle_go_optimizer stdc++ m)
Copy link
Contributor

Choose a reason for hiding this comment

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

if we add them here, can our cgo part remove the -lstdc++ -lm ldflags?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, we can't. Seems linking does not put symbols and implements inside the lib.

COMMAND rm "${${TARGET_NAME}_LIB_PATH}"
# Golang build source code
COMMAND env LIBRARY_PATH=${CMAKE_BINARY_DIR}/go/pserver/client/c/:$ENV{LIBRARY_PATH} GOPATH=${GOPATH} ${CMAKE_Go_COMPILER} build ${BUILD_MODE}
COMMAND GOPATH=${GOPATH} ${CMAKE_Go_COMPILER} build ${BUILD_MODE}
Copy link
Contributor

Choose a reason for hiding this comment

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

: ) this may be the correct way to go. Put fixed path into generic.cmake seems dangerous, and we may forget these mess as days go by.

@dzhwinter
Copy link
Contributor

dzhwinter commented Jul 5, 2017

Thanks for the golang CI!

@typhoonzero
Copy link
Contributor Author

Need to fix teamcity issue so we can test and merge.

script:
- |
export WITH_GOLANG=ON && timeout 2580 paddle/scripts/travis/${JOB}.sh # 43min timeout
timeout 2580 paddle/scripts/travis/${JOB}.sh # 43min timeout
Copy link
Member

Choose a reason for hiding this comment

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

so we still stop the go lang compile on Travis-ci?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Must pass -DWITH_GLANG=ON to cmake, export won't turn on the swith.

Copy link
Member

Choose a reason for hiding this comment

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

got it, thanx~ so this means yesterday golang was not compiled on Travis-ci...

Copy link
Contributor

@gongweibao gongweibao left a comment

Choose a reason for hiding this comment

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

赞!👍

Copy link
Contributor

@gongweibao gongweibao left a comment

Choose a reason for hiding this comment

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

LGTM!

@typhoonzero typhoonzero merged commit 77604bc into PaddlePaddle:develop Jul 6, 2017
@typhoonzero typhoonzero deleted the add_golang_precommit branch August 11, 2017 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants