Skip to content

Commit

Permalink
Add GitHub action to build and upload firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
devanlai committed Mar 11, 2023
1 parent ca26a01 commit b11c984
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build-firmware.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build Firmware
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
with:
submodules: recursive

- name: Cache Toolchain
id: cache-toolchain
uses: actions/cache@v3
env:
cache-name: cache-toolchain
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/toolchains/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('util/install-toolchain.sh') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: Download toolchain
run: ./util/install-toolchain.sh

- name: Build Firmware
run: make -k all
env:
PREFIX: ~/toolchains/gcc-arm-embedded/bin/arm-none-eabi-

- name: Archive Firmware
uses: actions/upload-artifact@v3
with:
name: firmware-bin
path: build/*.bin

0 comments on commit b11c984

Please sign in to comment.