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

[chore] rebuild protos with setted env #1449

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MCJOHN974
Copy link
Contributor

@MCJOHN974 MCJOHN974 commented Feb 28, 2025

Description

Closes: No issue.

Changes

Now our build will rebuild protobufs with REBUILD_PROTOS env setted.

Testing Information

I just tried it few times on my machine

Checklist:

  • I have performed a self-review of my code
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@MCJOHN974 MCJOHN974 marked this pull request as ready for review February 28, 2025 12:49
@cylewitruk
Copy link
Member

Not sure with others think, but one suggestion could be to add a bin to Cargo.toml for the build script specifically. I haven't tried this, but I've seen it somewhere:

[[bin]]
name = "signer-build-script"
path = "build.rs"

And update the Makefile with a new rule:

# ##############################################################################
# MAIN TARGETS
# ##############################################################################
...
contracts:
	pnpm --prefix contracts run build

+protos:
+       REBUILD_PROTOS=true cargo $(CARGO_FLAGS) run --bin signer-build-script
+.PHONY: install build test test-build lint format contracts clean protos
-.PHONY: install build test test-build lint format contracts clean
...

@MCJOHN974
Copy link
Contributor Author

Yeas, this sounds better, thanks @cylewitruk

@MCJOHN974 MCJOHN974 self-assigned this Feb 28, 2025
@cylewitruk
Copy link
Member

@MCJOHN974 looks like you'll need to make sure protoc is installed for the relevant workflow jobs (eg Build Test Artifacts and anything else that wants to build signer):

thread 'main' panicked at signer/build.rs:66:10:
  Unable to compile protocol buffers: Custom { kind: NotFound, error: "Could not find `protoc`.

@djordon
Copy link
Contributor

djordon commented Mar 20, 2025

Oh right, we removed it from CI because the action was quite annoying and would fail randomly sometimes with some rate limit error. The action was this one: https://github.com/marketplace/actions/setup-protoc. If we're going to do this, let's not use that one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

3 participants