Skip to content

Read another .bazelrc file github.bazelrc if it exists. #1991

Read another .bazelrc file github.bazelrc if it exists.

Read another .bazelrc file github.bazelrc if it exists. #1991

Workflow file for this run

# Copyright 2021, 2022, 2023, 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Run Bazel tests
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
jobs:
test:
name: Test
strategy:
matrix:
# We don’t use the GitHub matrix support for the Emacs toolchain to
# allow Bazel to cache intermediate results between the test runs.
bazel: [6.0.0, 6.1.2, 6.2.1, 6.3.2, 6.4.0, 6.5.0, 7.0.2, latest]
os: [ubuntu-latest, macos-latest, windows-latest]
# We can’t support older Bazel versions on Windows due to
# https://github.com/bazelbuild/bazel/issues/15073.
exclude:
- bazel: 6.0.0
os: windows-latest
- bazel: 6.1.2
os: windows-latest
- bazel: 6.2.1
os: windows-latest
runs-on: ${{matrix.os}}
steps:
- name: Check out repository
uses: actions/checkout@v4
- id: setup
name: Set up workspace
uses: ./.github/actions/set-up
- name: Run Bazel tests
# Use disk cache to speed up runs.
run: >
python build.py
--bazel=bazelisk
--action-cache="${{steps.setup.outputs.action-cache}}"
--repository-cache="${{steps.setup.outputs.repository-cache}}"
--profiles="${{steps.setup.outputs.profiles}}"
-- check
env:
USE_BAZEL_VERSION: ${{matrix.bazel}}
# https://github.com/bazelbuild/bazelisk/issues/88#issuecomment-625178467
BAZELISK_GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
# We don’t need XCode, and using the Unix toolchain tends to be less
# flaky. See
# https://github.com/bazelbuild/bazel/issues/14113#issuecomment-999794586.
# Use the Unix toolchain only on Github to make coverage generation
# work locally; see https://github.com/bazelbuild/bazel/issues/14970.
BAZEL_USE_CPP_ONLY_TOOLCHAIN: '1'
# Make Bazel find the right binaries on GitHub. See
# https://bazel.build/install/windows#bazel_does_not_find_bash_or_bashexe.
BAZEL_SH: ${{steps.setup.outputs.bash}}
- name: Upload profiles
uses: actions/upload-artifact@v4
with:
name: profiles for Bazel version ${{matrix.bazel}} on ${{runner.os}}
path: ${{steps.setup.outputs.profiles}}/*.json.gz
if-no-files-found: ignore