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

Commit

Permalink
sqld: Remove external protoc dependency (#534)
Browse files Browse the repository at this point in the history
Let's use the `protobuf-src` crate to remove the dependency to external
`protoc` to simplify the build process.
  • Loading branch information
penberg authored Jul 20, 2023
1 parent 4355422 commit 257ca6b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 20 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ jobs:
profile: minimal
toolchain: stable
override: true
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
with:
Expand All @@ -48,10 +44,6 @@ jobs:
toolchain: stable
components: clippy
override: true
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
with:
Expand All @@ -72,10 +64,6 @@ jobs:
toolchain: stable
components: rustfmt
override: true
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -114,10 +102,6 @@ jobs:
profile: minimal
toolchain: stable
override: true
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install foundationdb-clients
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
- uses: actions/checkout@v3
Expand Down Expand Up @@ -145,10 +129,6 @@ jobs:
profile: minimal
toolchain: stable
override: true
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
with:
Expand Down
19 changes: 19 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions sqld/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ aws-sdk-s3 = "0.28"

[build-dependencies]
prost-build = "0.11.4"
protobuf-src = "1.1.0"
tonic-build = "0.8.4"
vergen = { version = "8", features = ["build", "git", "gitcl"] }

Expand Down
2 changes: 2 additions & 0 deletions sqld/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ use vergen::EmitBuilder;
fn main() -> Result<(), Box<dyn std::error::Error>> {
EmitBuilder::builder().git_sha(false).all_build().emit()?;

std::env::set_var("PROTOC", protobuf_src::protoc());

let mut config = Config::new();
config.bytes([".wal_log"]);
tonic_build::configure()
Expand Down

0 comments on commit 257ca6b

Please sign in to comment.