-
Notifications
You must be signed in to change notification settings - Fork 372
186 lines (168 loc) · 5.96 KB
/
on_pull_request.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
# Jobs that only run for developers on the `rerun` team.
# - We have to ensure that these jobs _only_ run for PRs inside the `rerun-io` organization
# this is done using the following check, added to every job:
# if: github.event.pull_request.head.repo.owner.login == 'rerun-io'
name: Pull-Request
on:
pull_request:
types:
- opened
- synchronize
# These jobs use fairly short names as they are a prefix in the display hierarchy
jobs:
checks:
name: Checks
if: github.event.pull_request.head.repo.owner.login == 'rerun-io'
uses: ./.github/workflows/reusable_checks.yml
with:
CONCURRENCY: pr-${{ github.event.pull_request.number }}
secrets: inherit
rust-paths-filter:
runs-on: ubuntu-latest
outputs:
rust_changes: ${{ steps.filter.outputs.rust_changes }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || '' }}
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
rust_changes:
- "**/*.rs"
- "**/*.toml"
cpp-paths-filter:
runs-on: ubuntu-latest
outputs:
cpp_changes: ${{ steps.filter.outputs.cpp_changes }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || '' }}
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
cpp_changes:
- '**/*.hpp'
- '**/*.cpp'
- '**/CMakeLists.txt'
- '**/*cmake'
rust-checks:
name: "Rust Checks"
if: github.event.pull_request.head.repo.owner.login == 'rerun-io' && needs.rust-paths-filter.outputs.rust_changes == 'true'
# Wait for the rust-paths-filter to be completed before starting.
needs: rust-paths-filter
uses: ./.github/workflows/reusable_checks_rust.yml
with:
CONCURRENCY: pr-${{ github.event.pull_request.number }}
secrets: inherit
cpp-tests:
name: "C++ tests"
if: needs.cpp-paths-filter.outputs.cpp_changes == 'true'
# Wait for the cpp-paths-filter to be completed before starting.
needs: cpp-paths-filter
uses: ./.github/workflows/reusable_checks_cpp.yml
with:
CONCURRENCY: pr-${{ github.event.pull_request.number }}
FULL: "true"
secrets: inherit
min-wheel-build:
name: "Minimum Wheel Build"
if: github.event.pull_request.head.repo.owner.login == 'rerun-io'
uses: ./.github/workflows/reusable_build_and_upload_wheels.yml
with:
CONCURRENCY: pr-${{ github.event.pull_request.number }}
MODE: "pr"
PLATFORM: linux
WHEEL_ARTIFACT_NAME: "linux-wheel-fast"
secrets: inherit
min-wheel-test:
name: "Minimum Wheel Test"
if: github.event.pull_request.head.repo.owner.login == 'rerun-io'
needs: [min-wheel-build]
uses: ./.github/workflows/reusable_test_wheels.yml
with:
CONCURRENCY: pr-${{ github.event.pull_request.number }}
PLATFORM: linux
WHEEL_ARTIFACT_NAME: "linux-wheel-fast"
secrets: inherit
build-js:
name: "Build JS"
if: github.event.pull_request.head.repo.owner.login == 'rerun-io'
uses: ./.github/workflows/reusable_build_js.yml
with:
CONCURRENCY: pr-${{ github.event.pull_request.number }}
secrets: inherit
build-web:
name: "Build Web"
if: github.event.pull_request.head.repo.owner.login == 'rerun-io'
uses: ./.github/workflows/reusable_build_web.yml
with:
CONCURRENCY: pr-${{ github.event.pull_request.number }}
CHANNEL: main
secrets: inherit
upload-web:
name: "Upload Web"
if: github.event.pull_request.head.repo.owner.login == 'rerun-io'
needs: [build-web]
uses: ./.github/workflows/reusable_upload_web.yml
with:
CONCURRENCY: pr-${{ github.event.pull_request.number }}
PR_NUMBER: ${{ github.event.pull_request.number }}
secrets: inherit
build-examples:
name: "Build Examples"
if: github.event.pull_request.head.repo.owner.login == 'rerun-io'
needs: [min-wheel-build]
uses: ./.github/workflows/reusable_build_examples.yml
with:
CONCURRENCY: pr-${{ github.event.pull_request.number }}
CHANNEL: main
WHEEL_ARTIFACT_NAME: linux-wheel-fast
secrets: inherit
track-sizes:
name: "Track Sizes"
if: github.event.pull_request.head.repo.owner.login == 'rerun-io'
needs: [build-web, build-examples]
uses: ./.github/workflows/reusable_track_size.yml
with:
CONCURRENCY: push-${{ github.ref_name }}
PR_NUMBER: ${{ github.event.pull_request.number }}
secrets: inherit
upload-examples:
name: "Upload Examples"
if: github.event.pull_request.head.repo.owner.login == 'rerun-io'
needs: [build-examples]
uses: ./.github/workflows/reusable_upload_examples.yml
with:
CONCURRENCY: pr-${{ github.event.pull_request.number }}
PR_NUMBER: ${{ github.event.pull_request.number }}
secrets: inherit
run-notebook:
name: "Run Notebook"
if: github.event.pull_request.head.repo.owner.login == 'rerun-io'
needs: [min-wheel-build]
uses: ./.github/workflows/reusable_run_notebook.yml
with:
CONCURRENCY: pr-${{ github.event.pull_request.number }}
WHEEL_ARTIFACT_NAME: linux-wheel-fast
secrets: inherit
save-pr-summary:
name: "Save PR Summary"
if: github.event.pull_request.head.repo.owner.login == 'rerun-io'
needs: [upload-web, run-notebook]
uses: ./.github/workflows/reusable_pr_summary.yml
with:
CONCURRENCY: pr-${{ github.event.pull_request.number }}
PR_NUMBER: ${{ github.event.pull_request.number }}
secrets: inherit
update-pr-body:
name: "Update PR Body"
if: github.event.pull_request.head.repo.owner.login == 'rerun-io'
uses: ./.github/workflows/reusable_update_pr_body.yml
with:
CONCURRENCY: pr-${{ github.event.pull_request.number }}
PR_NUMBER: ${{ github.event.pull_request.number }}
secrets: inherit