Skip to content

chore(deps): update peter-evans/create-pull-request action to v6 #120

chore(deps): update peter-evans/create-pull-request action to v6

chore(deps): update peter-evans/create-pull-request action to v6 #120

Workflow file for this run

name: Bazel build
env:
HOMEBREW_NO_AUTO_UPDATE: 1
# typically used for bazel internal testing: changes outputRoot, sets idletimeout to ~15s
TEST_TMPDIR: /tmp/bazel
TRANSFORMERS_CACHE: /tmp/bazel/huggingface-transformers-cache
# yamllint disable-line rule:truthy
on:
pull_request:
types:
- opened
- reopened
push:
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
# action runners have bazelisk: - uses: bazelbuild/setup-bazelisk@v2
# https://github.com/bazelbuild/bazel/issues/11062
- run: mkdir -p "${TEST_TMPDIR}"
- run: env | sort
- name: Import private GPG key from variable PRIVATE_GPG_KEY
run: echo "${{ secrets.PRIVATE_GPG_KEY }}" | gpg2 --import
- run: gpg2 --list-secret-keys
- name: Mount bazel cache # Optional
uses: actions/cache@v3
with:
# needs to be an absolute path, not a variable; I've made it match TEST_TMPDIR above
path: /tmp/bazel
key: _bazel_runner
- run: bazel build //...
- run: bazel test //... --test_output=errors --test_summary=detailed
- name: Build examples to ensure functionality
run: |
for d in $(find examples -name WORKSPACE -exec dirname {} \; ); do
echo "::group::example: ${d}"
case ${RUNNER_ENVIRONMENT}:${d} in
github-hosted:examples/huggingface_transformer_question_answering) echo "TOO big: skip in github-hosted" ;;
github-hosted:examples/huggingface_transformer_fillmask) echo "TOO big: skip in github-hosted" ;;
*) (cd ${d} && bazel build //... && bazel test //... --test_output=errors --test_summary=detailed --action_env=TRANSFORMERS_CACHE && bazel clean );;
esac
echo "::endgroup::"
done