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

Wallet Backend builds and tests on OSX #704

Closed
6 of 7 tasks
KtorZ opened this issue Sep 13, 2019 · 3 comments
Closed
6 of 7 tasks

Wallet Backend builds and tests on OSX #704

KtorZ opened this issue Sep 13, 2019 · 3 comments
Assignees

Comments

@KtorZ
Copy link
Member

KtorZ commented Sep 13, 2019

Context

cardano-wallet ultimately results in two binaries as detailed in the root .cabal:

  • cardano-wallet-http-bridge
  • cardano-wallet-jormungandr

Both are command-lines and web server doing "wallet backend stuff", but working with different chain producers.

Decision

At the moment, our CI only produces binary artifacts for linux machines yet, most are using Windows and OSX machines so we ought to be able to produce executables for these targets too. Ideally, our test suites should also run on both platform to ensure that code produced works as expected on these platforms.

The focus is given on cardano-wallet-jormungandr for cardano-wallet-http-bridge will be removed soon enough and will not see the lights of production.

Acceptance Criteria

  • cardano-wallet-jormungandr must compile to OSX
  • cardano-wallet-core:test:unit must pass on OSX
  • cardano-wallet-cli:test:unit must pass on OSX
  • bech32:test:unit must pass on OSX
  • cardano-wallet-jormungandr:test:unit must pass on OSX
  • cardano-wallet-jormungandr:test:integration must pass on OSX
  • cardano-wallet-core:benchmark:db should pass on OSX

Development Plan

PR

Number Base
#766 master
#964 master

QA

  1. MacOS builds for the master branch are shown in the cardano-wallet jobset.
  2. Ensure that all x86_64-darwin jobs are green. In particular, tests for the packages listed in the AC.
  3. Check that the required job is green.
  4. Check the Constituents of the required job. These should include tests for packages listed in the AC.
  5. Download the tarball release from Hydra and check that the binaries run on macOS.
@KtorZ KtorZ added this to the Usability & Compatibility milestone Oct 16, 2019
@rvl rvl assigned rvl and unassigned iohk-devops Oct 23, 2019
@rvl rvl mentioned this issue Oct 23, 2019
10 tasks
iohk-bors bot added a commit that referenced this issue Oct 24, 2019
766: Run tests in nix release build r=rvl a=rvl

Relates to #703 and #704.
Base branch is #864 - this should be merged first.

# Overview

- [x] This enables test suites under the Nix build.
- [x] Fixes test cases that used symlinks.
- [x] `Cardano.Wallet.Api.TypesSpec` is trying to access a file `/build/core/../../specifications/api/swagger.yaml` which is outside of its package. 
- [x] Some tests in `cardano-wallet-jormungandr:test:integration` required `jcli`.
- [x] Some tests in `cardano-wallet-jormungandr:test:integration` required a writable home directory.
- [x] In LauncherSpec the test scripts used `/usr/bin/env`, which is not in the nix-build sandbox, so i made the tests not need external scripts.
- [x] Adds macOS tests to the Hydra required jobs.

[Hydra jobset](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-766)

# Comments

- Symlinks/references to files in other packages won't work with the nix build because when it builds it copies the package source tree to `/build` and builds from there.

# Remaining failures

These windows-specific failures can be fixed in the next PR.

- [ ] `x86_64-pc-mingw32.tests.cardano-wallet-jormungandr.unit.x86_64-linux` expects UTF-8 encoding, but this is not the encoding that Wine is using.
- [ ] Windows cross build got broken. We now require a fix for Haskell.nix.
- [ ] `cardano-wallet-jormungandr.exe` would fail on windows at startup with
  ```
  NUL: openFile: does not exist (No such file or directory)
  ```


Co-authored-by: Rodney Lorrimar <[email protected]>
iohk-bors bot added a commit that referenced this issue Nov 11, 2019
964: Add macOS tarball download to Hydra r=KtorZ a=rvl

Relates to #704.

# Overview

- Adds a downloadable macOS tarball to the Hydra jobset.
- Fixes closure size/caching issues which were hacked around in #888. (Halves the closure size of the nix-shell, ensures that Buildkite steps are also built in Hydra)
- Adds placeholder for a musl libc fully static build. Tools team can help complete it.

# Comments

- I have tested the binaries on a MacBook Pro with `cardano-wallet-jormungandr launch --genesis-block ...` 

[Hydra jobset](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-964#tabs-jobs)
[macOS tarball](https://hydra.iohk.io/job/Cardano/cardano-wallet-pr-964/cardano-wallet-jormungandr-macos64/latest)


Co-authored-by: Rodney Lorrimar <[email protected]>
iohk-bors bot added a commit that referenced this issue Nov 11, 2019
964: Add macOS tarball download to Hydra r=rvl a=rvl

Relates to #704.

# Overview

- Adds a downloadable macOS tarball to the Hydra jobset.
- Fixes closure size/caching issues which were hacked around in #888. (Halves the closure size of the nix-shell, ensures that Buildkite steps are also built in Hydra)
- Adds placeholder for a musl libc fully static build. Tools team can help complete it.

# Comments

- I have tested the binaries on a MacBook Pro with `cardano-wallet-jormungandr launch --genesis-block ...` 

[Hydra jobset](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-964#tabs-jobs)
[macOS tarball](https://hydra.iohk.io/job/Cardano/cardano-wallet-pr-964/cardano-wallet-jormungandr-macos64/latest)


Co-authored-by: Rodney Lorrimar <[email protected]>
@piotr-iohk
Copy link
Contributor

@rvl Question about: cardano-wallet-core:benchmark:db should pass on OSX

Do we run benchmark on OSX?

@rvl
Copy link
Contributor

rvl commented Nov 13, 2019

@piotr-iohk The benchmark builds ok, but it is not run in the nightly CI job as it is done for Linux.

I consider this type of benchmark not worth running on two similar platforms because the results will be more or less the same.

However, we really really should bring back the nightly wallet restore acceptance test and benchmark. Because this type of benchmark should be run on multiple platforms.

@piotr-iohk
Copy link
Contributor

👍

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

4 participants