Skip to content

Commit

Permalink
Generate types to deserialize simple extensions (#27)
Browse files Browse the repository at this point in the history
* Generate types to deserialize simple extensions

* Add test that checks deserialization of the core extensions

* Refactor build script and document serde features

* Fix Clippy warnings

* Remove Cargo.lock

* Allow `clippy::uninlined-format-args` in generated text code

* Add `protoc` feature to build `protoc` from source

* Skip `protoc` install on `protoc` feature check

* Split filter in text deserialize test

* Add missing quotes

* Fix expression
  • Loading branch information
mbrobbel authored Dec 16, 2022
1 parent b852f01 commit 2747477
Show file tree
Hide file tree
Showing 11 changed files with 489 additions and 583 deletions.
15 changes: 14 additions & 1 deletion .github/bors.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
status = ["Check", "Test", "Rustfmt", "Clippy", "Rustdoc"]
status = [
"Check (default)",
"Check (pbjson)",
"Check (protoc)",
"Check (serde)",
"Test (default)",
"Test (pbjson)",
"Test (serde)",
"Rustfmt",
"Clippy (default)",
"Clippy (pbjson)",
"Clippy (serde)",
"Rustdoc",
]
delete_merged_branches = true
timeout_sec = 600
3 changes: 1 addition & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ permissions:

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
rustdoc:
Expand All @@ -23,7 +22,7 @@ jobs:
- uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: cargo doc --all-features --no-deps
- run: cargo doc --no-deps
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v1
with:
Expand Down
29 changes: 26 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,35 @@ jobs:
check:
name: Check
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
feature:
- default
- pbjson
- protoc
- serde
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
- uses: arduino/setup-protoc@v1
if: matrix.feature != 'protoc'
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: cargo check --all-features
- run: cargo check --features ${{ matrix.feature }}

test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
feature:
- default
- pbjson
- serde
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -27,7 +43,7 @@ jobs:
- uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: cargo test --all-features
- run: cargo test --features ${{ matrix.feature }}

rustfmt:
name: Rustfmt
Expand All @@ -40,6 +56,13 @@ jobs:
clippy:
name: Clippy
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
feature:
- default
- pbjson
- serde
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -48,4 +71,4 @@ jobs:
- uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: cargo clippy --all-features -- -Dwarnings
- run: cargo clippy --features ${{ matrix.feature }} -- -Dwarnings
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
target
/target
Cargo.lock

.idea
Loading

0 comments on commit 2747477

Please sign in to comment.