Skip to content

Instantly share code, notes, and snippets.

@cibomahto
Created December 4, 2020 16:33
Show Gist options
  • Save cibomahto/e2070791be8915ce53f089225e7814b0 to your computer and use it in GitHub Desktop.
Save cibomahto/e2070791be8915ce53f089225e7814b0 to your computer and use it in GitHub Desktop.
name: Firmware build
on:
push:
branches:
- master
- github_actions
tags:
- '*'
pull_request:
branches:
- master
- github_actions
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
- name: Get prereqs
run: sudo apt-get install gcc git wget make libncurses-dev flex bison gperf python python-pip python-setuptools python-serial python-cryptography python-future python-pyparsing
- name: Install xtensa toolchain
run: |
wget https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz
tar -xzf xtensa-esp32-elf-linux64-1.22.0-80-g6c4433a-5.2.0.tar.gz
echo "${GITHUB_WORKSPACE}/xtensa-esp32-elf/bin" >> $GITHUB_PATH
- name: Install ESP-IDF
run: |
env
git clone -b v3.3.1 --recursive https://github.com/espressif/esp-idf.git esp-idf
python -m pip install --user -r esp-idf/requirements.txt
echo "IDF_PATH=${GITHUB_WORKSPACE}/esp-idf" >> $GITHUB_ENV
- name: Patch ESP-IDF
run: |
cd ${IDF_PATH}
for i in ${GITHUB_WORKSPACE}/src/idf-patches/*.patch; do patch -p1 < $i; done
- name: Build firmware
run: |
cd src
make -j8
- name: Collect shiny things
uses: actions/upload-artifact@v2
with:
name: release
path: |
src/build/app.bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment