Skip to content

Commit 30f08c5

Browse files
authored
try to use most recent workflow file
1 parent d84e22d commit 30f08c5

File tree

1 file changed

+146
-77
lines changed

1 file changed

+146
-77
lines changed

.github/workflows/githubci.yml

Lines changed: 146 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,114 @@
1+
#name: Build
2+
#
3+
#on:
4+
# pull_request:
5+
# push:
6+
# repository_dispatch:
7+
# release:
8+
# types:
9+
# - created
10+
#
11+
#jobs:
12+
# build:
13+
# runs-on: ubuntu-latest
14+
# strategy:
15+
# fail-fast: false
16+
# matrix:
17+
# board:
18+
# # Adafruit Boards
19+
# - 'circuitplayground_nrf52840'
20+
# - 'clue_nrf52840'
21+
# - 'feather_nrf52832'
22+
# - 'feather_nrf52840_express'
23+
# - 'feather_nrf52840_sense'
24+
# - 'itsybitsy_nrf52840_express'
25+
# - 'metro_nrf52840_express'
26+
# # Alphabetical order
27+
# - 'adm_b_nrf52840_1'
28+
# - 'ae_bl652_bo'
29+
# - 'aramcon_badge_2019'
30+
# - 'aramcon2_badge'
31+
# - 'arcade_feather_nrf52840_express'
32+
# - 'arduino_nano_33_ble'
33+
# - 'bast_ble'
34+
# - 'bluemicro_nrf52840'
35+
# - 'ebyte_e104_bt5032a'
36+
# - 'ebyte_e73_tbb'
37+
# - 'electronut_labs_papyr'
38+
# - 'ikigaisense_vita'
39+
# - 'm60_keyboard'
40+
# - 'mdk_nrf52840_dongle'
41+
# - 'nice_nano'
42+
# - 'nrf52840_m2'
43+
# - 'ohs2020_badge'
44+
# - 'particle_argon'
45+
# - 'particle_boron'
46+
# - 'particle_xenon'
47+
# - 'pca10056'
48+
# - 'pca10059'
49+
# - 'pca10100'
50+
# - 'pitaya_go'
51+
# - 'raytac_mdbt50q_rx'
52+
# - 'sparkfun_nrf52840_micromod'
53+
# - 'waveshare_nrf52840_eval'
54+
#
55+
# steps:
56+
# - name: Setup Python
57+
# uses: actions/setup-python@v2
58+
#
59+
# - name: Setup Node.js
60+
# uses: actions/setup-node@v4
61+
#
62+
# - name: Checkout Code
63+
# uses: actions/checkout@v4
64+
# with:
65+
# submodules: true
66+
#
67+
# - name: Install Toolchains
68+
# run: |
69+
# pip3 install adafruit-nrfutil uritemplate requests intelhex
70+
# npm install --global xpm
71+
# # 9.3.1-1.2.1 is xpack modified version which significantly increased compiled size to 6-7KB and cause flash overflow.
72+
# # Skip this version for now, we will try again with next official release from ARM
73+
# xpm install --global @xpack-dev-tools/[email protected]
74+
# echo `echo $HOME/.local/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/*/.content/bin` >> $GITHUB_PATH
75+
#
76+
# - name: Build
77+
# run: |
78+
# make BOARD=${{ matrix.board }} all
79+
# make BOARD=${{ matrix.board }} copy-artifact
80+
#
81+
# - uses: actions/upload-artifact@v4
82+
# with:
83+
# name: ${{ matrix.board }}
84+
# path: _bin/${{ matrix.board }}
85+
#
86+
# - name: Create Release Asset
87+
# if: ${{ github.event_name == 'release' }}
88+
# run: zip -jr ${{ matrix.board }}_bootloader-${{ github.event.release.tag_name }}.zip _bin/${{ matrix.board }}
89+
#
90+
# - name: Upload Release Asset
91+
# uses: actions/upload-release-asset@v1
92+
# env:
93+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94+
# if: ${{ github.event_name == 'release' }}
95+
# with:
96+
# upload_url: ${{ github.event.release.upload_url }}
97+
# asset_path: ${{ matrix.board }}_bootloader-${{ github.event.release.tag_name }}.zip
98+
# asset_name: ${{ matrix.board }}_bootloader-${{ github.event.release.tag_name }}.zip
99+
# asset_content_type: application/zip
100+
#
101+
# - name: Upload Release Asset for Self-Update
102+
# uses: actions/upload-release-asset@v1
103+
# env:
104+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
105+
# if: ${{ github.event_name == 'release' }}
106+
# with:
107+
# upload_url: ${{ github.event.release.upload_url }}
108+
# asset_path: _bin/${{ matrix.board }}/update-${{ matrix.board }}_bootloader-${{ github.event.release.tag_name }}_nosd.uf2
109+
# asset_name: update-${{ matrix.board }}_bootloader-${{ github.event.release.tag_name }}_nosd.uf2
110+
# asset_content_type: application/x-binary
111+
1112
name: Build
2113

3114
on:
@@ -9,102 +120,60 @@ on:
9120
- created
10121

