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

ci: add nix env and gha workflows #12

Merged
merged 1 commit into from
Sep 6, 2024
Merged

ci: add nix env and gha workflows #12

merged 1 commit into from
Sep 6, 2024

Conversation

conorsch
Copy link
Contributor

@conorsch conorsch commented Sep 5, 2024

First pass at a dev env, which pulls in the usual Rust deps, as well as go, which is required to build penumbra-indexer. The devshell pulls in the necessary deps, resulting in cargo build running the proxy build for go via build.rs just fine.

Not yet supported is nix build: will need to figure out a two-pass approach, because network access during the buildPhase is not permitted, so the go build via rust fails.

Closes #4.

@conorsch conorsch force-pushed the 4-ci-skeleton branch 3 times, most recently from 2df453d to b71542f Compare September 6, 2024 14:45
First pass at a dev env, which pulls in the usual Rust deps, as well as
go, which is required to build `penumbra-indexer`. The devshell pulls in
the necessary deps, resulting in `cargo build` running the
proxy build for go via `build.rs` just fine.

Not yet supported is `nix build`: will need to figure out a two-pass
approach, because network access during the buildPhase is not permitted,
so the go build via rust fails.

CI cache timing info:

  * First run of cargo-check: 3m13s
  * First run of cargo-fmt: 1m57s
@@ -301,7 +301,7 @@ mod test {

const CHAIN_ID: &'static str = "penumbra-test";

#[tokio::test]
#[tokio::test(flavor = "multi_thread")]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The multi_thread annotations were necessary for me to get cargo test passing locally. If you were using a different invocation to force a multithreaded runtime rather than current-thread on the CLI, I'm curious to know it, otherwise I think this is a sane strategy.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Weird, I just ran cargo test locally with no issues, but that seems like a possibility given SQLX relying on tokio

@conorsch conorsch marked this pull request as ready for review September 6, 2024 14:58
@cronokirby
Copy link
Collaborator

Thanks a lot for this!

@cronokirby cronokirby merged commit ab5a30e into main Sep 6, 2024
3 checks passed
@cronokirby cronokirby deleted the 4-ci-skeleton branch September 6, 2024 16:47
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.

Implement some basic CI to exercise tests
2 participants