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

Production-like build on dev PC #894

Merged
merged 4 commits into from
Aug 18, 2022
Merged

Production-like build on dev PC #894

merged 4 commits into from
Aug 18, 2022

Conversation

viktorb-ledger
Copy link
Contributor

@viktorb-ledger viktorb-ledger commented Aug 8, 2022

  • builds Docker container from LedgerHQ/lib-ledger-core-build-env
  • uses CircleCI scripts to build ledger-lib-core.jar

Attn: default paths to jre libraries are different in prod and on typical dev machine. LD_LIBRARY_PATH must be modified accordingly to run WD:

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server sbt "run -http.port=:9200 -admin.port=:0"

This PR depends on https://github.com/LedgerHQ/lib-ledger-core-build-env/pull/9

@viktorb-ledger viktorb-ledger marked this pull request as ready for review August 8, 2022 07:22
Copy link
Contributor

@twilgenbus-ledger twilgenbus-ledger left a comment

Choose a reason for hiding this comment

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

A little change proposition, looking awesome otherwise!!

docker run \
--mount type=bind,source="$(pwd)"/artifacts,target=/hostdir \
lib-ledger-core-build-env:latest \
/scripts/prod-like-build-inner.sh Debug
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we want to duplicate this file to have dev-like-build or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved this to command arguments. By default it builds Release. Debug if explicitly specified.

Copy link
Contributor

@jcoatelen-ledger jcoatelen-ledger left a comment

Choose a reason for hiding this comment

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

Can you add a description on this script n the README please ? :)

@viktorb-ledger
Copy link
Contributor Author

Can you add a description on this script n the README please ? :)

Done

Copy link
Contributor

@jcoatelen-ledger jcoatelen-ledger left a comment

Choose a reason for hiding this comment

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

noice !

@viktorb-ledger viktorb-ledger merged commit 0d8e487 into main Aug 18, 2022
@viktorb-ledger viktorb-ledger deleted the prod-like-build branch August 18, 2022 09:50
This pull request was closed.
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.

3 participants