Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: prometheus/client_rust
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: rename-prometheus-client
Choose a base ref
...
head repository: prometheus/client_rust
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
Loading
60 changes: 50 additions & 10 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -7,6 +7,10 @@ jobs:
name: Check
runs-on: ubuntu-latest
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
@@ -22,12 +26,12 @@ jobs:

# Caching
- name: Cache cargo registry
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: cargo-registry-${{ hashFiles('Cargo.toml') }}
- name: Cache cargo index
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: cargo-index-${{ hashFiles('Cargo.toml') }}
@@ -39,12 +43,16 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: test
args: --benches
args: --benches --all-features

test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
@@ -60,25 +68,29 @@ jobs:

# Caching
- name: Cache cargo registry
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: cargo-registry-${{ hashFiles('Cargo.toml') }}
- name: Cache cargo index
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: cargo-index-${{ hashFiles('Cargo.toml') }}

- uses: actions-rs/cargo@v1
with:
command: test
args: --all
args: --all --all-features

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
@@ -95,6 +107,10 @@ jobs:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
@@ -105,25 +121,29 @@ jobs:

# Caching
- name: Cache cargo registry
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: cargo-registry-${{ hashFiles('Cargo.toml') }}
- name: Cache cargo index
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: cargo-index-${{ hashFiles('Cargo.toml') }}

- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
args: --workspace --all-targets -- -D warnings

check-rustdoc-links:
name: Check rustdoc intra-doc links
runs-on: ubuntu-latest
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
@@ -135,4 +155,24 @@ jobs:
RUSTDOCFLAGS: "--deny broken_intra_doc_links"
with:
command: doc
args: --verbose --workspace --no-deps --document-private-items
args: --verbose --workspace --no-deps --document-private-items --all-features

cross-compile:
name: Cross compile
runs-on: ubuntu-latest
strategy:
matrix:
target:
- armv7-unknown-linux-gnueabihf
- powerpc-unknown-linux-gnu
- powerpc64-unknown-linux-gnu
- wasm32-unknown-unknown
steps:
- uses: actions/checkout@v2

- uses: dtolnay/rust-toolchain@stable
with:
target: ${{ matrix.target }}

# Note that this does not test the `protobuf` feature (for now). See reasoning in https://github.com/prometheus/client_rust/pull/98/.
- run: cargo check --target=${{ matrix.target }}
Loading