[Cleanup] remove old script and migrate .elf path to bazel output #437
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |