File: bazel.yml

package info (click to toggle)
spirv-tools 2026.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 28,900 kB
  • sloc: cpp: 477,281; javascript: 5,908; python: 3,326; ansic: 488; sh: 450; ruby: 88; makefile: 18; lisp: 9
file content (59 lines) | stat: -rw-r--r-- 1,894 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Build and Test with Bazel
permissions:
  contents: read

on:
  push:
    branches:
      - 'main'
  pull_request:
    types: [opened, synchronize, reopened, unlabeled]

jobs:
  build:
    if: github.event.action != 'unlabeled' || github.event.label.name == 'kokoro:run'
    timeout-minutes: 120
    strategy:
      matrix:
        os: [ubuntu-latest, windows-2025]

    runs-on: ${{matrix.os}}

    steps:
      - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
        with:
          fetch-depth: '0'
      - name: Download dependencies
        run: python3 utils/git-sync-deps
      - name: Mount Bazel cache
        uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.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 --test_output=errors //...

  # iOS is 10x expensive to run on GitHub machines, so only run if we know something else passed
  # The steps are unfortunately duplicated because github actions requires 2 jobs for a dependency
  build-macos:
    needs: build
    timeout-minutes: 120
    runs-on: macos-latest

    steps:
      - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
        with:
          fetch-depth: '0'
      - name: Download dependencies
        run: python3 utils/git-sync-deps
      - name: Mount Bazel cache
        uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.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 --test_output=errors //...