1name: Build and Test with Bazel 2permissions: 3 contents: read 4 5on: 6 push: 7 branches: 8 - 'main' 9 pull_request: 10 11jobs: 12 build: 13 timeout-minutes: 120 14 strategy: 15 matrix: 16 os: [ubuntu-latest, macos-latest, windows-2019] 17 18 runs-on: ${{matrix.os}} 19 20 steps: 21 - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 22 with: 23 fetch-depth: '0' 24 - name: Download dependencies 25 run: python3 utils/git-sync-deps 26 - name: Mount Bazel cache 27 uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 28 with: 29 path: ~/.bazel/cache 30 key: bazel-cache-${{ runner.os }} 31 - name: Build All 32 run: bazel --output_user_root=~/.bazel/cache build //... 33 - name: Test All 34 run: bazel --output_user_root=~/.bazel/cache test //... 35