Skip to content

Conversation

@joshieDo
Copy link
Contributor

No description provided.

@joshieDo joshieDo added the C-enhancement New feature or request label Nov 26, 2024
- name: Build Odyssey
run: docker buildx build . --load -t ghcr.io/ithacaxyz/odyssey:latest
run: |
cargo build --profile release --locked --bin odyssey &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Can u explain why we need to build here as well?

Copy link
Contributor Author

@joshieDo joshieDo Nov 26, 2024

Choose a reason for hiding this comment

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

docker build is not using the rust-cache, and so, we end up downloading/compiling all dependencies in every run. By building it outside we can leverage rust-cache, and then just use a minimal Dockerfile to copy the built binary

we do something similar to this on reth:

https://github.com/paradigmxyz/reth/blob/83af493179393c81dc2c48374306f2b88cc075db/.github/workflows/kurtosis.yml#L32-L42

@@ -0,0 +1,13 @@
FROM ubuntu
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need this file as well?

@onbjerg onbjerg enabled auto-merge (squash) November 26, 2024 20:05
@onbjerg onbjerg merged commit eed4aa4 into main Nov 26, 2024
14 checks passed
@onbjerg onbjerg deleted the joshie/cache branch November 26, 2024 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants