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

Travis CI integration for macOS binaries #84

Open
robert-schmidtke opened this issue Jan 22, 2019 · 11 comments
Open

Travis CI integration for macOS binaries #84

robert-schmidtke opened this issue Jan 22, 2019 · 11 comments

Comments

@robert-schmidtke
Copy link

robert-schmidtke commented Jan 22, 2019

Hi everyone,

this is not an issue as such, but since I haven't found a mailing list, here it goes. I have forked MultiChain and added Travis CI scripts for the master, 1.0.x-dev, 1.0.x-release, 2.0-dev and 2.0-release branches that build macOS High Sierra binaries (macOS 10.13.6 as of today) and release them to GitHub, whenever I merge your upstream changes and push them. The builds are "versioned" with the latest upstream branch merge commit date (UTC). They do not include a proper README.txt, which you distribute with your pre-compiled packages, as I could not find them in your repository (I only include a README with a reference to the proper upstream tree). However they do contain the multichain-cli, multichain-util, multichaind and multichaind-cold binaries.

If you find this useful, I can open a PR, otherwise I just wanted to put it out here, in case someone does not want to go through the trouble of compiling. I have too many different versions of boost and openssl installed (via brew, self-built or provided binaries) on my machine to compile the thing properly (i.e. weird pointer corruption errors due to linking of different versions, failed assertions and whatnot). The binaries mentioned above run fine on my macOS Mojave 10.14.3 as well, and the very simple test case included in the .travis.yml scripts succeeds on High Sierra 10.13.6 on Travis.

As a disclaimer I'll have to say that I need MultiChain as part of a project we are working on, and as such I cannot say I'll be able to maintain this fork, at least on a regular basis (or at all).

Cheers and keep up the great work!
Robert

@robert-schmidtke
Copy link
Author

robert-schmidtke commented Jan 27, 2019

I realized someone might be worried about the authenticity of the builds, so here is what you can do. I'm going to use https://github.com/paciofs/multichain/releases/tag/2.0-dev-20190123T153408 as an example.

  1. Downlad the binary:
$ wget https://github.com/paciofs/multichain/releases/download/2.0-dev-20190123T153408/multichain-2.0-dev-42e424a-osx.tar.gz
  1. Compute the SHA256 hash:
$ shasum -a 256 multichain-2.0-dev-42e424a-osx.tar.gz | cut -f 1 -d ' '
93a5db98282672ba6a83c5bfdf0b93e9edc2aed49f9c54446670a10d6ee3751f
  1. Check out the Travis build log (link is provided in the release notes on GitHub, the line numbers may differ) and compare the SHA256 printed there (I also print the file size and SHA1 hash):
    https://travis-ci.org/paciofs/multichain/jobs/484983883#L2357

Hopefully this convinces you that I have not uploaded a forged version from my laptop. The build log, script and checkout is all public, so you can trace every step. Finally you can compare the branches across repositories: 2.0-dev...paciofs:2.0-dev and you should find only differences related to building MultiChain on Travis.

@tloriato
Copy link

tloriato commented Apr 19, 2019

@robert-schmidtke I was wondering if you ever managed to get Travis CI working on master/2.0-release? I tried copying your configurations file but the second stage always fail to me.

+cd ./v8
+export RELEASE=out.gn/x64.release
+RELEASE=out.gn/x64.release
+ninja -C out.gn/x64.release antlr4 icu inspector torque v8_libbase v8_libplatform v8_libsampler
ninja: Entering directory `out.gn/x64.release'
[6/672] CXX obj/v8_libbase/file-utils.o
FAILED: obj/v8_libbase/file-utils.o
....[CASCADE OF ERRORS]....
6 errors generated.
[8/672] CXX obj/v8_libbase/ieee754.o
ninja: build stopped: subcommand failed.
The command "./.travis/build-v8.sh antlr4 icu inspector torque v8_libbase v8_libplatform v8_libsampler" failed and exited with 1 during .

I saw in your Travis CI that yours is working, but they skipped building v8 because it was cached. I wonder if something has changed, even though you checkout a specific branch? Perhaps do you have any clues on that?

@robert-schmidtke
Copy link
Author

In addition to what I described in the initial post, I also added the 2.0-release branch (see https://github.com/paciofs/multichain/releases). I have not tried building the master branch. I checked out the version of V8 as suggested in https://github.com/MultiChain/multichain/blob/master/V8_mac.md and then built it accordingly. In the meantime, the developers have provided a prebuilt version of V8 for Mac: https://github.com/MultiChain/multichain-binaries/raw/master/macos-v8.tar.gz Maybe you could try that instead? I don't think something has changed in V8, the last time it was built in Travis is here: https://travis-ci.org/paciofs/multichain/builds/502041701 Maybe you can compare the logs/environment/configuration?

@tloriato
Copy link

tloriato commented Apr 23, 2019

I have not tried building the master branch

Apparently it should be no issue, as the difference between the 2.0-release and master right now are just the travis files.

Screen Shot 2019-04-23 at 11 31 02 AM

Mine fails in the second stage for some reason that I can't explain. I checked your logs line by line and they match exactly until... they don't.

Summary:

ninja: Entering directory `out.gn/x64.release'
[6/672] CXX obj/v8_libbase/file-utils.o
FAILED: obj/v8_libbase/file-utils.o 
6 errors generated.
[7/672] CXX obj/v8_libbase/logging.o
FAILED: obj/v8_libbase/logging.o 
6 errors generated.
[8/672] CXX obj/v8_libbase/ieee754.o
ninja: build stopped: subcommand failed.
The command "./.travis/build-v8.sh antlr4 icu inspector torque v8_libbase v8_libplatform v8_libsampler" failed and exited with 1 during .

Which is absolutely bonkers because the repository wast a match by match with yours, with the exception of pointing to my own multichain repository instead of here, but the error was before all that.

Absolutely strange to me this... I'm trying again, let's see.

@robert-schmidtke
Copy link
Author

You could try checking out a specific version of depot_tools, as suggested here: https://github.com/MultiChain/multichain/blob/master/V8_mac.md I do not have this step in my scripts. It appears that there is some difference between the checkouts, as your log says to build 672 targets, while mine only builds 667. V8 and the other sources should be the same. I'll kick off a build for master myself.

@tloriato
Copy link

Nice catch with suggestion! Running build right now

@robert-schmidtke
Copy link
Author

Ok so my build of master fails with the same error as yours. Let me know whether checking out depot_tools properly works.

@tloriato
Copy link

tloriato commented Apr 23, 2019

Failed [477/672] CXX obj/v8_libbase/file-utils.o

I'm trying again but without the --depth=1.

If it doesn't work then I'll probably be using the compiled V8 already.

@robert-schmidtke

@robert-schmidtke
Copy link
Author

You can delete the build caches in Travis.

@tloriato
Copy link

No luck from my side. Tried with the checkout, without depth and deleting cache.

@robert-schmidtke
Copy link
Author

robert-schmidtke commented Apr 24, 2019

So the thing that appears to do the trick was to ignore the extra semicolon warning as well (first stage is succeeding now): paciofs@a8025cb Cannot be bothered figuring out what was going wrong here.

Yup: https://travis-ci.org/paciofs/multichain/builds/523862865

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

No branches or pull requests

2 participants