From c051a997be7ae6bad613ebf7e357cdce371060a3 Mon Sep 17 00:00:00 2001 From: Alon Lukatch Date: Mon, 2 Dec 2024 15:16:40 +0200 Subject: [PATCH] find proto step --- .github/workflows/starknet_p2p_specs_ci.yml | 24 +++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/starknet_p2p_specs_ci.yml b/.github/workflows/starknet_p2p_specs_ci.yml index 6f3e45c..527fe49 100644 --- a/.github/workflows/starknet_p2p_specs_ci.yml +++ b/.github/workflows/starknet_p2p_specs_ci.yml @@ -26,6 +26,30 @@ jobs: 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 + run: | + echo "Using the following .proto files from previous step:" + echo "${{ steps.find-protos.outputs.proto_files }}" + protoc --rust_out=experimental-codegen=enabled,kernel=upb:$(mktemp -d) ${{ steps.find-protos.outputs.proto_files }} + # for file in ${{ steps.find-protos.outputs.proto_files }}; do + # echo "Processing $file" + # protoc --rust_out=experimental-codegen=enabled,kernel=upb:$(mktemp -d) file + # done + # - name: Validate .proto files for Rust compatibility # run: | # protoc --rust_out=experimental-codegen=enabled,kernel=upb:$(mktemp -d) *.proto