ci: optimize bazel output for web-based console

This commit is contained in:
Malte Poll 2023-05-19 15:55:41 +02:00 committed by Malte Poll
parent eae7744890
commit b467327128

View File

@ -27,31 +27,42 @@ runs:
fi fi
echo "::endgroup::" echo "::endgroup::"
- name: Bazel repository cache (Linux) - name: Configure Bazel (general)
uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 shell: bash
if: runner.os == 'Linux' && (inputs.useCache == 'true' || inputs.useCache == 'readonly') env:
with: WORKSPACE: ${{ github.workspace }}
path: | run: |
${{ github.workspace }}/tools/pseudo-version echo "::group::Configure Bazel"
/home/runner/.cache/bazel cat <<EOF >> "${WORKSPACE}/.bazeloverwriterc"
/home/runner/.cache/shared_bazel_repository_cache build --color=yes
/home/runner/.cache/shared_bazel_action_cache build --terminal_columns=143
key: bazel build --build_metadata=ROLE=CI
build --show_progress_rate_limit=5
build --curses=yes
build --verbose_failures
build --announce_rc
test --show_timestamps
test --keep_going
EOF
echo "::endgroup::"
- name: Configure Bazel - name: Configure Bazel (rw)
shell: bash shell: bash
if: inputs.useCache == 'true' || inputs.useCache == 'readonly' if: inputs.useCache == 'true' || inputs.useCache == 'readonly'
env: env:
BUILDBUDDY_ORG_API_KEY: ${{ inputs.buildBuddyApiKey }} BUILDBUDDY_ORG_API_KEY: ${{ inputs.buildBuddyApiKey }}
WORKSPACE: ${{ github.workspace }}
run: | run: |
echo "::group::Configure Bazel" echo "::group::Configure Bazel"
cat <<EOF >> ~/.bazelrc cat <<EOF >> "${WORKSPACE}/.bazeloverwriterc"
build --bes_results_url=https://app.buildbuddy.io/invocation/ build --bes_results_url=https://app.buildbuddy.io/invocation/
build --bes_backend=grpcs://remote.buildbuddy.io build --bes_backend=grpcs://remote.buildbuddy.io
build --remote_cache=grpcs://remote.buildbuddy.io build --remote_cache=grpcs://remote.buildbuddy.io
build --remote_timeout=3600 build --remote_timeout=3600
build --experimental_remote_build_event_upload=minimal build --experimental_remote_build_event_upload=minimal
build --experimental_remote_cache_compression build --experimental_remote_cache_compression
build --noremote_upload_local_results
build --nolegacy_important_outputs
build --remote_header=x-buildbuddy-api-key=${BUILDBUDDY_ORG_API_KEY} build --remote_header=x-buildbuddy-api-key=${BUILDBUDDY_ORG_API_KEY}
EOF EOF
echo "::endgroup::" echo "::endgroup::"
@ -61,7 +72,7 @@ runs:
if: inputs.useCache == 'readonly' if: inputs.useCache == 'readonly'
run: | run: |
echo "::group::Configure Bazel (readonly)" echo "::group::Configure Bazel (readonly)"
echo "build --remote_upload_local_results=false" >> ~/.bazelrc echo "build --remote_upload_local_results=false" >> "${WORKSPACE}/.bazeloverwriterc"
echo "::endgroup::" echo "::endgroup::"
- name: Check bazel version - name: Check bazel version