-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI to validate proto compilation (#59)
* add ci to validate proto compilation * Setup CI and fixes to some .proto files (#61) * add quotations on main branch name * cr * testing changes * cleaning up and swaping to Noelware proto instead of installing * test protoc version * add missing syntax on capabilities.proto * attempting to fix compilation errors * adding Classes message to snapshot.proto * experimental-codegen * kernel * temp file instead of /dev/null * package transaction duplication * disable java compilation * remove package declaration * install protoc-gen-go before compiling to go * add option go_package specification * clean up * testing find *.proto * find proto step * compiling each file seperatly * apply changes to all compilations * clean comments * add --fatal_warnings flag to error on warnings * move state.proto back into sync dir * fix CR comments
- Loading branch information
1 parent
40aef58
commit 3531126
Showing
16 changed files
with
108 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Starknet-P2p-Specs-CI | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- '*' | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- auto_merge_enabled | ||
- edited | ||
|
||
env: | ||
PROTOC_VERSION: v25.1 | ||
|
||
jobs: | ||
compile-protos: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- uses: Noelware/[email protected] | ||
with: | ||
version: ${{env.PROTOC_VERSION}} | ||
|
||
- name: Find .proto files | ||
id: find-protos | ||
run: | | ||
proto_files=$(find . -name "*.proto") | ||
if [ -z "$proto_files" ]; then | ||
echo "No .proto files found." | ||
exit 1 | ||
fi | ||
echo "Found the following .proto files:" | ||
echo "$proto_files" | ||
# Save the list as an output | ||
echo "proto_files=$(echo "$proto_files" | tr '\n' ' ')" >> $GITHUB_OUTPUT | ||
- name: Validate Rust compatibility | ||
run: | | ||
for file in ${{ steps.find-protos.outputs.proto_files }}; do | ||
echo "Compiling $file" | ||
protoc --fatal_warnings --rust_out=experimental-codegen=enabled,kernel=upb:$(mktemp -d) $file | ||
done | ||
- name: Validate Python compatibility | ||
run: | | ||
for file in ${{ steps.find-protos.outputs.proto_files }}; do | ||
echo "Compiling $file" | ||
protoc --fatal_warnings --python_out=$(mktemp -d) $file | ||
done | ||
- name: Validate C++ compatibility | ||
run: | | ||
for file in ${{ steps.find-protos.outputs.proto_files }}; do | ||
echo "Compiling $file" | ||
protoc --fatal_warnings --cpp_out=$(mktemp -d) $file | ||
done | ||
- name: Validate GO compatibility | ||
run: | | ||
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest | ||
export PATH=$PATH:$(go env GOPATH)/bin | ||
for file in ${{ steps.find-protos.outputs.proto_files }}; do | ||
echo "Compiling $file" | ||
protoc --fatal_warnings --go_out=$(mktemp -d) --go_opt=paths=source_relative $file | ||
done |
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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