U2F implementation #178
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 Micropython | |
on: | |
pull_request: | |
workflow_dispatch: | |
push: | |
tags: | |
- "v*" | |
env: | |
TARGET: esp32s3 | |
jobs: | |
Build-Firmware: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential python3-pip python3-pillow libusb-1.0-0-dev cmake | |
- name: Check out driver code | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Check out ESP IDF | |
uses: actions/checkout@v2 | |
with: | |
repository: espressif/esp-idf | |
ref: release/v4.4 | |
path: esp-idf | |
submodules: true | |
- name: Install SDK | |
run: | | |
cd esp-idf | |
./install.sh | |
source export.sh | |
python3 -m pip install pillow | |
- name: Patch submodule dependencies | |
run: | | |
./scripts/firstTime.sh | |
- name: Build cross compiler | |
run: | | |
source esp-idf/export.sh | |
cd micropython | |
make -C mpy-cross | |
- name: Link board definition | |
run: | | |
source esp-idf/export.sh | |
cd micropython/ports/esp32/boards | |
ln -sfn ../../../../tildamk6 ./tildamk6 | |
- name: Build firmware | |
run: | | |
source esp-idf/export.sh | |
ln -sfn $GITHUB_WORKSPACE/tildamk6 micropython/ports/esp32/boards/tildamk6 | |
cd micropython/ports/esp32 | |
make submodules BOARD=tildamk6 USER_C_MODULES=$GITHUB_WORKSPACE/drivers/micropython.cmake USER_COMPONENTS=$GITHUB_WORKSPACE/components/tinyusb IOT_SOLUTION_PATH=$GITHUB_WORKSPACE/esp-iot-solution TARGET=esp32s3 | |
make BOARD=tildamk6 USER_C_MODULES=$GITHUB_WORKSPACE/drivers/micropython.cmake USER_COMPONENTS=$GITHUB_WORKSPACE/components/tinyusb $@ IOT_SOLUTION_PATH=$GITHUB_WORKSPACE/esp-iot-solution TARGET=esp32s3 | |
cd ../../.. | |
echo "{\"build\":\"$(git describe --tags --always)\", \"name\":\"$(git describe --tags --always)\"}" > micropython/ports/esp32/build-tildamk6/tidal.txt | |
- name: Archive firmware | |
uses: actions/upload-artifact@v3 | |
with: | |
name: firmware | |
path: | | |
micropython/ports/esp32/build-tildamk6/micropython.bin | |
micropython/ports/esp32/build-tildamk6/bootloader/bootloader.bin | |
micropython/ports/esp32/build-tildamk6/partition_table/partition-table.bin | |
micropython/ports/esp32/build-tildamk6/ota_data_initial.bin | |
micropython/ports/esp32/build-tildamk6/tidal.txt | |
- name: Create latest release for tags | |
uses: "marvinpinto/action-automatic-releases@latest" | |
if: github.event_name == 'push' | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "latest" | |
title: "Latest release build" | |
files: | | |
micropython/ports/esp32/build-tildamk6/micropython.bin | |
micropython/ports/esp32/build-tildamk6/tidal.txt | |
- name: Create specific release for tags | |
uses: "marvinpinto/action-automatic-releases@latest" | |
if: github.event_name == 'push' | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
files: | | |
micropython/ports/esp32/build-tildamk6/micropython.bin | |
micropython/ports/esp32/build-tildamk6/tidal.txt |