-
Notifications
You must be signed in to change notification settings - Fork 372
214 lines (211 loc) · 7.31 KB
/
macos-bazel.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
name: macOS-Bazel-Builds
on:
workflow_call:
inputs:
checkout-ref:
required: true
description: "The ref we want to compile"
type: string
bazel-cache-mode:
required: true
description: "READ_WRITE or READ_ONLY"
type: string
execute-integration-tests:
required: true
description: "Integration tests require credentials."
type: boolean
permissions:
contents: read
jobs:
bazel:
name: bazel + ${{ matrix.os }} + ${{ matrix.shard }}
runs-on: ${{ matrix.os }}
permissions:
contents: 'read'
id-token: 'write'
strategy:
# Continue other builds even if one fails
fail-fast: false
matrix:
os: [ macos-14 ]
shard:
- Core
- Bigtable
- Pub/Sub
- Spanner
- Storage
- Compute
- AIPlatform
- Shard1
- Shard2
- Other
include:
- shard: Core
targets:
- //google/cloud:all
# - //generator/... # Does not build on macOS
# - //docfx/... # Does not build on macOS
- +//examples/...
- shard: Bigtable
targets:
- //google/cloud/bigtable/...
- shard: Pub/Sub
targets:
- //google/cloud/pubsub/...
- +//google/cloud/pubsublite/...
- shard: Spanner
targets:
- //google/cloud/spanner/...
- shard: Storage
targets:
- //google/cloud/storage/...
# Include the top-level examples because they require the libs anyway.
- shard: Compute
targets:
- //google/cloud/compute/...
- shard: AIPlatform
targets:
- //google/cloud/aiplatform/...
- shard: Shard1
targets:
# Run this:
#
# git grep -l 'class.*Client' 'google/cloud/**_client.h' |
# egrep -v "(bigtable/|internal/|pubsub/|spanner/|storage/)" |
# cut -f -3 -d/| sort | uniq -c | sort -n |
# awk '{ s += $1; print s, $0}'
#
# and pick the approximate midpoint
#
# Also, it is a good idea to keep `sql` and `bigquerycontrol`
# together, as they both require our internal REST libraries.
- //google/cloud/bigquerycontrol/...
- +//google/cloud/appengine/...
- +//google/cloud/dataproc/...
- +//google/cloud/monitoring/...
- +//google/cloud/retail/...
- +//google/cloud/discoveryengine/...
- +//google/cloud/sql/...
- +//google/cloud/dialogflow_cx/...
- +//google/cloud/dialogflow_es/...
- shard: Shard2
targets:
- //google/cloud/networkconnectivity/...
- +//google/cloud/networkservices/...
- +//google/cloud/policytroubleshooter/...
- +//google/cloud/profiler/...
- +//google/cloud/redis/...
- +//google/cloud/securitycenter/...
- +//google/cloud/servicedirectory/...
- +//google/cloud/tpu/...
- +//google/cloud/trace/...
- +//google/cloud/vision/...
- +//google/cloud/workflows/...
- +//google/cloud/beyondcorp/...
- +//google/cloud/billing/...
- +//google/cloud/binaryauthorization/...
- +//google/cloud/gkemulticloud/...
- +//google/cloud/logging/...
- +//google/cloud/notebooks/...
- +//google/cloud/osconfig/...
- +//google/cloud/servicecontrol/...
- +//google/cloud/speech/...
- +//google/cloud/support/...
- +//google/cloud/video/...
- +//google/cloud/datacatalog/...
- +//google/cloud/iam/...
- +//google/cloud/run/...
- +//google/cloud/talent/...
- +//google/cloud/contentwarehouse/...
- +//google/cloud/dataplex/...
- +//google/cloud/kms/...
- +//google/cloud/bigquery/...
- +//google/cloud/resourcemanager/...
- shard: Other
targets:
- //...
# Skip top-level targets (e.g. //:bigtable).
- -//:all
# From Core
- -//generator/...
- -//docfx/...
- -//google/cloud:all
- -//examples/...
# From Bigtable
- -//google/cloud/bigtable/...
# From Pub/Sub
- -//google/cloud/pubsub/...
- -//google/cloud/pubsublite/...
# From Spanner
- -//google/cloud/spanner/...
# From Storage
- -//google/cloud/storage/...
# From Compute
- -//google/cloud/compute/...
# From AIPlatform
- -//google/cloud/aiplatform/...
# From Shard1
- -//google/cloud/appengine/...
- -//google/cloud/dataproc/...
- -//google/cloud/monitoring/...
- -//google/cloud/retail/...
- -//google/cloud/discoveryengine/...
- -//google/cloud/sql/...
- -//google/cloud/dialogflow_cx/...
- -//google/cloud/dialogflow_es/...
# From Shard2
- -//google/cloud/networkconnectivity/...
- -//google/cloud/networkservices/...
- -//google/cloud/policytroubleshooter/...
- -//google/cloud/profiler/...
- -//google/cloud/redis/...
- -//google/cloud/securitycenter/...
- -//google/cloud/servicedirectory/...
- -//google/cloud/tpu/...
- -//google/cloud/trace/...
- -//google/cloud/vision/...
- -//google/cloud/workflows/...
- -//google/cloud/beyondcorp/...
- -//google/cloud/billing/...
- -//google/cloud/binaryauthorization/...
- -//google/cloud/gkemulticloud/...
- -//google/cloud/logging/...
- -//google/cloud/notebooks/...
- -//google/cloud/osconfig/...
- -//google/cloud/servicecontrol/...
- -//google/cloud/speech/...
- -//google/cloud/support/...
- -//google/cloud/video/...
- -//google/cloud/datacatalog/...
- -//google/cloud/iam/...
- -//google/cloud/run/...
- -//google/cloud/talent/...
- -//google/cloud/contentwarehouse/...
- -//google/cloud/dataplex/...
- -//google/cloud/kms/...
- -//google/cloud/bigquery/...
- -//google/cloud/bigquerycontrol/...
- -//google/cloud/resourcemanager/...
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.checkout-ref }}
- uses: google-github-actions/auth@v2
if: ${{ inputs.bazel-cache-mode == 'READ_WRITE' }}
with:
create_credentials_file: true
credentials_json: ${{ secrets.BUILD_CACHE_KEY }}
- name: Install bash >= 5.x
run: brew install bash
- name: Pre Tests Disk Space
run: df -m
- name: Build google-cloud-cpp
run: |
export BAZEL_REMOTE_CACHE_RW_MODE=${{ inputs.bazel-cache-mode }}
export EXECUTE_INTEGRATION_TESTS=${{ inputs.execute-integration-tests }}
ci/gha/builds/macos-bazel.sh ${{ join(matrix.targets, ' ') }}
- name: Post Tests Disk Space
run: df -m
env:
BAZEL_REMOTE_CACHE: https://storage.googleapis.com/cloud-cpp-community-gha-cache/bazel-cache/${{ matrix.os }}
GHA_TEST_BUCKET: "gcs-grpc-team-cloud-cpp-testing-bucket"