-
-
Notifications
You must be signed in to change notification settings - Fork 45
52 lines (45 loc) · 1.52 KB
/
utilities-tests.yaml
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
name: Test Utilities
on:
push:
branches:
- main
pull_request:
jobs:
test:
name: "Test Utilities (bazel ${{ matrix.bazel-version }} on ${{ matrix.os }})"
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
matrix:
os:
- ubuntu-20.04
- windows-2019
bazel-version:
# NOTE: read from .bazelversion so that we don't randomly break our
# ci due to latest bazel version change
- .bazelversion
- 6.5.0
- 5.4.1
env:
USE_BAZEL_VERSION: ${{ matrix.bazel-version }}
steps:
- uses: actions/checkout@v4
# conditionally override USE_BAZEL_VERSION
- run: if [ "${{ matrix.bazel-version }}" = ".bazelversion" ]; then echo "USE_BAZEL_VERSION=$(cat .bazelversion)" >> $GITHUB_ENV; fi
if: ${{ !startsWith(matrix.os, 'windows') }}
- run: if ("${{ matrix.bazel-version }}" -eq ".bazelversion") { echo "USE_BAZEL_VERSION=$(cat .bazelversion)" >> $env:GITHUB_ENV }
if: ${{ startsWith(matrix.os, 'windows') }}
- uses: bazelbuild/setup-bazelisk@v3
- name: Mount bazel cache
if: ${{ !startsWith(matrix.os, 'windows') }}
uses: actions/cache@v4
with:
path: ~/.cache/bazel
key: bazel-${{ matrix.os }}-${{ matrix.bazel-version }}
- uses: Jimver/[email protected]
with:
cuda: 11.6.2
sub-packages: '["cudart"]'
method: network
- run: bazelisk test -- //tests/...
- run: bazelisk shutdown