Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish a PR comment when rust bindings needs to be updated #4812

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/cargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,23 @@ jobs:
- name: Cargo build
run: cargo build --all ${{ matrix.features }}
- name: Check all generated files with git
run: git diff --exit-code
run: git diff --exit-code >> cargo_generated_diff.txt
continue-on-error: true
- name: Post a comment on PR on mismatch
if: |
failure() &&
!github.event.pull_request.head.repo.fork &&
steps.Check_all_generated_files_with_git.conclusion == 'failure'
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.number }}
body: |
## ${{ github.workflow }}
The rust bindings need to be updated. Please apply (`git apply`) this diff:
```diff
$(cat cargo_generated_diff.txt)
```
- name: Cargo test
run: cargo test --all ${{ matrix.features }}
- name: Cargo Publish (dry run)
Expand Down
2 changes: 2 additions & 0 deletions src/ffi/win_bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
pub struct __BindgenBitfieldUnit<Storage> {
storage: Storage,
}


impl<Storage> __BindgenBitfieldUnit<Storage> {
#[inline]
pub const fn new(storage: Storage) -> Self {
Expand Down
1 change: 1 addition & 0 deletions src/inc/msquic.h
Original file line number Diff line number Diff line change
Expand Up @@ -1632,6 +1632,7 @@ typedef struct QUIC_API_TABLE {
QUIC_CONNECTION_COMP_RESUMPTION_FN ConnectionResumptionTicketValidationComplete; // Available from v2.2
QUIC_CONNECTION_COMP_CERT_FN ConnectionCertificateValidationComplete; // Available from v2.2

QUIC_CONNECTION_COMP_CERT_FN DummyValueForTest;
} QUIC_API_TABLE;

#define QUIC_API_VERSION_1 1 // Not supported any more
Expand Down
Loading