Protocol Buffers - Google's data interchange format (grpc依赖) https://developers.google.com/protocol-buffers/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

38 lines
1.1 KiB

name: 'Cross-compile protoc'
description: 'Produces a cross-compiled protoc binary for a target architecture'
inputs:
credentials:
required: true
description: The GCP credentials to use for reading the docker image
type: string
architecture:
required: true
description: The target architecture to build for
type: string
outputs:
protoc:
description: "Cross-compiled protoc location. Also output to $PROTOC"
value: ${{ steps.output.outputs.protoc }}
runs:
using: 'composite'
steps:
- name: Cross compile protoc for ${{ inputs.architecture }}
uses: ./.github/actions/bazel-docker
with:
credentials: ${{ inputs.credentials }}
bazel-cache: xcompile-protoc/${{ inputs.architecture }}
bash: |
bazel build //:protoc --config=${{ inputs.architecture }} $BAZEL_FLAGS
cp bazel-bin/protoc .
- name: Set protoc environment variable
shell: bash
run: echo "PROTOC=protoc-${{ inputs.architecture }}" >> $GITHUB_ENV
- name: Extract binary
id: output
shell: bash
run: |
mv protoc $PROTOC
echo "protoc=$PROTOC" >> $GITHUB_OUTPUT