Use compiled protoc (#5)
This commit is contained in:
parent
28b1ce89eb
commit
01384cb45a
|
@ -15,9 +15,6 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install Protoc
|
||||
uses: arduino/setup-protoc@v1
|
||||
|
||||
- name: Set rust version
|
||||
run: |
|
||||
source ci/rust-version.sh
|
||||
|
|
|
@ -14,9 +14,6 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install Protoc
|
||||
uses: arduino/setup-protoc@v1
|
||||
|
||||
- name: Set rust version
|
||||
run: |
|
||||
source ci/rust-version.sh
|
||||
|
|
|
@ -185,6 +185,15 @@ version = "1.1.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
||||
|
||||
[[package]]
|
||||
name = "autotools"
|
||||
version = "0.2.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c8138adefca3e5d2e73bfba83bd6eeaf904b26a7ac1b4a19892cfe16cc7e1701"
|
||||
dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "axum"
|
||||
version = "0.5.16"
|
||||
|
@ -1896,6 +1905,15 @@ version = "2.28.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94"
|
||||
|
||||
[[package]]
|
||||
name = "protobuf-src"
|
||||
version = "1.1.0+21.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c7ac8852baeb3cc6fb83b93646fb93c0ffe5d14bf138c945ceb4b9948ee0e3c1"
|
||||
dependencies = [
|
||||
"autotools",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "qstring"
|
||||
version = "0.7.2"
|
||||
|
@ -2408,6 +2426,7 @@ dependencies = [
|
|||
"log",
|
||||
"prometheus",
|
||||
"prost",
|
||||
"protobuf-src",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"solana-geyser-plugin-interface",
|
||||
|
|
|
@ -31,5 +31,6 @@ tonic = { version = "0.8", features = ["gzip"] }
|
|||
anyhow = "1"
|
||||
cargo-lock = "8"
|
||||
git-version = "0.3"
|
||||
protobuf-src = "1.1.0"
|
||||
tonic-build = "0.8"
|
||||
vergen = "=7.2.1"
|
||||
|
|
8
build.rs
8
build.rs
|
@ -5,11 +5,17 @@ use {
|
|||
};
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
tonic_build::compile_protos("proto/geyser.proto")?;
|
||||
compile_protos()?;
|
||||
generate_env()?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn compile_protos() -> anyhow::Result<()> {
|
||||
std::env::set_var("PROTOC", protobuf_src::protoc());
|
||||
tonic_build::compile_protos("proto/geyser.proto")?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn generate_env() -> anyhow::Result<()> {
|
||||
vergen(Config::default())?;
|
||||
|
||||
|
|
Loading…
Reference in New Issue