forked from littlefs-project/littlefs
-
Notifications
You must be signed in to change notification settings - Fork 28
224 lines (191 loc) · 6.96 KB
/
rtthread.yml
File metadata and controls
224 lines (191 loc) · 6.96 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
name: rtthread
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -euo pipefail {0}
jobs:
prepare-master-source:
name: Prepare RT-Thread master source
runs-on: ubuntu-22.04
timeout-minutes: 20
steps:
- name: Install source preparation dependencies
timeout-minutes: 10
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update -qq \
-o Acquire::Retries=5 \
-o Acquire::http::Timeout=30 \
-o Acquire::https::Timeout=30
timeout 8m sudo apt-get install -y --no-install-recommends \
-o Acquire::Retries=5 \
-o Acquire::http::Timeout=30 \
-o Acquire::https::Timeout=30 \
ca-certificates \
git
- name: Clone and pack RT-Thread master source
run: |
mkdir -p _ci/master-source-work _ci/artifacts
for attempt in 1 2 3; do
printf 'cloning RT-Thread master source attempt %s/3\n' "$attempt"
if timeout 12m git clone --depth 1 --branch master \
https://github.com/RT-Thread/rt-thread.git \
_ci/master-source-work/rt-thread; then
break
fi
rm -rf _ci/master-source-work/rt-thread
if [ "$attempt" = 3 ]; then
printf 'failed to clone RT-Thread master source\n' >&2
exit 1
fi
sleep 10
done
git -C _ci/master-source-work/rt-thread rev-parse HEAD \
| tee _ci/artifacts/rt-thread-master.sha
tar -cf _ci/artifacts/rt-thread-master.tar \
-C _ci/master-source-work rt-thread
test -s _ci/artifacts/rt-thread-master.tar
test -s _ci/artifacts/rt-thread-master.sha
- name: Upload RT-Thread master source
uses: actions/upload-artifact@v4
with:
name: rtthread-master-source
path: |
_ci/artifacts/rt-thread-master.tar
_ci/artifacts/rt-thread-master.sha
if-no-files-found: error
test-littlefs-tag:
name: RT-Thread ${{ matrix.profile }}
runs-on: ubuntu-22.04
timeout-minutes: 90
strategy:
fail-fast: false
max-parallel: 6
matrix:
include:
- profile: v4.1.1-v1
rtthread_ref: v4.1.1
dfs_version: v1
bsp: bsp/qemu-vexpress-a9
- profile: v5.0.0-v1
rtthread_ref: v5.0.0
dfs_version: v1
bsp: bsp/qemu-vexpress-a9
- profile: v5.0.1-v1
rtthread_ref: v5.0.1
dfs_version: v1
bsp: bsp/qemu-vexpress-a9
- profile: v5.0.1-v2
rtthread_ref: v5.0.1
dfs_version: v2
bsp: bsp/qemu-vexpress-a9
- profile: v5.0.2-v1
rtthread_ref: v5.0.2
dfs_version: v1
bsp: bsp/qemu-vexpress-a9
- profile: v5.0.2-v2
rtthread_ref: v5.0.2
dfs_version: v2
bsp: bsp/qemu-vexpress-a9
steps:
- name: Checkout littlefs package
uses: actions/checkout@v4
- name: Prepare RT-Thread source cache directory
run: |
mkdir -p "${{ runner.temp }}/rtthread-src-cache/${{ matrix.rtthread_ref }}"
- name: Cache RT-Thread source archive
id: cache-rtthread-source
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/rtthread-src-cache/${{ matrix.rtthread_ref }}
key: ${{ runner.os }}-rtthread-src-${{ matrix.rtthread_ref }}-v1
restore-keys: |
${{ runner.os }}-rtthread-src-${{ matrix.rtthread_ref }}-
- name: Set up RT-Thread littlefs build
uses: ./.github/actions/setup-rtthread-build
with:
rtthread-ref: ${{ matrix.rtthread_ref }}
rtthread-dfs-version: ${{ matrix.dfs_version }}
rtthread-bsp: ${{ matrix.bsp }}
rtthread-source-cache-dir: ${{ runner.temp }}/rtthread-src-cache/${{ matrix.rtthread_ref }}
rtthread-source-cache-read: '1'
- name: Compile and smoke-test littlefs profile
run: |
mkdir -p _ci/logs
log_file="_ci/logs/rtthread-${{ matrix.profile }}.log"
printf 'building RT-Thread %s DFS %s with BSP %s\n' \
"$RTTHREAD_REF" "$RTTHREAD_DFS_VERSION" "$RTTHREAD_BSP"
sh .github/ci/rtthread-littlefs/build.sh 2>&1 | tee "$log_file"
- name: Upload RT-Thread compile logs
if: always()
uses: actions/upload-artifact@v4
with:
name: rtthread-test-logs-${{ matrix.profile }}
path: |
_ci/logs/*.log
_ci/qemu-*.log
if-no-files-found: warn
test-littlefs-master:
name: RT-Thread ${{ matrix.profile }}
needs: prepare-master-source
runs-on: ubuntu-22.04
timeout-minutes: 90
strategy:
fail-fast: false
max-parallel: 2
matrix:
include:
- profile: master-v1
rtthread_ref: master
dfs_version: v1
bsp: bsp/qemu-vexpress-a9
- profile: master-v2
rtthread_ref: master
dfs_version: v2
bsp: bsp/qemu-vexpress-a9
steps:
- name: Checkout littlefs package
uses: actions/checkout@v4
- name: Download RT-Thread master source artifact
uses: actions/download-artifact@v4
with:
name: rtthread-master-source
path: ${{ runner.temp }}/rtthread-master-source
- name: Verify RT-Thread master source artifact
run: |
test -s "${{ runner.temp }}/rtthread-master-source/rt-thread-master.tar"
test -s "${{ runner.temp }}/rtthread-master-source/rt-thread-master.sha"
printf 'using RT-Thread master source artifact: '
cat "${{ runner.temp }}/rtthread-master-source/rt-thread-master.sha"
- name: Set up RT-Thread littlefs build
uses: ./.github/actions/setup-rtthread-build
with:
rtthread-ref: ${{ matrix.rtthread_ref }}
rtthread-dfs-version: ${{ matrix.dfs_version }}
rtthread-bsp: ${{ matrix.bsp }}
rtthread-source-archive: ${{ runner.temp }}/rtthread-master-source/rt-thread-master.tar
rtthread-source-cache-read: '0'
- name: Compile and smoke-test littlefs profile
run: |
mkdir -p _ci/logs
log_file="_ci/logs/rtthread-${{ matrix.profile }}.log"
printf 'building RT-Thread %s DFS %s with BSP %s\n' \
"$RTTHREAD_REF" "$RTTHREAD_DFS_VERSION" "$RTTHREAD_BSP"
sh .github/ci/rtthread-littlefs/build.sh 2>&1 | tee "$log_file"
- name: Upload RT-Thread compile logs
if: always()
uses: actions/upload-artifact@v4
with:
name: rtthread-test-logs-${{ matrix.profile }}
path: |
_ci/logs/*.log
_ci/qemu-*.log
if-no-files-found: warn