-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (112 loc) · 3.1 KB
/
check.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: check
on:
push:
branches: [ main ]
pull_request:
branches: [ "*" ]
types: [synchronize, opened, reopened, edited]
workflow_dispatch:
jobs:
test:
strategy:
fail-fast: false
matrix:
compilation_mode:
- 'fastbuild'
- 'opt'
toolchain:
#- 'gcc12' # GCC12 has missing support for C++23
- 'clang19'
os:
- 'ubuntu-latest'
- 'macos-latest'
feature:
- ''
include:
- compilation_mode: 'fastbuild'
toolchain: 'clang19'
os: 'ubuntu-latest'
feature: 'asan'
- compilation_mode: 'fastbuild'
toolchain: 'clang19'
os: 'ubuntu-latest'
feature: 'tsan'
- compilation_mode: 'fastbuild'
toolchain: 'clang19'
os: 'ubuntu-latest'
feature: 'ubsan'
runs-on: ${{ matrix.os }}
env:
PROFILE: profile-${{ matrix.os }}-${{ matrix.compilation_mode }}-${{ matrix.toolchain }}-${{ matrix.feature }}.gz
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/ci-env-setup
with:
buildbuddy-api-key: ${{ secrets.BUILDBUDDY_API_KEY }}
- run: |
bazel \
test \
--profile=$PROFILE \
--compilation_mode=${{ matrix.compilation_mode }} \
--extra_toolchains=//tools:${{ matrix.toolchain }}_toolchain \
--features=${{ matrix.feature }} \
//...
bazel analyze-profile $PROFILE
- uses: actions/upload-artifact@v4
with:
name: ${{ env.PROFILE }}
path : ${{ env.PROFILE }}
coverage:
runs-on: ubuntu-latest
env:
PROFILE: profile-coverage.gz
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/ci-env-setup
with:
buildbuddy-api-key: ${{ secrets.BUILDBUDDY_API_KEY }}
- run: |
bazel run --profile=$PROFILE \
//tools:coverage
bazel analyze-profile $PROFILE
- uses: actions/upload-artifact@v4
with:
name: ${{ env.PROFILE }}
path : ${{ env.PROFILE }}
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./bazel-out/_coverage/_coverage_report.dat
fail_ci_if_error: true
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/ci-env-setup
with:
buildbuddy-api-key: ${{ secrets.BUILDBUDDY_API_KEY }}
- run: |
bazel run //tools:format.check
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/ci-env-setup
with:
buildbuddy-api-key: ${{ secrets.BUILDBUDDY_API_KEY }}
- run: |
bazel run //tools:lint
# https://emmer.dev/blog/skippable-github-status-checks-aren-t-really-required/
# https://github.com/marketplace/actions/alls-green
all:
runs-on: ubuntu-latest
if: always()
needs:
- test
- coverage
- format
- lint
steps:
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}