-
Notifications
You must be signed in to change notification settings - Fork 751
88 lines (82 loc) · 2.31 KB
/
dev.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
name: Dev
on:
pull_request:
types:
- opened
- synchronize
- reopened
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
outputs:
any_src_changed: ${{ steps.src.outputs.any_changed }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check Source File Changes
uses: tj-actions/changed-files@v39
id: src
with:
files_ignore: |
.github/**
**.md
benchmark/**
docker/**
scripts/setup/**
.devcontainer/**
- name: Output Source File Changes
run: |
if [[ "${{ steps.src.outputs.any_changed }}" == "true" ]]; then
echo "these src files changed:" >> $GITHUB_STEP_SUMMARY
for line in ${{ steps.src.outputs.all_changed_files }}; do
echo "- $line" >> $GITHUB_STEP_SUMMARY
done
else
echo "no src file changes detected" >> $GITHUB_STEP_SUMMARY
fi
linux:
needs: changes
if: needs.changes.outputs.any_src_changed == 'true'
uses: ./.github/workflows/reuse.linux.yml
secrets: inherit
with:
build_profile: debug
runner_provider: aws
linux_hive:
needs: changes
if: needs.changes.outputs.any_src_changed == 'true'
uses: ./.github/workflows/reuse.linux.hive.yml
secrets: inherit
with:
build_profile: debug
runner_provider: aws
ready:
if: always()
runs-on: ubuntu-latest
needs:
- changes
- linux
- linux_hive
steps:
- name: Check Ready to Merge
uses: actions/github-script@v7
env:
SRC_CHANGED: ${{ needs.changes.outputs.any_src_changed }}
LINUX_BUILD_RESULT: ${{ needs.linux.result }}
with:
script: |
if (process.env.SRC_CHANGED == 'false') {
core.info('No source file changes detected, skipping');
return;
}
if (process.env.LINUX_BUILD_RESULT == 'success') {
core.info('Linux build succeeded, ready to merge');
return;
}
core.setFailed('Build failed, not ready to merge');