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

Allow builds without Docker inside of Docker for cbrotli-wasm #2748

Merged
merged 8 commits into from
Oct 23, 2024

Conversation

nhovsmith-cb
Copy link
Contributor

@nhovsmith-cb nhovsmith-cb commented Oct 22, 2024

Give the option to build natively as opposed to docker when calling .make/cbrotli-wasm:

Copy link

cla-bot bot commented Oct 22, 2024

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please sign the linked documents below to get yourself added. https://na3.docusign.net/Member/PowerFormSigning.aspx?PowerFormId=b15c81cc-b5ea-42a6-9107-3992526f2898&env=na3&acct=6e152afc-6284-44af-a4c1-d8ef291db402&v=2

@nhovsmith-cb nhovsmith-cb changed the title Remove Unnecessary use of Docker inside of Docker Remove Unnecessary use of Docker inside of Docker to Build cbrotli-wasm Oct 22, 2024
@hkalodner
Copy link
Contributor

@cla-bot check

@cla-bot cla-bot bot added the s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA. label Oct 22, 2024
Copy link

cla-bot bot commented Oct 22, 2024

The cla-bot has been summoned, and re-checked this pull request!

@PlasmaPower
Copy link
Collaborator

Thank you for the PR. However, this is built in Docker because it otherwise complicates the needed build environment to build nitro. In particular, I think it's tricky to setup the native WASM cbrotli build for MacOS if I recall correctly. Therefore, we can't accept this PR in its current form, but perhaps you could make it an optional variable defaulting to building with Docker

Makefile Outdated
test -f target/lib-wasm/libbrotlienc-static.a || ./scripts/build-brotli.sh -w
test -f target/lib-wasm/libbrotlidec-static.a || ./scripts/build-brotli.sh -w
else
test -f target/lib-wasm/libbrotlicommon-static.a || ./scripts/build-brotli.sh -w -d
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd try setting a variable to -d or empty and use that here in order to avoid duplicating all of these

Makefile Outdated
test -f target/lib-wasm/libbrotlienc-static.a || ./scripts/build-brotli.sh -w -d
test -f target/lib-wasm/libbrotlidec-static.a || ./scripts/build-brotli.sh -w -d
endif
test -f target/lib-wasm/libbrotlicommon-static.a || ./scripts/build-brotli.sh $(ARGS)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Almost LGTM but ARGS is way too generic for this, could we call it CBROTLI_WASM_BUILD_ARGS ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, the default for outside of docker needs to be using docker to build this. The default inside docker can be not using docker-in-docker, that's fine.

@nhovsmith-cb nhovsmith-cb changed the title Remove Unnecessary use of Docker inside of Docker to Build cbrotli-wasm Allow builds without Docker inside of Docker for cbrotli-wasm Oct 22, 2024
PlasmaPower
PlasmaPower previously approved these changes Oct 22, 2024
Copy link
Collaborator

@PlasmaPower PlasmaPower left a comment

Choose a reason for hiding this comment

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

LGTM

@nhovsmith-cb
Copy link
Contributor Author

@PlasmaPower I see that a handful or required actions are failing.

GO Tests seem to be failing on arbitrator/langs/bf/target/debug/stylus-sdk-bf and the Arbitrator CI tests are failing because of no patch-package

I am not familiar with either of these aspects of the arbitrum. Have you seen this before? Is there a simple/obvious thing I am in order to get the checks to pass and merge the PR?

@PlasmaPower
Copy link
Collaborator

@PlasmaPower
Copy link
Collaborator

I'm not sure your syntax is correct. Perhaps the Makefile variable needs to be declared outside the rules for building a specific target. That'd be my guess.

auto-merge was automatically disabled October 23, 2024 14:40

Head branch was pushed to by a user without write access

Makefile Outdated
test -f target/lib-wasm/libbrotlidec-static.a || ./scripts/build-brotli.sh -w -d
test -f target/lib-wasm/libbrotlicommon-static.a || ./scripts/build-brotli.sh $(CBROTLI_WASM_BUILD_ARGS)
test -f target/lib-wasm/libbrotlienc-static.a || ./scripts/build-brotli.sh $(CBROTLI_WASM_BUILD_ARGS)
test -f target/lib-wasm/libbrotlidec-static.a || ./scripts/build-brotli.sh $(CBROTLI_WASM_BUILD_ARGS)
Copy link
Collaborator

Choose a reason for hiding this comment

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

One other thing, these should always be built as wasm, so could we have -w outside the CBROTLI_WASM_BUILD_ARGS? I.e. run ./scripts/build-brotli.sh -w $(CBROTLI_WASM_BUILD_ARGS) and have CBROTLI_WASM_BUILD_ARGS default to just -d

Copy link
Collaborator

@PlasmaPower PlasmaPower left a comment

Choose a reason for hiding this comment

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

LGTM

@PlasmaPower PlasmaPower merged commit 3075736 into OffchainLabs:master Oct 23, 2024
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design-approved s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants