|
| 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 | + |
1 | 10 | name: Component Features - Linux
|
2 | 11 |
|
3 | 12 | on:
|
4 | 13 | workflow_call:
|
| 14 | + workflow_dispatch: |
| 15 | + schedule: |
| 16 | + # At midnight UTC Tue-Sat |
| 17 | + - cron: '0 0 * * 2-6' |
5 | 18 |
|
6 | 19 | jobs:
|
7 | 20 | 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' |
9 | 24 | steps:
|
10 | 25 | - name: (PR comment) Get PR branch
|
11 |
| - if: ${{ github.event_name == 'issue_comment' }} |
| 26 | + if: github.event_name == 'issue_comment' |
12 | 27 | uses: xt0rted/pull-request-comment-branch@v2
|
13 | 28 | id: comment-branch
|
14 | 29 |
|
15 | 30 | - name: (PR comment) Set latest commit status as pending
|
| 31 | + if: github.event_name == 'issue_comment' |
16 | 32 | uses: myrotvorets/[email protected]
|
17 |
| - if: ${{ github.event_name == 'issue_comment' }} |
18 | 33 | with:
|
19 | 34 | sha: ${{ steps.comment-branch.outputs.head_sha }}
|
20 | 35 | token: ${{ secrets.GITHUB_TOKEN }}
|
21 | 36 | context: Component Features - Linux
|
22 | 37 | status: pending
|
23 | 38 |
|
24 | 39 | - name: (PR comment) Checkout PR branch
|
25 |
| - if: ${{ github.event_name == 'issue_comment' }} |
| 40 | + if: github.event_name == 'issue_comment' |
26 | 41 | uses: actions/checkout@v3
|
27 | 42 | with:
|
28 | 43 | ref: ${{ steps.comment-branch.outputs.head_ref }}
|
29 | 44 |
|
30 | 45 | - name: Checkout branch
|
31 |
| - if: ${{ github.event_name != 'issue_comment' }} |
| 46 | + if: github.event_name != 'issue_comment' |
32 | 47 | uses: actions/checkout@v3
|
33 | 48 |
|
34 | 49 | - run: sudo -E bash scripts/environment/bootstrap-ubuntu-20.04.sh
|
|
37 | 52 | - run: make check-component-features
|
38 | 53 |
|
39 | 54 | - name: (PR comment) Set latest commit status as ${{ job.status }}
|
40 |
| - uses: myrotvorets/[email protected] |
41 | 55 | if: always() && github.event_name == 'issue_comment'
|
| 56 | + uses: myrotvorets/[email protected] |
42 | 57 | with:
|
43 | 58 | sha: ${{ steps.comment-branch.outputs.head_sha }}
|
44 | 59 | token: ${{ secrets.GITHUB_TOKEN }}
|
|
0 commit comments