Some fixes for OpenOCD and Asterix #78
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
ARM_GNU_TOOLCHAIN_VERSION: 14.2.rel1 | |
EM_VERSION: 4.0.1 | |
EM_CACHE_FOLDER: 'emsdk-cache' | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
board: ["snowy_bb2", "spalding_bb2", "silk_bb2", "asterix_evt1"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Setup emsdk cache | |
id: cache-emsdk | |
uses: actions/cache@v2 | |
with: | |
path: ${{env.EM_CACHE_FOLDER}} | |
key: emsdk-${{env.EM_VERSION}}-${{ runner.os }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.13" | |
- name: Set up environment | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y gettext gcc-multilib | |
pip install -r requirements-linux.txt | |
pip install -e \ | |
python_libs/pblprog \ | |
python_libs/pebble-commander \ | |
python_libs/pulse2 \ | |
python_libs/pebble-loghash | |
wget --no-verbose "https://developer.arm.com/-/media/Files/downloads/gnu/${ARM_GNU_TOOLCHAIN_VERSION}/binrel/arm-gnu-toolchain-${ARM_GNU_TOOLCHAIN_VERSION}-x86_64-arm-none-eabi.tar.xz" | |
sudo tar xf arm-gnu-toolchain-${ARM_GNU_TOOLCHAIN_VERSION}-x86_64-arm-none-eabi.tar.xz -C /opt | |
echo "/opt/arm-gnu-toolchain-${ARM_GNU_TOOLCHAIN_VERSION}-x86_64-arm-none-eabi/bin" >> $GITHUB_PATH | |
- uses: mymindstorm/setup-emsdk@v14 | |
with: | |
version: ${{env.EM_VERSION}} | |
actions-cache-folder: ${{env.EM_CACHE_FOLDER}} | |
- name: Configure | |
run: ./waf configure --board ${{ matrix.board }} | |
- name: Build FW | |
run: ./waf build | |
- name: Build recovery FW | |
if: ${{ matrix.board == 'asterix_evt1' }} | |
run: ./waf build_prf | |
- name: Store firmware images | |
uses: actions/upload-artifact@v4 | |
with: | |
name: firmware-${{ matrix.board }} | |
path: | | |
build/**/*.elf | |
build/**/*.hex | |
build/**/*.bin | |
build/**/*.map | |
build/**/*.pbpack | |
- name: Configure (QEMU) | |
if: ${{ matrix.board != 'asterix_evt1' }} | |
run: ./waf clean configure --board ${{ matrix.board }} --qemu | |
- name: Build FW (QEMU) | |
if: ${{ matrix.board != 'asterix_evt1' }} | |
run: ./waf build qemu_image_micro qemu_image_spi | |
- name: Store firmware images (QEMU) | |
if: ${{ matrix.board != 'asterix_evt1' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: firmware-${{ matrix.board }}-qemu | |
path: | | |
build/qemu_micro_flash.bin | |
build/qemu_spi_flash.bin |