forked from rotorflight/rotorflight-firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (61 loc) · 1.93 KB
/
history.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
name: History
on:
push:
tags:
- 'history/*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 500
- name: Delete tag
run: git push origin :${GITHUB_REF}
- name: Install ARM tools
run: make arm_sdk_install
- name: Set build variables
run: |
echo "GIT_VER=${GITHUB_REF##*/}" >> ${GITHUB_ENV}
echo "GIT_TAG=${GITHUB_REF##refs/tags/}" >> ${GITHUB_ENV}
cat ${GITHUB_ENV}
- name: Machine details
run: |
free
cat /proc/cpuinfo | grep -E '^(processor)|(vendor_id)|(model name)|(cpu MHz)|(cache size)'
- name: Build git history
run: |
testbuild()
{
echo "Building $1"
( nice make TARGET=$1 JFLAG='-j2' || echo '**FAILURE**' ) 2>&1 > $2.$1.out
grep -E -H -i '(warning:)|(error:)' $2.$1.out || true
grep -E -H '( RAM:)|( ITCM_RAM:)|( DTCM_RAM:)|( FLASH1:)|( AXIM_FLASH1:)' $2.$1.out || true
}
N=${GIT_VER%%-*}
M=${GIT_VER##*-}
while [[ $N -lt $M ]]
do
RESULT=$(printf '%04d' $N)
git checkout ${GITHUB_REF}~$N --force --detach
rm -fr obj
testbuild STM32H743 ${RESULT} &
testbuild STM32F745 ${RESULT} &
testbuild STM32F7X2 ${RESULT} &
testbuild STM32F411 ${RESULT} &
testbuild STM32F405 ${RESULT} &
testbuild STM32G47X ${RESULT} &
testbuild MATEKH743 ${RESULT} &
testbuild MATEKF722 ${RESULT} &
testbuild MATEKF411 ${RESULT} &
testbuild MATEKF405 ${RESULT} &
wait
let N+=1
done
! grep -F -H '**FAILURE**' *.out
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: rotorflight-history-${{ env.GIT_VER }}
path: 0*.out