Skip to content

Commit

Permalink
Reorganize GitHub Actions build steps: move macOS build to the end an…
Browse files Browse the repository at this point in the history
…d optimize Bazel build command for protoc and grpc_cpp_plugin
  • Loading branch information
royshil committed Nov 27, 2024
1 parent ff412c3 commit 15ec397
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions .github/actions/build-plugin/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,6 @@ inputs:
runs:
using: composite
steps:
- name: Run macOS Build
if: runner.os == 'macOS'
shell: zsh --no-rcs --errexit --pipefail {0}
working-directory: ${{ inputs.workingDirectory }}
env:
CODESIGN_IDENT: ${{ inputs.codesignIdent }}
CODESIGN_TEAM: ${{ inputs.codesignTeam }}
run: |
: Run macOS Build
local -a build_args=(--config ${{ inputs.config }})
if (( ${+RUNNER_DEBUG} )) build_args+=(--debug)
if [[ '${{ inputs.codesign }}' == 'true' ]] build_args+=(--codesign)
.github/scripts/build-macos ${build_args}
- name: Install Dependencies 🛍️
if: runner.os == 'Linux'
shell: bash
Expand All @@ -60,12 +43,29 @@ runs:
git clone https://github.com/grpc/grpc.git --depth 1
cd grpc
git submodule update --init
bazel build @com_google_protobuf//:protoc @com_github_grpc_grpc//src/compiler:grpc_cpp_plugin
bazel build --compilation_mode=opt @com_google_protobuf//:protoc @com_github_grpc_grpc//src/compiler:grpc_cpp_plugin
# put the protoc and grpc_cpp_plugin paths in $GITHUB_ENV
echo "PROTOC_PATH=$(bazel info output_base)/external/com_google_protobuf/protoc" >> $GITHUB_ENV
echo "GRPC_CPP_PLUGIN_PATH=$(bazel info output_base)/external/com_github_grpc_grpc/src/compiler/grpc_cpp_plugin" >> $GITHUB_ENV
echo ::endgroup::
- name: Run macOS Build
if: runner.os == 'macOS'
shell: zsh --no-rcs --errexit --pipefail {0}
working-directory: ${{ inputs.workingDirectory }}
env:
CODESIGN_IDENT: ${{ inputs.codesignIdent }}
CODESIGN_TEAM: ${{ inputs.codesignTeam }}
run: |
: Run macOS Build
local -a build_args=(--config ${{ inputs.config }})
if (( ${+RUNNER_DEBUG} )) build_args+=(--debug)
if [[ '${{ inputs.codesign }}' == 'true' ]] build_args+=(--codesign)
.github/scripts/build-macos ${build_args}
- name: Run Ubuntu Build
if: runner.os == 'Linux'
shell: zsh --no-rcs --errexit --pipefail {0}
Expand Down

0 comments on commit 15ec397

Please sign in to comment.