-
Notifications
You must be signed in to change notification settings - Fork 178
101 lines (89 loc) · 2.76 KB
/
build_arm.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
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Build ARM
on:
pull_request:
push:
repository_dispatch:
release:
types:
- created
jobs:
# ---------------------------------------
# Build ARM family
# ---------------------------------------
ARM:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board:
# Alphabetical order by family
# lpc55
- 'double_m33_express'
- 'lpcxpresso55s28'
- 'lpcxpresso55s69'
# mimxrt10xx
- 'imxrt1010_evk'
- 'imxrt1015_evk'
- 'imxrt1020_evk'
- 'imxrt1024_evk'
- 'imxrt1040_evk'
- 'imxrt1050_evkb'
- 'imxrt1060_evk'
- 'metro_m7_1011'
- 'metro_m7_1011_sd'
- 'teensy40'
- 'teensy41'
# stm32f3
- 'stm32f303disco'
# stm32f4
- 'feather_stm32f405_express'
- 'stm32f411ve_discovery'
- 'stm32f411ce_blackpill'
- 'stm32f401_blackpill'
- 'sparkfun_stm32_thing_plus'
# stm32l4
- 'swan_r5'
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Checkout common submodules in lib
run: git submodule update --init lib/tinyusb lib/uf2
- name: Install ARM GCC
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '11.2-2022.02'
- name: Find Port
run: |
ENV_PORT=`echo ports/*/boards/${{ matrix.board }}`
ENV_PORT=`dirname $ENV_PORT`
ENV_PORT=`dirname $ENV_PORT`
echo ENV_PORT=$ENV_PORT >> $GITHUB_ENV
echo BIN_PATH=$ENV_PORT/_bin/${{ matrix.board }} >> $GITHUB_ENV
- name: Build
run: |
arm-none-eabi-gcc --version
make -C $ENV_PORT BOARD=${{ matrix.board }} get-deps
make -C $ENV_PORT BOARD=${{ matrix.board }} all self-update copy-artifact
for app in ${{ env.ENV_PORT }}/apps/*/; do if [ $app != 'apps/self_update/' ]; then make -C $app BOARD=${{ matrix.board }} all; fi done
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.board }}
path: ${{ env.BIN_PATH }}
- name: Prepare Release Asset
if: ${{ github.event_name == 'release' }}
run: |
for f in ${{ env.BIN_PATH }}/*; do mv $f ${f%.*}-${{ github.event.release.tag_name }}."${f#*.}"; done
zip -jr tinyuf2-${{ matrix.board }}-${{ github.event.release.tag_name }}.zip ${{ env.BIN_PATH }}
- name: Upload Release Asset
uses: softprops/action-gh-release@v1
if: ${{ github.event_name == 'release' }}
with:
files: |
tinyuf2-${{ matrix.board }}-*.zip
${{ env.BIN_PATH }}/update-tinyuf2-${{ matrix.board }}-*.uf2