-
Notifications
You must be signed in to change notification settings - Fork 3.9k
195 lines (195 loc) · 7.89 KB
/
experimental-github-actions-testing.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
name: EXPERIMENTAL GitHub actions testing
on:
pull_request:
types: [ opened, reopened, synchronize, edited ]
branches: [ master ]
concurrency:
group: ${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
acceptance:
runs-on: [self-hosted, basic_big_runner_group]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- run: ./build/github/get-engflow-keys.sh
- run: ./build/github/prepare-summarize-build.sh
- name: run acceptance tests
run: ./build/github/acceptance-test.sh
- name: upload build results
run: ./build/github/summarize-build.sh bes.bin
if: always()
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: acceptance artifacts
path: artifacts
- name: clean up
run: ./build/github/cleanup-engflow-keys.sh
if: always()
check_generated_code:
runs-on: [self-hosted, basic_runner_group]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- run: ./build/github/get-engflow-keys.sh
- name: check generated code
run: ./build/github/check-generated-code.sh
- name: clean up
run: ./build/github/cleanup-engflow-keys.sh
if: always()
docker_image_amd64:
runs-on: [self-hosted, basic_runner_group]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- run: ./build/github/get-engflow-keys.sh
- run: ./build/github/prepare-summarize-build.sh
- name: run docker tests
run: ./build/github/docker-image.sh amd64
- name: upload build results
run: ./build/github/summarize-build.sh bes.bin
if: always()
- name: clean up
run: ./build/github/cleanup-engflow-keys.sh
if: always()
examples_orms:
runs-on: [self-hosted, basic_runner_group_fips]
steps:
- uses: actions/checkout@v4
with:
path: cockroach
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/checkout@v4
with:
path: examples-orms
repository: cockroachdb/examples-orms
ref: 876b2d52ae2b63aa9cc1741c8d189ff0b66ab0d7
- run: ./cockroach/build/github/get-engflow-keys.sh
- name: run tests
run: ./cockroach/build/github/examples-orms.sh
- name: clean up
run: ./cockroach/build/github/cleanup-engflow-keys.sh
if: always()
lint:
runs-on: [self-hosted, basic_big_runner_group]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
submodules: true
- run: ./build/github/get-engflow-keys.sh
- run: ./build/github/prepare-summarize-build.sh
- name: run lint tests
run: ./build/github/lint.sh
- name: upload build results
run: ./build/github/summarize-build.sh bes.bin
if: always()
- name: clean up
run: ./build/github/cleanup-engflow-keys.sh
if: always()
local_roachtest:
runs-on: [self-hosted, basic_runner_group]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
submodules: true
- run: ./build/github/get-engflow-keys.sh
- name: run local roachtests
run: ./build/github/local-roachtest.sh crosslinux
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: local roachtest artifacts
path: artifacts
- name: clean up
run: ./build/github/cleanup-engflow-keys.sh
if: always()
local_roachtest_fips:
runs-on: [self-hosted, basic_runner_group_fips]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
submodules: true
- run: ./build/github/get-engflow-keys.sh
- name: run local roachtests
run: ./build/github/local-roachtest.sh crosslinuxfips
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: local roachtest (FIPS) artifacts
path: artifacts
- name: clean up
run: ./build/github/cleanup-engflow-keys.sh
if: always()
macos_amd64_build:
runs-on: [self-hosted, basic_runner_group]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- run: ./build/github/get-engflow-keys.sh
- run: ./build/github/prepare-summarize-build.sh
- name: build
run: bazel build //pkg/cmd/cockroach //pkg/cmd/cockroach-short //pkg/cmd/cockroach-sql //pkg/cmd/cockroach-oss //pkg/cmd/roachprod //pkg/cmd/workload //pkg/cmd/dev //c-deps:libgeos --config crossmacos --jobs 100 --remote_download_minimal --bes_keywords=github_pr_number=${{ github.event.pull_request.number }} --bes_keywords build-macos-amd64 --build_event_binary_file=bes.bin $(./build/github/engflow-args.sh)
- name: upload build results
run: ./build/github/summarize-build.sh bes.bin
if: always()
- name: clean up
run: ./build/github/cleanup-engflow-keys.sh
if: always()
macos_arm64_build:
runs-on: [self-hosted, basic_runner_group]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- run: ./build/github/get-engflow-keys.sh
- run: ./build/github/prepare-summarize-build.sh
- name: build
run: bazel build //pkg/cmd/cockroach //pkg/cmd/cockroach-short //pkg/cmd/cockroach-sql //pkg/cmd/cockroach-oss //pkg/cmd/roachprod //pkg/cmd/workload //pkg/cmd/dev //c-deps:libgeos --config crossmacosarm --jobs 100 --remote_download_minimal --bes_keywords=github_pr_number=${{ github.event.pull_request.number }} --bes_keywords build-macos-arm64 --build_event_binary_file=bes.bin $(./build/github/engflow-args.sh)
- name: upload build results
run: ./build/github/summarize-build.sh bes.bin
if: always()
- name: clean up
run: ./build/github/cleanup-engflow-keys.sh
if: always()
unit_tests:
runs-on: [self-hosted, basic_runner_group]
steps:
- uses: actions/checkout@v4
with:
# By default, checkout merges the PR into the current master.
# Instead, we want to check out the PR as is.
ref: ${{ github.event.pull_request.head.sha }}
- run: ./build/github/get-engflow-keys.sh
- run: ./build/github/prepare-summarize-build.sh
- name: run tests
run: bazel test //pkg:all_tests //pkg/ui:lint //pkg/ui:test --config crosslinux --jobs 300 --remote_download_minimal --bes_keywords=github_pr_number=${{ github.event.pull_request.number }} --bes_keywords ci-unit-test --config=use_ci_timeouts --build_event_binary_file=bes.bin $(./build/github/engflow-args.sh)
- name: upload test results
run: ./build/github/summarize-build.sh bes.bin
if: always()
- name: clean up
run: ./build/github/cleanup-engflow-keys.sh
if: always()
windows_build:
runs-on: [self-hosted, basic_runner_group]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- run: ./build/github/get-engflow-keys.sh
- run: ./build/github/prepare-summarize-build.sh
- name: build
run: bazel build //pkg/cmd/cockroach //pkg/cmd/cockroach-short //pkg/cmd/cockroach-sql //pkg/cmd/cockroach-oss --config crosswindows --jobs 100 --remote_download_minimal --bes_keywords=github_pr_number=${{ github.event.pull_request.number }} --bes_keywords build-windows --build_event_binary_file=bes.bin --enable_runfiles $(./build/github/engflow-args.sh)
- name: upload build results
run: ./build/github/summarize-build.sh bes.bin
if: always()
- name: clean up
run: ./build/github/cleanup-engflow-keys.sh
if: always()