quick #2
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: quick | |
on: | |
workflow_dispatch: | |
inputs: | |
hw_version: | |
description: 'Hardware version' | |
required: true | |
default: 'hw1' | |
br_config: | |
description: 'BlueRetro config' | |
required: true | |
default: 'universal' | |
jobs: | |
build: | |
runs-on: darthcloud/idf-blueretro:v5.2.0_2023-10-09 | |
steps: | |
- name: Clone BlueRetroRoot | |
run: git clone https://github.com/darthcloud/BlueRetroRoot.git . | |
- name: Fetch submodules | |
run: git submodule update --init --recursive | |
- name: Checkout main repo | |
working-directory: ./BlueRetro | |
run: | | |
git fetch --force https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git "+refs/heads/*:refs/remotes/origin/*" | |
git fetch --force https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git "+refs/pull/*:refs/remotes/origin/pr/*" | |
git checkout ${{ github.sha }} || git checkout ${{ github.event.pull_request.head.sha }} | |
git submodule update --init --recursive | |
- name: Build with ESP-IDF | |
working-directory: ./BlueRetro | |
run: | | |
echo "br_version=$(git describe --always --tags --dirty)" >> $GITHUB_ENV | |
echo "$(git describe --always --tags --dirty) ${{ github.event.inputs.hw_version }} ${{ github.event.inputs.br_config }}" | cut -c -31 > version.txt | |
cat version.txt | |
cp configs/${{ github.event.inputs.hw_version }}/${{ github.event.inputs.br_config }} sdkconfig | |
BR_HW=_${{ github.event.inputs.hw_version }} BR_SYS=_${{ github.event.inputs.br_config }} idf.py build | |
env: | |
IDF_TOOLS_PATH : "/home/runner/work/BlueRetro/BlueRetro/BlueRetroRoot/" | |
- name: Copy OTA initial binary | |
working-directory: ./BlueRetro/build | |
run: | | |
mkdir ota | |
mv ota_data_initial.bin ota/ | |
- name: Upload artifact | |
uses: darthcloud/upload-artifact@v3node20 | |
with: | |
name: ${{ env.br_version }}_${{ github.event.inputs.hw_version }}_${{ github.event.inputs.br_config }} | |
path: | | |
BlueRetro/build/partition_table/partition-table.bin | |
BlueRetro/build/bootloader/bootloader.bin | |
BlueRetro/build/ota/ota_data_initial.bin | |
BlueRetro/build/BlueRetro*.bin | |
if-no-files-found: error |