-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Add golang precommit #2748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add golang precommit #2748
Conversation
… add_golang_precommit
| @@ -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) | |||
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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} |
There was a problem hiding this comment.
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.
|
Thanks for the golang CI! |
|
Need to fix teamcity issue so we can test and merge. |
…/Paddle into add_golang_precommit
| script: | ||
| - | | ||
| export WITH_GOLANG=ON && timeout 2580 paddle/scripts/travis/${JOB}.sh # 43min timeout | ||
| timeout 2580 paddle/scripts/travis/${JOB}.sh # 43min timeout |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
赞!👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
… add_golang_precommit
Add golang pre-commit and fix travis build configs
Found a related PR: #2745