-
Notifications
You must be signed in to change notification settings - Fork 13
200 lines (174 loc) · 5.4 KB
/
Copy pathmain.yml
File metadata and controls
200 lines (174 loc) · 5.4 KB
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
name: CI
on:
push:
branches:
- "main"
pull_request:
schedule:
- cron: '0 12 * * *' # daily at 12:00 UTC
# Cancel pending jobs on push.
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-concurrency-to-cancel-any-in-progress-job-or-run
concurrency:
group: ${{ github.workflow }}.${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# Recommended here: https://github.com/bazelbuild/bazelisk/issues/88#issuecomment-625178467
env:
BAZELISK_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPAL_RPC_CREDENTIALS: ${{ secrets.OPAL_RPC_CREDENTIALS }}
jobs:
macos-test-matrix:
runs-on:
- self-hosted
- "os=macos"
- "arch=arm64"
- "os_distribution=tahoe"
- "os_version=26"
- "revision=05f66c20d1c4f89119e612355c71ba44ae5d19a9"
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
test_package:
- cpp
- csharp
- docker
- genrules
- go
- ios
- java
- kotlin
- perl
- scala
- swift
- typescript
execution_type: [remote, local]
include:
- arch: arm64
- os: macos
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd"
- name: Set up authentication
shell: bash
run: cp infra/bazelrc .bazelrc.user
- name: Generate python requirements lock
shell: bash
run: bazel run //python:requirements.update
- name: Build and test
env:
ARCH: ${{ matrix.arch }}
OS: ${{ matrix.os }}
EXECUTION_TYPE: ${{ matrix.execution_type }}
APPLE_SDK_VERSION_OVERRIDE: 26.5
run: python3 infra/test-all.py --package=${{ matrix.test_package }}
linux-test-matrix:
runs-on:
- self-hosted
- "os=linux"
- "arch=x64"
- "engflow-bento-name=example-gh-x64"
- "engflow-cluster=glass"
- "engflow-job-name=linux-test-matrix-${{matrix.execution_type}}"
- "engflow-job-type=${{github.event_name}}-${{github.ref_name}}"
- "engflow-run-id=${{ github.run_id }}"
- "engflow-bento-allow-save=false"
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
test_package:
- cpp
- csharp
- docker
- genrules
- go
- ios
- java
- kotlin
- perl
- scala
- swift
- typescript
execution_type: [remote, local]
include:
- arch: x64
- os: linux
# Override remote ios tests to use macos/arm64 in the remote executor.
- test_package: ios
execution_type: remote
arch: arm64
os: macos
exclude:
# Local ios tests are not supported on linux
- test_package: ios
execution_type: local
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd"
- name: Set up authentication
shell: bash
run: cp infra/bazelrc .bazelrc.user
- name: Generate python requirements lock
shell: bash
run: bazel run //python:requirements.update
- name: Build and test
env:
ARCH: ${{ matrix.arch }}
OS: ${{ matrix.os }}
EXECUTION_TYPE: ${{ matrix.execution_type }}
run: python3 infra/test-all.py --package=${{ matrix.test_package }}
bento-snapshot:
runs-on:
- self-hosted
- "os=linux"
- "arch=x64"
- "remote_execution=true"
- "engflow-bento-name=example-gh-x64"
- "engflow-cluster=glass"
- "engflow-job-name=bento-snapshot"
- "engflow-job-type=${{github.event_name}}-${{github.ref_name}}"
- "engflow-run-id=${{ github.run_id }}"
# To avoid a race condition, among all the jobs that use the same Bento in the same repo, only
# one should specify "engflow-bento-allow-save=true".
- "engflow-bento-allow-save=true"
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
test_package: [cpp]
execution_type: [remote]
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd"
- name: Set up authentication
shell: bash
run: cp infra/bazelrc .bazelrc.user
- name: Generate python requirements lock
shell: bash
run: bazel run //python:requirements.update
- name: Build and test
env:
ARCH: x64
OS: linux
EXECUTION_TYPE: ${{ matrix.execution_type }}
run: python3 infra/test-all.py --package=${{ matrix.test_package }}
buck2-test:
runs-on:
- self-hosted
- "os=linux"
- "arch=x64"
- "engflow-bento-name=example-gh-buck2-x64"
- "engflow-cluster=glass"
- "engflow-job-name=ci-runners-test-matrix"
- "engflow-job-type=${{github.event_name}}-${{github.ref_name}}"
- "engflow-run-id=${{ github.run_id }}"
timeout-minutes: 10
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd"
- name: Set up Buck2 binary
shell: bash
run: infra/setup-buck2.sh
- name: Set up authentication
shell: bash
run: infra/auth-buck2.sh
- name: Build and test
shell: bash
run: infra/test-buck2.sh