From e8cf51a53101cc0de88d0cd8698dacdb2f55f246 Mon Sep 17 00:00:00 2001 From: Adam Chalmers Date: Wed, 21 Sep 2022 10:02:51 -0500 Subject: [PATCH 1/2] chore: Bump Prost to 0.11 Prost 0.11 doesn't build a protobuf compiler from source anymore, instead requiring that one is available on the filesystem. Because Google's protobuf compiler is only available in 64-bit Linux, and most of the cross-compile targets use 32-bit Linux, I've disabled the 'protobuf' feature in cross-compilation. Signed-off-by: Adam Chalmers --- .github/workflows/rust.yml | 12 +++++++++++- Cargo.toml | 6 +++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d9fdb9b1..f94c59a6 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -7,6 +7,8 @@ jobs: name: Check runs-on: ubuntu-latest steps: + - name: Install Protoc + uses: arduino/setup-protoc@v1 - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: @@ -45,6 +47,8 @@ jobs: name: Test Suite runs-on: ubuntu-latest steps: + - name: Install Protoc + uses: arduino/setup-protoc@v1 - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: @@ -79,6 +83,8 @@ jobs: name: Rustfmt runs-on: ubuntu-latest steps: + - name: Install Protoc + uses: arduino/setup-protoc@v1 - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: @@ -95,6 +101,8 @@ jobs: name: Clippy runs-on: ubuntu-latest steps: + - name: Install Protoc + uses: arduino/setup-protoc@v1 - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: @@ -124,6 +132,8 @@ jobs: name: Check rustdoc intra-doc links runs-on: ubuntu-latest steps: + - name: Install Protoc + uses: arduino/setup-protoc@v1 - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: @@ -159,4 +169,4 @@ jobs: with: use-cross: true command: build - args: --release --target=${{ matrix.target }} --all-features + args: --release --target=${{ matrix.target }} diff --git a/Cargo.toml b/Cargo.toml index 88bc0569..a42a237f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,8 +21,8 @@ dtoa = "1.0" itoa = "1.0" parking_lot = "0.12" prometheus-client-derive-encode = { version = "0.3.0", path = "derive-encode" } -prost = { version = "0.9.0", optional = true } -prost-types = { version = "0.9.0", optional = true } +prost = { version = "0.11.0", optional = true } +prost-types = { version = "0.11.0", optional = true } void = { version = "1.0", optional = true } [dev-dependencies] @@ -38,7 +38,7 @@ tokio = { version = "1", features = ["rt-multi-thread", "net", "macros", "signal hyper = { version = "0.14.16", features = ["server", "http1", "tcp"] } [build-dependencies] -prost-build = { version = "0.9.0", optional = true } +prost-build = { version = "0.11.0", optional = true } [[bench]] name = "family" From 38dc356e75813a7fd740d955f1ed0d7700418d12 Mon Sep 17 00:00:00 2001 From: Max Inden Date: Tue, 4 Oct 2022 11:06:51 +0100 Subject: [PATCH 2/2] Update .github/workflows/rust.yml Signed-off-by: Max Inden --- .github/workflows/rust.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f94c59a6..168bb464 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -169,4 +169,5 @@ jobs: with: use-cross: true command: build + # Note that this does not test the `protobuf` feature (for now). See reasoning in https://github.com/prometheus/client_rust/pull/98/. args: --release --target=${{ matrix.target }}