-
Notifications
You must be signed in to change notification settings - Fork 324
81 lines (77 loc) · 2.94 KB
/
test.yml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Tests
on:
pull_request:
paths-ignore:
- 'doc/**'
push:
branches:
- main
concurrency:
# Cancel existing builds for the same PR.
# Otherwise, all other builds will be allowed to run through.
group: test.yml-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
fixup:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/fixup.yml
labels:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/labels.yml
test:
strategy:
matrix:
os:
[
{ name : linux, image : ubuntu-20.04 },
{ name : macOS, image : macos-15 },
{ name : windows, image : windows-2022 }
]
config:
[
# Default build: no suffix or additional bazel arguments
{ suffix: '' },
# Debug build
{ suffix: -debug }
]
include:
# Add an Address Sanitizer (ASAN) build on Linux for additional checking.
- os: { name: linux, image: ubuntu-20.04 }
config: { suffix: -asan }
# Windows has a custom non-debug bazel config.
- os: { name : windows, image : windows-2022 }
config: { suffix: '' }
# TODO (later): The custom Windows-debug configuration consistently runs out of disk
# space on CI, disable it for now. Once https://github.com/bazelbuild/bazel/issues/21615
# has been resolved we can likely re-enable it and possibly fold up the custom
# configurations, as we can more easily disable PDB file generation.
# - os: { name : windows, image : windows-2022 }
# config: { suffix: -debug, bazel-args: --config=windows_dbg }
exclude:
# Skip the matrix generated Windows non-debug config to use the one added above.
- os: { name : windows, image : windows-2022 }
config: { suffix: '' }
- os: { name : windows, image : windows-2022 }
config: { suffix: -debug }
# due to resource constraints, exclude the macOS-debug runner for now. linux-debug and
# linux-asan should provide sufficient coverage for building in the debug configuration.
- os: { name : macOS, image : macos-15 }
config: { suffix: -debug }
fail-fast: false
uses: ./.github/workflows/_bazel.yml
with:
image: ${{ matrix.os.image }}
os_name: ${{ matrix.os.name }}
suffix: ${{ matrix.config.suffix }}
extra_bazel_args: "--config=ci-test"
secrets:
BAZEL_CACHE_KEY: ${{ secrets.BAZEL_CACHE_KEY }}
WORKERS_MIRROR_URL: ${{ secrets.WORKERS_MIRROR_URL }}
lint:
uses: ./.github/workflows/_bazel.yml
with:
extra_bazel_args: "--config=lint --config=ci-test"
run_tests: false
secrets:
BAZEL_CACHE_KEY: ${{ secrets.BAZEL_CACHE_KEY }}
WORKERS_MIRROR_URL: ${{ secrets.WORKERS_MIRROR_URL }}