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

Commit 257ca6b

Browse files
authored
sqld: Remove external protoc dependency (#534)
Let's use the `protobuf-src` crate to remove the dependency to external `protoc` to simplify the build process.
1 parent 4355422 commit 257ca6b

File tree

4 files changed

+22
-20
lines changed

4 files changed

+22
-20
lines changed

.github/workflows/rust.yml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ jobs:
2424
profile: minimal
2525
toolchain: stable
2626
override: true
27-
- name: Install Protoc
28-
uses: arduino/setup-protoc@v1
29-
with:
30-
repo-token: ${{ secrets.GITHUB_TOKEN }}
3127
- name: Checkout
3228
uses: actions/checkout@v3
3329
with:
@@ -48,10 +44,6 @@ jobs:
4844
toolchain: stable
4945
components: clippy
5046
override: true
51-
- name: Install Protoc
52-
uses: arduino/setup-protoc@v1
53-
with:
54-
repo-token: ${{ secrets.GITHUB_TOKEN }}
5547
- name: Checkout
5648
uses: actions/checkout@v3
5749
with:
@@ -72,10 +64,6 @@ jobs:
7264
toolchain: stable
7365
components: rustfmt
7466
override: true
75-
- name: Install Protoc
76-
uses: arduino/setup-protoc@v1
77-
with:
78-
repo-token: ${{ secrets.GITHUB_TOKEN }}
7967
- name: Checkout
8068
uses: actions/checkout@v3
8169
with:
@@ -114,10 +102,6 @@ jobs:
114102
profile: minimal
115103
toolchain: stable
116104
override: true
117-
- name: Install Protoc
118-
uses: arduino/setup-protoc@v1
119-
with:
120-
repo-token: ${{ secrets.GITHUB_TOKEN }}
121105
- name: Install foundationdb-clients
122106
run: wget https://github.com/apple/foundationdb/releases/download/7.1.25/foundationdb-clients_7.1.25-1_amd64.deb && sudo dpkg -i foundationdb-clients_7.1.25-1_amd64.deb
123107
- uses: actions/checkout@v3
@@ -145,10 +129,6 @@ jobs:
145129
profile: minimal
146130
toolchain: stable
147131
override: true
148-
- name: Install Protoc
149-
uses: arduino/setup-protoc@v1
150-
with:
151-
repo-token: ${{ secrets.GITHUB_TOKEN }}
152132
- name: Checkout
153133
uses: actions/checkout@v3
154134
with:

Cargo.lock

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sqld/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ aws-sdk-s3 = "0.28"
7070

7171
[build-dependencies]
7272
prost-build = "0.11.4"
73+
protobuf-src = "1.1.0"
7374
tonic-build = "0.8.4"
7475
vergen = { version = "8", features = ["build", "git", "gitcl"] }
7576

sqld/build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ use vergen::EmitBuilder;
44
fn main() -> Result<(), Box<dyn std::error::Error>> {
55
EmitBuilder::builder().git_sha(false).all_build().emit()?;
66

7+
std::env::set_var("PROTOC", protobuf_src::protoc());
8+
79
let mut config = Config::new();
810
config.bytes([".wal_log"]);
911
tonic_build::configure()

0 commit comments

Comments
 (0)