forked from vectordotdev/vector
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (53 loc) · 2.15 KB
/
component_features.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
# Component Features - Linux
#
# Validates that each component feature compiles
#
# Runs on:
# - scheduled UTC midnight Tues-Sat
# - on PR comment (see comment-trigger.yml)
# - on demand from github actions UI
name: Component Features - Linux
on:
workflow_call:
workflow_dispatch:
schedule:
# At midnight UTC Tue-Sat
- cron: '0 0 * * 2-6'
jobs:
check-component-features:
# use free tier on schedule and 8 core to expedite results on demand invocation
runs-on: ${{ github.event_name == 'schedule' && 'ubuntu-latest' || fromJSON('["linux", "ubuntu-20.04-8core"]') }}
if: github.event_name == 'issue_comment' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule'
steps:
- name: (PR comment) Get PR branch
if: github.event_name == 'issue_comment'
uses: xt0rted/pull-request-comment-branch@v2
id: comment-branch
- name: (PR comment) Set latest commit status as pending
if: github.event_name == 'issue_comment'
uses: myrotvorets/set-commit-status-action@v2.0.0
with:
sha: ${{ steps.comment-branch.outputs.head_sha }}
token: ${{ secrets.GITHUB_TOKEN }}
context: Component Features - Linux
status: pending
- name: (PR comment) Checkout PR branch
if: github.event_name == 'issue_comment'
uses: actions/checkout@v3
with:
ref: ${{ steps.comment-branch.outputs.head_ref }}
- name: Checkout branch
if: github.event_name != 'issue_comment'
uses: actions/checkout@v3
- run: sudo -E bash scripts/environment/bootstrap-ubuntu-20.04.sh
- run: bash scripts/environment/prepare.sh
- run: echo "::add-matcher::.github/matchers/rust.json"
- run: make check-component-features
- name: (PR comment) Set latest commit status as ${{ job.status }}
if: always() && github.event_name == 'issue_comment'
uses: myrotvorets/set-commit-status-action@v2.0.0
with:
sha: ${{ steps.comment-branch.outputs.head_sha }}
token: ${{ secrets.GITHUB_TOKEN }}
context: Component Features - Linux
status: ${{ job.status }}