Fix serde version for CI #1732
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Rust | |
| on: | |
| push: | |
| branches-ignore: | |
| - dependabot/** | |
| pull_request: | |
| paths-ignore: | |
| - "OWNERS" | |
| - "OWNERS_ALIASES" | |
| - "*.md" | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| nightly: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| # tests with sanitizer on `ubuntu-latest` is supported by | |
| # self-defined `nihtly test` job, so we don't need to test it here. | |
| os: [ macos-latest ] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Install nightly toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: nightly-2025-04-03 | |
| override: true | |
| components: rustfmt, clippy, rust-src | |
| - uses: Swatinem/rust-cache@v1 | |
| with: | |
| sharedKey: ${{ matrix.os }} | |
| - name: Cache dependencies | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo install grcov; fi | |
| - name: Format | |
| run: | | |
| make format | |
| git diff --exit-code | |
| - name: Clippy | |
| run: make clippy | |
| env: | |
| EXTRA_CARGO_ARGS: '--fix' | |
| - name: Run tests | |
| run: make test | |
| env: | |
| RUST_BACKTRACE: 1 | |
| EXTRA_CARGO_ARGS: '--verbose' | |
| stable: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest ] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Install stable toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: 1.85.0 | |
| override: true | |
| components: rustfmt, clippy, rust-src | |
| - uses: Swatinem/rust-cache@v1 | |
| with: | |
| sharedKey: ${{ matrix.os }}-stable | |
| - name: Install gRPC dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pkg-config libgrpc-dev libgrpc++-dev protobuf-compiler-grpc | |
| - name: Clippy | |
| run: make clippy | |
| env: | |
| WITH_STABLE_TOOLCHAIN: 'force' | |
| GRPCIO_SYS_USE_PKG_CONFIG: '1' | |
| - name: Run tests | |
| run: make test | |
| env: | |
| RUST_BACKTRACE: 1 | |
| EXTRA_CARGO_ARGS: '--verbose' | |
| WITH_STABLE_TOOLCHAIN: 'force' | |
| GRPCIO_SYS_USE_PKG_CONFIG: '1' | |
| coverage: | |
| runs-on: ubuntu-latest | |
| needs: nightly | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Install nightly toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: nightly-2025-04-03 | |
| override: true | |
| components: llvm-tools-preview | |
| - uses: Swatinem/rust-cache@v1 | |
| with: | |
| sharedKey: ubuntu-latest | |
| - name: Install gRPC dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pkg-config libgrpc-dev libgrpc++-dev protobuf-compiler-grpc | |
| - name: Install grcov | |
| run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo install --locked grcov; fi | |
| - name: Run tests | |
| run: make test_matrix | |
| env: | |
| RUSTFLAGS: '-Cinstrument-coverage' | |
| LLVM_PROFILE_FILE: '%p-%m.profraw' | |
| EXTRA_CARGO_ARGS: '--verbose' | |
| GRPCIO_SYS_USE_PKG_CONFIG: '1' | |
| - name: Run grcov | |
| run: grcov `find . \( -name "*.profraw" \) -print` --binary-path target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../**' --ignore '/*' -o coverage.lcov | |
| - name: Upload | |
| uses: codecov/codecov-action@v3 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| with: | |
| file: coverage.lcov |