-
Notifications
You must be signed in to change notification settings - Fork 1
151 lines (133 loc) · 4.46 KB
/
checkrun.yml
File metadata and controls
151 lines (133 loc) · 4.46 KB
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
name: Test S3 Listener
on:
schedule:
- cron: "*/5 * * * *" # Runs every 5 minutes (UTC)
workflow_dispatch: # Manual trigger for testing
pull_request:
branches:
- main # Only trigger on test branch
permissions:
contents: read
jobs:
setup:
name: "Setup Test"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup phase
run: |
echo "Setting up test environment..."
sleep 2
echo "Setup complete"
warm_up:
needs: setup
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
machine:
- rb3gen2-core-kit
- qcom-armv8a
distro:
- name: poky-altcfg
- name: qcom-distro
name: warmup-${{ matrix.machine }}/${{ matrix.distro.name }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Simulate build preparation
run: |
echo "Preparing build for ${{ matrix.machine }}/${{ matrix.distro.name }}"
sleep 2
echo "Preparation complete"
- name: Simulate compilation
run: |
echo "Compiling for ${{ matrix.machine }}/${{ matrix.distro.name }}"
sleep 2
echo "Compilation complete"
compile:
needs: warm_up
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
machine:
- iq-615-evk
- iq-8275-evk
- iq-9075-evk
- rb1-core-kit
- sm8750-mtp
distro:
- name: poky-altcfg
- name: qcom-distro
- name: qcom-distro-selinux
include:
- machine: qcom-armv8a
distro:
name: qcom-distro-sota
- machine: iq-9075-evk
distro:
name: performance
name: ${{ matrix.machine }}/${{ matrix.distro.name }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Simulate build process
run: |
echo "Building ${{ matrix.machine }}/${{ matrix.distro.name }}"
sleep 2
echo "Build complete"
- name: Simulate artifact staging
run: |
echo "Staging artifacts for ${{ matrix.machine }}/${{ matrix.distro.name }}"
mkdir -p ./uploads/${{ matrix.distro.name }}/${{ matrix.machine }}
echo "Build artifacts for ${{ matrix.machine }}/${{ matrix.distro.name }}" > ./uploads/${{ matrix.distro.name }}/${{ matrix.machine }}/artifact.txt
echo "Artifacts staged"
sleep 2
- name: Simulate S3 upload
id: s3_upload
run: |
echo "Uploading to S3: ${{ matrix.machine }}/${{ matrix.distro.name }}"
sleep 2
echo "S3 upload complete"
echo "url=https://s3.example.com/builds/${{ github.run_id }}/${{ matrix.distro.name }}/${{ matrix.machine }}" >> $GITHUB_OUTPUT
- name: Save build URL
run: |
BUILDNAME="${{ matrix.machine }}_${{ matrix.distro.name }}"
FILENAME="build-url_${BUILDNAME}"
echo "${{ steps.s3_upload.outputs.url }}" > "${FILENAME}"
echo "Build URL saved: ${FILENAME}"
- name: Upload build URL artifact
uses: actions/upload-artifact@v4
with:
name: build-url_${{ matrix.machine }}_${{ matrix.distro.name }}
path: build-url_${{ matrix.machine }}_${{ matrix.distro.name }}
summary:
needs: compile
runs-on: ubuntu-latest
name: "Generate Summary"
steps:
- name: Download all build URLs
uses: actions/download-artifact@v4
with:
pattern: build-url*
path: urlfiles
merge-multiple: true
- name: Generate summary
run: |
echo "## Test Build Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Machine | Distro | URL |" >> $GITHUB_STEP_SUMMARY
echo "|---------|--------|-----|" >> $GITHUB_STEP_SUMMARY
for file in urlfiles/build-url_*; do
if [ -f "$file" ]; then
filename=$(basename "$file")
# Extract machine and distro from filename: build-url_MACHINE_DISTRO
machine_distro="${filename#build-url_}"
url=$(cat "$file")
echo "| ${machine_distro} | | [Link]($url) |" >> $GITHUB_STEP_SUMMARY
fi
done
sleep 2
echo "Summary generation complete"