Skip to content

Fix warning about Cursor::split() (#176) #401

Fix warning about Cursor::split() (#176)

Fix warning about Cursor::split() (#176) #401

Workflow file for this run

name: CI
env:
PROTOBUF_VER: 3.17.3
# Run on git push, PR, or manually from the Actions tab
on: [push, pull_request, workflow_dispatch, merge_group]
jobs:
rustfmt:
name: Check formatting with rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rustup update nightly
- run: rustup component add rustfmt --toolchain nightly
- name: Run rustfmt
run: rustup run nightly ci/run_rustfmt.sh
pb-jelly-unit:
name: pb-jelly unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rustup update nightly
- name: Run unit tests
run: |
cd pb-jelly
rustup run nightly cargo test
pb-jelly-gen-unit:
name: pb-jelly-gen unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rustup update nightly
- name: Run unit tests
run: |
cd pb-jelly-gen
rustup run nightly cargo test
pbtest:
strategy:
matrix:
plat: [ubuntu-latest, macos-latest, windows-latest]
name: pbtest integration test (${{matrix.plat}})
runs-on: ${{matrix.plat}}
steps:
- uses: actions/checkout@v2
- run: rustup update nightly
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: ${{env.PROTOBUF_VER}}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run integration test
env:
VALIDATE: 1
run: |
cd pb-test/pb_test_gen
rustup run nightly cargo run
cd ..
rustup run nightly cargo test
examples:
name: examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rustup update nightly
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: ${{env.PROTOBUF_VER}}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run tests
run: |
cd examples/examples_gen
rustup run nightly cargo run
cd ..
rustup run nightly cargo test
benchmarks:
name: benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rustup update nightly
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: ${{env.PROTOBUF_VER}}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run benchmark
run: |
cd pb-test/pb_test_gen
rustup run nightly cargo run --features=bench_prost,bench_rust_protobuf
cd ..
rustup run nightly cargo bench bench --features=bench_prost,bench_rust_protobuf
clippy_gen:
name: clippy gen
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rustup update nightly
- run: rustup component add clippy --toolchain nightly
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: ${{env.PROTOBUF_VER}}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run clippy
env:
RUSTFLAGS: "-D warnings"
run: |
cd pb-test/pb_test_gen
rustup run nightly cargo run
cd ..
rustup run nightly cargo clippy -p proto_pbtest
gen_gen:
name: Generate pb-jelly-gen/src/protos.rs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rustup update nightly
- run: rustup component add clippy --toolchain nightly
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: ${{env.PROTOBUF_VER}}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate protos
run: |
cd pb-jelly-gen
rustup run nightly bash regen_gen_protos.sh
git diff --exit-code