Skip to content
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

MYS-28 Added win/osx/linux cross-compilation via xgo #255

Merged
merged 9 commits into from Jun 8, 2018

Conversation

Projects
None yet
5 participants
@Waldz
Copy link
Member

commented May 28, 2018

No description provided.

@Waldz Waldz requested review from ignasbernotas, tadovas and zolia May 28, 2018

@Waldz Waldz requested a review from donce as a code owner May 28, 2018

@Waldz Waldz force-pushed the feature/MYS-28-cross-platform branch 4 times, most recently from 91a91c7 to 080c779 May 28, 2018

@@ -61,7 +62,7 @@ printf "Building Debian package '$PACKAGE_FILE' for architecture '$ARCH' ..\n" \
--after-install bin/client_package/installation/post-install.sh \
--after-remove bin/client_package/installation/post-uninstall.sh \
-s dir -t deb \
build/client/mysterium_client=${OS_DIR_BIN}/ \
${BINARY}=${OS_DIR_BIN}/ \

This comment has been minimized.

Copy link
@zolia

zolia May 29, 2018

Member

// --license="MIT"
shouldn't it be GPLv3 ?

This comment has been minimized.

Copy link
@zolia

zolia May 29, 2018

Member

// --maintainer="Valdas Petrulis (petrulis.valdas@gmail.com)"
Mysterium domain would be better.

This comment has been minimized.

Copy link
@Waldz

Waldz Jun 5, 2018

Author Member

Changed licence

This comment has been minimized.

Copy link
@Waldz

Waldz Jun 5, 2018

Author Member

Removed maintainer


# Usage - build local image:
# Usage example:
#> bin/builder_package [tag..]

This comment has been minimized.

Copy link
@donce

donce May 29, 2018

Contributor

Does tag.. mean that there can be multiple tags?

This comment has been minimized.

Copy link
@Waldz

Waldz Jun 5, 2018

Author Member

Absollutelly correct

docker run --rm -v $(pwd):/go/src/github.com/mysterium/node mysteriumnetwork/mysterium-node-builder -c "${COMMAND}"

if [ $? -ne 0 ] ; then
printf "\e[0;31m%s\e[0m\n" "Running builder failed!"

This comment has been minimized.

Copy link
@donce

donce May 29, 2018

Contributor

Why have you removed all printf, are they moved somewhere?

This comment has been minimized.

Copy link
@Waldz

Waldz Jun 5, 2018

Author Member

Remove trace level logging

@@ -0,0 +1,39 @@
#!/bin/bash

# Usage example:

This comment has been minimized.

Copy link
@donce

donce May 29, 2018

Contributor

This is not an example - it is an interface.

# Usage:
#> bin/client_build_xgo <os>/<arch>
#
# Examples:
# Cross compile (Unix):
# bin/client_build_xgo linux/amd64
...

This comment has been minimized.

Copy link
@Waldz

Waldz Jun 5, 2018

Author Member

Improved

DIR_BUILD="build/package"
DIR_TEMP=`mktemp -d ${DIR_BUILD}/${tempname}.XXXXXX`

xgo --go=1.9.2 \

This comment has been minimized.

Copy link
@donce

donce May 29, 2018

Contributor

I am using 1.10 for some time already, did not encounter any problems.

This comment has been minimized.

Copy link
@zolia

zolia May 30, 2018

Member

what is 'xgo', where should I get it? Should this be documented in INSTALL.md or in a script that uses it?

This comment has been minimized.

Copy link
@Waldz

Waldz Jun 5, 2018

Author Member

I am using 1.10 for some time already, did not encounter any problems.

Not PR scope. Register ideas for to backlog (created MYST-562)

This comment has been minimized.

Copy link
@Waldz

Waldz Jun 5, 2018

Author Member

what is 'xgo', where should I get it? Should this be documented in INSTALL.md or in a script that uses it?

Added xgo as project development dependency


# Remove version from filenames
for BINARY in `ls ${DIR_TEMP}`; do
BINARY_RENAMED=`echo ${BINARY} | sed -nE 's/.*-([a-z]*)(-[0-9.]*)?-([a-z]*)/mysterium_client_\1_\3/p'`

This comment has been minimized.

Copy link
@donce

donce May 29, 2018

Contributor

Could you give an example of parsed string here? This regex is hardcore :D

This comment has been minimized.

Copy link
@Waldz

Waldz Jun 5, 2018

Author Member

Added

@@ -20,6 +20,7 @@
OS_DIR_BIN="/usr/bin"
OS_DIR_CONFIG="/etc/mysterium-node"
OS_DIR_INSTALLATION="/usr/lib/mysterium-node/installation"
BINARY=${BINARY:="build/client/mysterium_server"}

This comment has been minimized.

Copy link
@zolia

zolia May 30, 2018

Member

should be "build/server/mysterium_server"

This comment has been minimized.

Copy link
@Waldz

Waldz Jun 5, 2018

Author Member

Fixed mistype

@tadovas

This comment has been minimized.

Copy link
Member

commented Jun 5, 2018

@Waldz are we ready to proceed with this? Or you are still planning to make changes?

@Waldz Waldz force-pushed the feature/MYS-28-cross-platform branch from 080c779 to f7f6da3 Jun 5, 2018

@Waldz

This comment has been minimized.

Copy link
Member Author

commented Jun 5, 2018

All fixes are made

@tadovas
Copy link
Member

left a comment

If it works LGTM. :)

@Waldz Waldz dismissed stale reviews from zolia, ignasbernotas, and tadovas via 10376fd Jun 8, 2018

@Waldz Waldz force-pushed the feature/MYS-28-cross-platform branch 2 times, most recently from 10376fd to 1cba0e0 Jun 8, 2018

Waldz added some commits May 24, 2018

@Waldz Waldz force-pushed the feature/MYS-28-cross-platform branch from 1cba0e0 to f16cfb8 Jun 8, 2018

@tadovas

tadovas approved these changes Jun 8, 2018

Copy link
Member

left a comment

LGTM. Yay

@zolia

zolia approved these changes Jun 8, 2018

@Waldz Waldz merged commit 35dcecd into master Jun 8, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@Waldz Waldz deleted the feature/MYS-28-cross-platform branch Jun 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.