Skip to content

Upgrade to Bazel 8 #261

Upgrade to Bazel 8

Upgrade to Bazel 8 #261

Workflow file for this run

# Workflow for building and testing flags on macOS, Ubuntu and Windows.
name: Build and Run all tests
# We use action's triggers 'push' and 'pull_request'.
# The strategy is the following: this action will be
# triggered on any push to 'main' branch and any pull
# request to any branch. Thus we avoid duplicate work-
# flows.
on:
push:
branches:
- "main"
pull_request:
branches:
- "**"
workflow_dispatch:
inputs:
# Live debug failures using tmate by toggling input parameter
# 'debug_enabled':
# https://github.com/mxschmitt/action-tmate#manually-triggered-debug
# When manually running this workflow:
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
debug_enabled:
description: "Enable tmate debugging"
type: boolean
default: false
jobs:
build-and-test:
name: Build and Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
# 'windows-latest' (windows-2022) is broken due to a github runner update.
# See https://github.com/actions/runner-images/issues/7662 for more details.
os: ["macos-latest", "ubuntu-latest", "windows-2019"]
defaults:
run:
shell: bash
steps:
# Checkout the repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Build
run: |
bazel build \
-c dbg \
--strip="never" \
...
- name: Test
run: |
bazel test \
-c dbg \
--strip="never" \
--test_output=errors \
tests/... \
--test_arg=--gtest_shuffle \
--test_arg=--gtest_repeat=100
- name: Debug using tmate (if failure)
uses: mxschmitt/action-tmate@v3
# Optionally enable tmate debugging if the workflow was manually-triggered
# with `debug_enabled` set to `true`.
# https://github.com/mxschmitt/action-tmate#manually-triggered-debug
if: ${{ failure() && github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}