11122
jobs:
123+
set-matrix:
124+
runs-on: ubuntu-latest
125+
outputs:
126+
matrix: ${{ steps.set-matrix.outputs.matrix }}
127+
steps:
128+
- name: Checkout Code
129+
uses: actions/checkout@v4
130+
131+
- name: Set matrix
132+
id: set-matrix
133+
working-directory: src/boards
134+
run: |
135+
MATRIX_JSON=$(ls -d */ | sed 's/\/$//' | jq -R -s -c 'split("\n")[:-1]')
136+
echo "matrix=$MATRIX_JSON"
137+
echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT
138+
12139
build:
140+
needs: set-matrix
13141
runs-on: ubuntu-latest
14142
strategy:
15143
fail-fast: false
16144
matrix:
17-
board:
18-
# Adafruit Boards
19-
- 'circuitplayground_nrf52840'
20-
- 'clue_nrf52840'
21-
- 'feather_nrf52832'
22-
- 'feather_nrf52840_express'
23-
- 'feather_nrf52840_sense'
24-
- 'itsybitsy_nrf52840_express'
25-
- 'metro_nrf52840_express'
26-
# Alphabetical order
27-
- 'adm_b_nrf52840_1'
28-
- 'ae_bl652_bo'
29-
- 'aramcon_badge_2019'
30-
- 'aramcon2_badge'
31-
- 'arcade_feather_nrf52840_express'
32-
- 'arduino_nano_33_ble'
33-
- 'bast_ble'
34-
- 'bluemicro_nrf52840'
35-
- 'ebyte_e104_bt5032a'
36-
- 'ebyte_e73_tbb'
37-
- 'electronut_labs_papyr'
38-
- 'ikigaisense_vita'
39-
- 'm60_keyboard'
40-
- 'mdk_nrf52840_dongle'
41-
- 'nice_nano'
42-
- 'nrf52840_m2'
43-
- 'ohs2020_badge'
44-
- 'particle_argon'
45-
- 'particle_boron'
46-
- 'particle_xenon'
47-
- 'pca10056'
48-
- 'pca10059'
49-
- 'pca10100'
50-
- 'pitaya_go'
51-
- 'raytac_mdbt50q_rx'
52-
- 'sparkfun_nrf52840_micromod'
53-
- 'waveshare_nrf52840_eval'
54-
145+
board: ${{ fromJSON(needs.set-matrix.outputs.matrix) }}
55146
steps:
56-
- name: Setup Python
57-
uses: actions/setup-python@v2
58-
59-
- name: Setup Node.js
60-
uses: actions/setup-node@v4
61-
62147
- name: Checkout Code
63148
uses: actions/checkout@v4
64149
with:
65-
submodules: true
66-
67-
- name: Install Toolchains
150+
fetch-depth: 0
151+
submodules: true
152+
153+
- name: Install ARM GCC
154+
uses: carlosperate/arm-none-eabi-gcc-action@v1
155+
with:
156+
release: '12.3.Rel1'
157+
158+
- name: Install Tools
68159
run: |
69-
pip3 install adafruit-nrfutil uritemplate requests intelhex
70-
npm install --global xpm
71-
# 9.3.1-1.2.1 is xpack modified version which significantly increased compiled size to 6-7KB and cause flash overflow.
72-
# Skip this version for now, we will try again with next official release from ARM
73-
xpm install --global @xpack-dev-tools/[email protected]
74-
echo `echo $HOME/.local/xPacks/@xpack-dev-tools/arm-none-eabi-gcc/*/.content/bin` >> $GITHUB_PATH
75-
160+
pip3 install adafruit-nrfutil uritemplate requests intelhex setuptools
161+
76162
- name: Build
77163
run: |
78164
make BOARD=${{ matrix.board }} all
79165
make BOARD=${{ matrix.board }} copy-artifact
80-
166+
81167
- uses: actions/upload-artifact@v4
82168
with:
83169
name: ${{ matrix.board }}
84170
path: _bin/${{ matrix.board }}
85171

86-
- name: Create Release Asset
87-
if: ${{ github.event_name == 'release' }}
88-
run: zip -jr ${{ matrix.board }}_bootloader-${{ github.event.release.tag_name }}.zip _bin/${{ matrix.board }}
89-
90172
- name: Upload Release Asset
91-
uses: actions/upload-release-asset@v1
92-
env:
93-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94-
if: ${{ github.event_name == 'release' }}
95-
with:
96-
upload_url: ${{ github.event.release.upload_url }}
97-
asset_path: ${{ matrix.board }}_bootloader-${{ github.event.release.tag_name }}.zip
98-
asset_name: ${{ matrix.board }}_bootloader-${{ github.event.release.tag_name }}.zip
99-
asset_content_type: application/zip
100-
101-
- name: Upload Release Asset for Self-Update
102-
uses: actions/upload-release-asset@v1
103-
env:
104-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
173+
uses: softprops/action-gh-release@v1
105174
if: ${{ github.event_name == 'release' }}
106175
with:
107-
upload_url: ${{ github.event.release.upload_url }}
108-
asset_path: _bin/${{ matrix.board }}/update-${{ matrix.board }}_bootloader-${{ github.event.release.tag_name }}_nosd.uf2
109-
asset_name: update-${{ matrix.board }}_bootloader-${{ github.event.release.tag_name }}_nosd.uf2
110-
asset_content_type: application/x-binary
176+
files: |
177+
_bin/${{ matrix.board }}/${{ matrix.board }}_bootloader-*.zip
178+
_bin/${{ matrix.board }}/${{ matrix.board }}_bootloader-*.hex
179+
_bin/${{ matrix.board }}/update-${{ matrix.board }}_bootloader-*.uf2

0 commit comments

Comments
 (0)