Skip to content

Update to rules_go 0.45.1. #2087

Update to rules_go 0.45.1.

Update to rules_go 0.45.1. #2087

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
with:
bazel-version: ${{matrix.bazel}}
github-token: ${{secrets.GITHUB_TOKEN}}
- name: Set lockfile mode
# The lockfile format differs between the Bazel versions, so only for
# one version --lockfile_mode=error can work. --lockfile_mode=update
# would be useless since we never use the updated lockfiles, so switch
# lockfiles off entirely in other Bazel versions.
run: >-
echo common
--lockfile_mode=${{matrix.bazel == 'latest' && 'error' || 'off'}}>>
github.bazelrc
# The --lockfile_mode flag was introduced in Bazel 6.2.
if: >-
!startsWith(matrix.bazel, '6.0.') &&
!startsWith(matrix.bazel, '6.1.')
- name: Run Bazel tests
shell: pwsh
run: python build.py --profiles="${{runner.temp}}/profiles" -- check
- name: Upload profiles
uses: actions/upload-artifact@v4
with:
name: profiles for Bazel version ${{matrix.bazel}} on ${{runner.os}}
path: ${{runner.temp}}/profiles/*.json.gz
if-no-files-found: ignore