| name: Build and Test with Bazel |
| permissions: |
| contents: read |
| |
| on: |
| push: |
| branches: |
| - 'main' |
| pull_request: |
| |
| jobs: |
| build: |
| timeout-minutes: 120 |
| strategy: |
| matrix: |
| os: [ubuntu-latest, macos-latest, windows-2019] |
| |
| runs-on: ${{matrix.os}} |
| |
| steps: |
| - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 |
| with: |
| fetch-depth: '0' |
| - name: Download dependencies |
| run: python3 utils/git-sync-deps |
| - name: Mount Bazel cache |
| uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1 |
| with: |
| path: ~/.bazel/cache |
| key: bazel-cache-${{ runner.os }} |
| - name: Build All |
| run: bazel --output_user_root=~/.bazel/cache build //... |
| - name: Test All |
| run: bazel --output_user_root=~/.bazel/cache test //... |