-
Notifications
You must be signed in to change notification settings - Fork 3.9k
124 lines (124 loc) · 5.51 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
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:
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()
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()
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()
acceptance:
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 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()