mirror of
https://github.com/oltaco/Adafruit_nRF52_Bootloader_OTAFIX.git
synced 2026-04-15 06:25:41 +00:00
123 lines
3.5 KiB
YAML
123 lines
3.5 KiB
YAML
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'
|
|
- 'ledglasses_nrf52840'
|
|
# Other Makers (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_nrf52833'
|
|
- 'bluemicro_nrf52840'
|
|
- 'challenger_840_ble'
|
|
- 'ebyte_e104_bt5032a'
|
|
- 'ebyte_e73_tbb'
|
|
- 'electronut_labs_papyr'
|
|
- 'ikigaisense_vita'
|
|
- 'm60_keyboard'
|
|
- 'mdk_nrf52840_dongle'
|
|
- 'mikoto'
|
|
- 'nice_nano'
|
|
- 'nrf52840_bboard'
|
|
- 'nrf52840_m2'
|
|
- 'ohs2020_badge'
|
|
- 'particle_argon'
|
|
- 'particle_boron'
|
|
- 'particle_xenon'
|
|
- 'pca10056'
|
|
- 'pca10059'
|
|
- 'pca10100'
|
|
- 'pitaya_go'
|
|
- 'raytac_mdbt50q_db_40'
|
|
- 'raytac_mdbt50q_rx'
|
|
- 'sparkfun_nrf52840_micromod'
|
|
- 'waveshare_nrf52840_eval'
|
|
|
|
steps:
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v3
|
|
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: true
|
|
|
|
- name: Checkout linkermap
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: hathach/linkermap
|
|
path: linkermap
|
|
|
|
- name: Set Toolchain URL
|
|
run: echo >> $GITHUB_ENV TOOLCHAIN_URL=https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack/releases/download/v10.2.1-1.1/xpack-arm-none-eabi-gcc-10.2.1-1.1-linux-x64.tar.gz
|
|
|
|
- name: Cache Toolchain
|
|
uses: actions/cache@v3
|
|
id: cache-toolchain
|
|
with:
|
|
path: ~/cache/
|
|
key: ${{ runner.os }}-22-05-17-${{ env.TOOLCHAIN_URL }}
|
|
|
|
- name: Install Toolchain
|
|
if: steps.cache-toolchain.outputs.cache-hit != 'true'
|
|
run: |
|
|
mkdir -p ~/cache/toolchain
|
|
wget --progress=dot:mega $TOOLCHAIN_URL -O toolchain.tar.gz
|
|
tar -C ~/cache/toolchain -xaf toolchain.tar.gz
|
|
|
|
- name: Set Toolchain Path
|
|
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
|
|
|
|
- name: Install Tools
|
|
run: |
|
|
pip3 install adafruit-nrfutil uritemplate requests intelhex
|
|
pip3 install linkermap/
|
|
|
|
- name: Build
|
|
run: |
|
|
make BOARD=${{ matrix.board }} all
|
|
make BOARD=${{ matrix.board }} copy-artifact
|
|
|
|
- name: Linker Map
|
|
run: make BOARD=${{ matrix.board }} linkermap
|
|
|
|
- uses: actions/upload-artifact@v3
|
|
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
|