Skip to content

Commit e6e776d

Browse files
authored
chore(ci): move component features check out of merge queue (vectordotdev#17773)
Moves the most costly (both $ and time) status check out of the merge queue into a fixed schedule. The workflow can still be run on demand by a PR comment, or from the GHA UI.
1 parent f79947c commit e6e776d

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

.github/workflows/component_features.yml

+21-6
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,49 @@
1+
# Component Features - Linux
2+
#
3+
# Validates that each component feature compiles
4+
#
5+
# Runs on:
6+
# - scheduled UTC midnight Tues-Sat
7+
# - on PR comment (see comment-trigger.yml)
8+
# - on demand from github actions UI
9+
110
name: Component Features - Linux
211

312
on:
413
workflow_call:
14+
workflow_dispatch:
15+
schedule:
16+
# At midnight UTC Tue-Sat
17+
- cron: '0 0 * * 2-6'
518

619
jobs:
720
check-component-features:
8-
runs-on: [linux, ubuntu-20.04-8core]
21+
# use free tier on schedule and 8 core to expedite results on demand invocation
22+
runs-on: ${{ github.event_name == 'schedule' && 'ubuntu-latest' || fromJSON('["linux", "ubuntu-20.04-8core"]') }}
23+
if: github.event_name == 'issue_comment' || github.event_name == 'workflow_dispatch'
924
steps:
1025
- name: (PR comment) Get PR branch
11-
if: ${{ github.event_name == 'issue_comment' }}
26+
if: github.event_name == 'issue_comment'
1227
uses: xt0rted/pull-request-comment-branch@v2
1328
id: comment-branch
1429

1530
- name: (PR comment) Set latest commit status as pending
31+
if: github.event_name == 'issue_comment'
1632
uses: myrotvorets/[email protected]
17-
if: ${{ github.event_name == 'issue_comment' }}
1833
with:
1934
sha: ${{ steps.comment-branch.outputs.head_sha }}
2035
token: ${{ secrets.GITHUB_TOKEN }}
2136
context: Component Features - Linux
2237
status: pending
2338

2439
- name: (PR comment) Checkout PR branch
25-
if: ${{ github.event_name == 'issue_comment' }}
40+
if: github.event_name == 'issue_comment'
2641
uses: actions/checkout@v3
2742
with:
2843
ref: ${{ steps.comment-branch.outputs.head_ref }}
2944

3045
- name: Checkout branch
31-
if: ${{ github.event_name != 'issue_comment' }}
46+
if: github.event_name != 'issue_comment'
3247
uses: actions/checkout@v3
3348

3449
- run: sudo -E bash scripts/environment/bootstrap-ubuntu-20.04.sh
@@ -37,8 +52,8 @@ jobs:
3752
- run: make check-component-features
3853

3954
- name: (PR comment) Set latest commit status as ${{ job.status }}
40-
uses: myrotvorets/[email protected]
4155
if: always() && github.event_name == 'issue_comment'
56+
uses: myrotvorets/[email protected]
4257
with:
4358
sha: ${{ steps.comment-branch.outputs.head_sha }}
4459
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/master_merge_queue.yml

-7
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,6 @@ jobs:
7474
needs: changes
7575
secrets: inherit
7676

77-
check-component-features:
78-
if: needs.changes.outputs.source == 'true'
79-
uses: ./.github/workflows/component_features.yml
80-
needs: changes
81-
secrets: inherit
82-
8377
cross-linux:
8478
# We run cross checks when dependencies change to ensure they still build.
8579
# This helps us avoid adopting dependencies that aren't compatible with other architectures.
@@ -117,7 +111,6 @@ jobs:
117111
- test-misc
118112
- test-environment
119113
- check-msrv
120-
- check-component-features
121114
- cross-linux
122115
- unit-mac
123116
- unit-windows

0 commit comments

Comments
 (0)