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

Add build instructions for the http bridge in CI #65

Merged
merged 1 commit into from
Mar 15, 2019

Conversation

KtorZ
Copy link
Member

@KtorZ KtorZ commented Mar 14, 2019

Issue Number

#5

Overview

  • I have extended our CI configuration to build the cardano-http-bridge and make it available in scope for testing
  • I have made sure that the build artifacts are cached between jobs

Comments

The http-bridge is now built within the "Compiling" job, before the Haskell code -- if not already present (so, only on the first run).

Before tests run, we now do a cardano-http-bridge --help which resolves correctly and proves that the bridge is available in scope for testing.

image

@KtorZ KtorZ force-pushed the KtorZ/5/build-cardano-http-bridge branch from a130dbc to 6d3ae60 Compare March 14, 2019 14:08
@KtorZ KtorZ self-assigned this Mar 14, 2019
@KtorZ KtorZ changed the title Add build instructions for creating the http bridge Add build instructions for the http bridge in CI Mar 14, 2019
@KtorZ KtorZ force-pushed the KtorZ/5/build-cardano-http-bridge branch from 6d3ae60 to 25f8033 Compare March 14, 2019 15:22
@KtorZ KtorZ requested review from rvl and paweljakubas March 14, 2019 15:28
@KtorZ KtorZ force-pushed the KtorZ/5/build-cardano-http-bridge branch 3 times, most recently from 67e2931 to 5b4a2be Compare March 14, 2019 16:28
.travis.yml Outdated
@@ -13,9 +13,10 @@ env:
- EXECUTABLE=$HOME/.local/bin/cardano-wallet-server
- EXECUTABLE_CHECKSUM=$HOME/.local/bin/cardano-wallet-server.sha256
- STACK_WORK_CACHE=$HOME/.local/stack-work.tar.gz
- PATH=$PATH:$HOME/.cargo/bin

# Do not choose a language; we provide our own build tools:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Do not choose a language; we provide our own build tools:
# Use the Travis Rust build tools for cardano-http-bridge.
# Provide our own Haskell build tools for cardano-wallet.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch 👍

@paweljakubas
Copy link
Contributor

so why Tests on CI has failed?

@KtorZ
Copy link
Member Author

KtorZ commented Mar 15, 2019

This is what I am trying to figure out. I made another round of testing yesterday, completely clearing the cache, and it seems that I broke something 🤔 ... Will figure it out..

@KtorZ KtorZ force-pushed the KtorZ/5/build-cardano-http-bridge branch from 5b4a2be to 6834766 Compare March 15, 2019 09:01
@paweljakubas
Copy link
Contributor

paweljakubas commented Mar 15, 2019

that's strange :

== Section test:unit ==
Missing other-modules entry
* Cardano.Wallet.BlockSyncerSpec
Redundant build-depends entry
* time-units

There is no Cardano.Wallet.BlockSyncerSpec in the unit section because there is not this module anymore. Moreover, time-units is needed in test/unit/Cardano/NetworkLayerSpec.hs as there is import there in line 29:

import Data.Time.Units

There is some caching problem out there as @KtorZ underlined

@KtorZ KtorZ force-pushed the KtorZ/5/build-cardano-http-bridge branch 2 times, most recently from e3addfc to 7c74c51 Compare March 15, 2019 14:35
@KtorZ
Copy link
Member Author

KtorZ commented Mar 15, 2019

Ok, I figured. We can't actually have two parallels jobs which share the same cache. I hoped Travis would be "smart enough" to merge the cache when there are uploads to the cache from different sources, but it doesn't. So, the job building the http bridge was finishing first, uploading his cache and then, got overwritten by the job that compiles the haskell sources.

In the next stage, only the latter cache was available, which doesn't contain the cardano-http-bridge. So I've moved the instruction to build the http-bridge inside the "compiling" job. In the end, it takes a couple of milliseconds if the bridge has already been built and is already in cache, otherwise, it will built it within 10 minutes and cache it afterwards.

Since there's now only job uploading to the cache, no more race-condition and cache overwriting.

@KtorZ KtorZ force-pushed the KtorZ/5/build-cardano-http-bridge branch from 7c74c51 to 6ddd53b Compare March 15, 2019 17:17
@KtorZ KtorZ merged commit 67320f4 into master Mar 15, 2019
@KtorZ KtorZ deleted the KtorZ/5/build-cardano-http-bridge branch March 15, 2019 17:33
jamescheuk91 pushed a commit to jamescheuk91/cardano-sl that referenced this pull request Mar 28, 2019
3935: Actually remove the 'cardano-wallet' dep from 'cardano-sl-cluster' -_-' r=deepfire a=KtorZ

## Description

Oopsie 🙃 

## Linked issue

cardano-foundation/cardano-wallet#65



Co-authored-by: KtorZ <matthias.benkort@gmail.com>
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.

None yet

3 participants