Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit ebd29cc

Browse files
committed
Pre-build protoc from source and remove installation step from actions
1 parent aa52dd3 commit ebd29cc

File tree

4 files changed

+2
-6
lines changed

4 files changed

+2
-6
lines changed

.github/workflows/kuksa_databroker-cli_build.yml

-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ jobs:
3434
steps:
3535
- name: Installing JVM
3636
run: sudo apt update && sudo apt-get install -y default-jre
37-
- name: Install Protoc
38-
run: sudo apt-get install -y protobuf-compiler
3937
- uses: actions/checkout@v3
4038
- name: cargo fmt
4139
working-directory: ${{github.workspace}}

.github/workflows/kuksa_databroker_build.yml

-4
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ jobs:
3434
steps:
3535
- name: Installing JVM
3636
run: sudo apt update && sudo apt-get install -y default-jre
37-
- name: Install Protoc
38-
run: sudo apt-get install -y protobuf-compiler
3937
- uses: actions/checkout@v3
4038
- name: cargo fmt
4139
working-directory: ${{github.workspace}}
@@ -60,8 +58,6 @@ jobs:
6058
runs-on: ubuntu-latest
6159

6260
steps:
63-
- name: Install Protoc
64-
run: sudo apt-get install -y protobuf-compiler
6561
- uses: actions/checkout@v3
6662
- uses: actions-rs/install@v0.1
6763
with:

kuksa_databroker/databroker-proto/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ prost-types = { workspace = true }
2525

2626
[build-dependencies]
2727
tonic-build = { workspace = true, features = ["transport", "prost"] }
28+
protobuf-src = "1.1.0"

kuksa_databroker/databroker-proto/build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
********************************************************************************/
1313

1414
fn main() -> Result<(), Box<dyn std::error::Error>> {
15+
std::env::set_var("PROTOC", protobuf_src::protoc());
1516
tonic_build::configure()
1617
.compile_well_known_types(false)
1718
.protoc_arg("--experimental_allow_proto3_optional")

0 commit comments

Comments
 (0)