Switching to the new version of the prost and related libraries. #12
Workflow file for this run
This file contains 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: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
env: | |
RUST_BACKTRACE: 1 | |
RUSTFLAGS: "--deny=warnings" | |
jobs: | |
build_and_test: | |
name: Rust ${{ matrix.rust }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
rust: [stable] | |
include: | |
- os: ubuntu-latest | |
rust: nightly | |
steps: | |
- uses: actions/checkout@v2 | |
- if: matrix.os == 'ubuntu-latest' | |
name: Install dependencies (ubuntu-latest) | |
run: | | |
sudo apt-get install protobuf-compiler | |
- if: matrix.os == 'macos-latest' | |
name: Install dependencies (macos-latest) | |
run: | | |
brew install protobuf | |
- if: matrix.os == 'windows-latest' | |
name: Install dependencies (windows-latest) | |
run: | | |
choco install protoc | |
- name: setup nightly | |
if: ${{ matrix.rust == 'nightly' }} | |
run: rustup default nightly | |
- name: dump version | |
run: cargo --version && protoc --version | |
- name: check format | |
if: ${{ matrix.rust == 'stable' && matrix.os == 'ubuntu-latest' }} | |
run: cargo fmt --all -- --check | |
- name: check clippy | |
if: ${{ matrix.rust == 'stable' && matrix.os == 'ubuntu-latest' }} | |
run: cargo clippy --all --all-targets -- -D clippy::all && cargo clippy --no-default-features --features prost-codec --features std -- -D clippy::all | |
- name: install targets | |
run: rustup target add x86_64-unknown-none | |
- name: run build for no-std target | |
# No-std implementation uses feature that can only be compiled by nightly version | |
if: ${{ matrix.rust == 'nightly' }} | |
run: cargo build --no-default-features --features prost-codec --target x86_64-unknown-none | |
- name: run tests with no-std enabled | |
if: ${{ matrix.rust == 'nightly' }} | |
run: cargo test --all --no-default-features --features=prost-codec --features=default-logger --no-fail-fast -- --nocapture | |
- run: cargo test --all --no-fail-fast -- --nocapture | |
# Validate benches still work. | |
- run: cargo bench --all -- --test | |
# Because failpoints inject failure in code path, which will affect all concurrently running tests, Hence they need to be synchronized, which make tests slow. | |
# Only package harness has failpoints tests. | |
- run: cargo test --tests --features failpoints --package harness -- --nocapture | |
# TODO: There is a bug in protobuf-build that cached size is not supported yet, so do not test harness. | |
- run: cargo test --no-default-features --features prost-codec --features std -- --nocapture |