Skip to content

Commit 1e63a5e

Browse files
committed
ci(zimaos-link): set PROTOC_INCLUDE when using system protoc
1 parent 8715b7c commit 1e63a5e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/zimaos-link.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,20 @@ jobs:
7777
with:
7878
repo-token: ${{ secrets.GITHUB_TOKEN }}
7979

80+
- name: Export protoc include path
81+
if: steps.protoc-ready.outputs.need_setup == '0'
82+
run: |
83+
set -euo pipefail
84+
for include_dir in /usr/include /usr/local/include; do
85+
if [[ -f "${include_dir}/google/protobuf/timestamp.proto" ]]; then
86+
echo "PROTOC_INCLUDE=${include_dir}" >> "$GITHUB_ENV"
87+
echo "Using PROTOC_INCLUDE=${include_dir}"
88+
exit 0
89+
fi
90+
done
91+
echo "google protobuf include not found under /usr/include or /usr/local/include"
92+
exit 1
93+
8094
- name: Check Rust toolchain and target
8195
id: rust-ready
8296
env:

0 commit comments

Comments
 (0)