forked from adafruit/Adafruit_nRF52_Bootloader
-
Notifications
You must be signed in to change notification settings - Fork 4
179 lines (169 loc) · 5.54 KB
/
githubci.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
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
#name: Build
#
#on:
# pull_request:
# push:
# repository_dispatch:
# release:
# types:
# - created
#
#jobs:
# build:
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# board:
# # Adafruit Boards
# - 'circuitplayground_nrf52840'
# - 'clue_nrf52840'
# - 'feather_nrf52832'
# - 'feather_nrf52840_express'
# - 'feather_nrf52840_sense'
# - 'itsybitsy_nrf52840_express'
# - 'metro_nrf52840_express'
# # Alphabetical order
# - 'adm_b_nrf52840_1'
# - 'ae_bl652_bo'
# - 'aramcon_badge_2019'
# - 'aramcon2_badge'
# - 'arcade_feather_nrf52840_express'
# - 'arduino_nano_33_ble'
# - 'bast_ble'
# - 'bluemicro_nrf52840'
# - 'ebyte_e104_bt5032a'
# - 'ebyte_e73_tbb'
# - 'electronut_labs_papyr'
# - 'ikigaisense_vita'
# - 'm60_keyboard'
# - 'mdk_nrf52840_dongle'
# - 'nice_nano'
# - 'nrf52840_m2'
# - 'ohs2020_badge'
# - 'particle_argon'
# - 'particle_boron'
# - 'particle_xenon'
# - 'pca10056'
# - 'pca10059'
# - 'pca10100'
# - 'pitaya_go'
# - 'raytac_mdbt50q_rx'
# - 'sparkfun_nrf52840_micromod'
# - 'waveshare_nrf52840_eval'
#
# steps:
# - name: Setup Python
# uses: actions/setup-python@v2
#
# - name: Setup Node.js
# uses: actions/setup-node@v4
#
# - name: Checkout Code
# uses: actions/checkout@v4
# with:
# submodules: true
#
# - name: Install Toolchains
# run: |
# pip3 install adafruit-nrfutil uritemplate requests intelhex
# npm install --global xpm
# # 9.3.1-1.2.1 is xpack modified version which significantly increased compiled size to 6-7KB and cause flash overflow.
# # Skip this version for now, we will try again with next official release from ARM
# xpm install --global @xpack-dev-tools/[email protected]
# echo `echo $HOME/.local/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/*/.content/bin` >> $GITHUB_PATH
#
# - name: Build
# run: |
# make BOARD=${{ matrix.board }} all
# make BOARD=${{ matrix.board }} copy-artifact
#
# - uses: actions/upload-artifact@v4
# with:
# name: ${{ matrix.board }}
# path: _bin/${{ matrix.board }}
#
# - name: Create Release Asset
# if: ${{ github.event_name == 'release' }}
# run: zip -jr ${{ matrix.board }}_bootloader-${{ github.event.release.tag_name }}.zip _bin/${{ matrix.board }}
#
# - name: Upload Release Asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# if: ${{ github.event_name == 'release' }}
# with:
# upload_url: ${{ github.event.release.upload_url }}
# asset_path: ${{ matrix.board }}_bootloader-${{ github.event.release.tag_name }}.zip
# asset_name: ${{ matrix.board }}_bootloader-${{ github.event.release.tag_name }}.zip
# asset_content_type: application/zip
#
# - name: Upload Release Asset for Self-Update
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# if: ${{ github.event_name == 'release' }}
# with:
# upload_url: ${{ github.event.release.upload_url }}
# asset_path: _bin/${{ matrix.board }}/update-${{ matrix.board }}_bootloader-${{ github.event.release.tag_name }}_nosd.uf2
# asset_name: update-${{ matrix.board }}_bootloader-${{ github.event.release.tag_name }}_nosd.uf2
# asset_content_type: application/x-binary
name: Build
on:
pull_request:
push:
repository_dispatch:
release:
types:
- created
jobs:
set-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set matrix
id: set-matrix
working-directory: src/boards
run: |
MATRIX_JSON=$(ls -d */ | sed 's/\/$//' | jq -R -s -c 'split("\n")[:-1]')
echo "matrix=$MATRIX_JSON"
echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT
build:
needs: set-matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board: ${{ fromJSON(needs.set-matrix.outputs.matrix) }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Install ARM GCC
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '12.3.Rel1'
- name: Install Tools
run: |
pip3 install adafruit-nrfutil uritemplate requests intelhex setuptools
- name: Build
run: |
make BOARD=${{ matrix.board }} all
make BOARD=${{ matrix.board }} copy-artifact
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.board }}
path: _bin/${{ matrix.board }}
- name: Upload Release Asset
uses: softprops/action-gh-release@v1
if: ${{ github.event_name == 'release' }}
with:
files: |
_bin/${{ matrix.board }}/${{ matrix.board }}_bootloader-*.zip
_bin/${{ matrix.board }}/${{ matrix.board }}_bootloader-*.hex
_bin/${{ matrix.board }}/update-${{ matrix.board }}_bootloader-*.uf2