Skip to content

Yiheng/radio pins refactor #428

Yiheng/radio pins refactor

Yiheng/radio pins refactor #428

Workflow file for this run

name: C/C++ Tests
on:
push:
branches:
- main
paths:
- "src/**"
- "bzl/**"
- "BUILD.bazel"
- ".bazelrc"
- ".github/workflows/*.yaml"
pull_request:
workflow_dispatch:
jobs:
changes:
runs-on: ubuntu-latest
outputs:
should_test: ${{ github.event_name != 'pull_request' || steps.filter.outputs.test == 'true' }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
test:
- 'src/**'
- 'bzl/**'
- 'BUILD.bazel'
- '.bazelrc'
- '.github/workflows/*.yaml'
Test:
needs: changes
if: ${{ needs.changes.outputs.should_test == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Bazel
uses: bazel-contrib/setup-bazel@0.18.0
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ github.workflow }}
# Share repository cache between workflows.
repository-cache: true
- name: Run all tests
run: bazel test //src/... --test_output=errors
- name: Archive test visualization logs
if: always()
uses: actions/upload-artifact@v4
with:
name: test-visualization-logs
path: |
bazel-testlogs/**/*_viz.json
bazel-bin/**/*_viz.json