From 1affa1e3b6bdb38c58125311e38a3a49ccb0f57e Mon Sep 17 00:00:00 2001 From: Lucas Kent Date: Tue, 19 Dec 2023 20:50:47 +1100 Subject: [PATCH] Fix CI --- .github/workflows/ci.yml | 6 ++++-- metrics-exporter-prometheus/src/builder.rs | 1 + netlify.toml | 6 +++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2fde46c8..6e67cf83 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,9 +24,11 @@ jobs: - name: Install Rust Stable run: rustup default stable - name: Install cargo-hack - run: cargo install cargo-hack + uses: taiki-e/install-action@v2 + with: + tool: cargo-hack - name: Check Feature Matrix - run: cargo hack build --all --all-targets --feature-powerset + run: cargo hack check --all --all-targets --feature-powerset --release test: name: Test ${{ matrix.rust_version }} runs-on: ubuntu-latest diff --git a/metrics-exporter-prometheus/src/builder.rs b/metrics-exporter-prometheus/src/builder.rs index 8c41ce15..780e0a41 100644 --- a/metrics-exporter-prometheus/src/builder.rs +++ b/metrics-exporter-prometheus/src/builder.rs @@ -29,6 +29,7 @@ use hyper::{ http::HeaderValue, Method, Request, Uri, }; +#[cfg(feature = "push-gateway")] use hyper_tls::HttpsConnector; use indexmap::IndexMap; diff --git a/netlify.toml b/netlify.toml index d1134de4..eff440c6 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,7 +1,11 @@ [build] command = """ rustup install nightly --profile minimal && \ - cargo doc --no-deps --workspace --exclude=metrics-observer && cp -r target/doc _netlify_out + PROTOC_ZIP=protoc-3.14.0-linux-x86_64.zip && \ + curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/$PROTOC_ZIP && \ + unzip $PROTOC_ZIP && \ + PATH=$PATH:/$PWD/bin cargo +nightly doc --no-deps --workspace --exclude=metrics-observer && \ + cp -r target/doc _netlify_out """ environment = { RUSTDOCFLAGS= "--cfg docsrs" } publish = "_netlify_out"