adafruit_feather_esp32s3_tft-en_US-latest-custom-debug #5
This file contains hidden or 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 board (custom) | |
on: | |
workflow_dispatch: | |
inputs: | |
board: | |
description: 'Board: Found in ports/*/boards/[board_id]' | |
required: true | |
type: string | |
version: | |
description: 'Version: Can be a tag or a commit (>=8.1.0)' | |
required: false | |
default: latest | |
type: string | |
language: | |
description: 'Language: Found in locale/[language].po' | |
required: false | |
default: en_US | |
type: string | |
flags: | |
description: 'Flags: Build flags (e.g. CIRCUITPY_WIFI=1)' | |
required: false | |
type: string | |
branch: | |
description: 'Branch (only if Version="latest")' | |
required: false | |
default: 'main' | |
type: string | |
debug: | |
description: 'Make a debug build' | |
required: false | |
default: false | |
type: boolean | |
run-name: ${{ inputs.board }}-${{ inputs.language }}-${{ inputs.version }}${{ inputs.flags != '' && '-custom' || '' }}${{ inputs.debug && '-debug' || '' }} | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Set up repository | |
run: | | |
git clone --filter=tree:0 https://github.com/adafruit/circuitpython.git $GITHUB_WORKSPACE | |
- name: Checkout head / tag | |
env: | |
TAG: ${{ inputs.version == 'latest' && 'HEAD' || inputs.version }} | |
run: | | |
git checkout "$TAG" | |
- name: fork compatibility | |
if: github.repository_owner != 'adafruit' | |
env: | |
REPO: ${{ github.repository }} | |
run: | | |
git remote add fork "https://github.com/$REPO.git" | |
git fetch fork --filter=tree:0 | |
- name: branch compatibility | |
if: inputs.branch != 'main' && inputs.version == 'latest' && github.repository_owner == 'adafruit' | |
env: | |
BRANCH: ${{ inputs.branch }} | |
run: | | |
git checkout "$BRANCH" | |
- name: branch compatibility (fork) | |
if: inputs.branch != '' && inputs.version == 'latest' && github.repository_owner != 'adafruit' | |
env: | |
BRANCH: ${{ inputs.branch }} | |
run: | | |
git checkout -b fork-branch "fork/$BRANCH" | |
- name: Set up identifier | |
if: inputs.debug || inputs.flags != '' | |
run: | | |
> custom-build && git add custom-build | |
- name: Set up python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- name: Board to port | |
id: board-to-port | |
run: | | |
PORT=$(python tools/board_to_port.py "${{ inputs.board }}") | |
echo "port=$PORT" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Set up port | |
id: set-up-port | |
uses: ./.github/actions/deps/ports | |
with: | |
board: ${{ inputs.board }} | |
port: ${{ steps.board-to-port.outputs.port }} | |
- name: Set up submodules | |
id: set-up-submodules | |
uses: ./.github/actions/deps/submodules | |
with: | |
action: cache | |
target: ${{ inputs.board }} | |
- name: Set up external | |
uses: ./.github/actions/deps/external | |
with: | |
action: cache | |
port: ${{ steps.board-to-port.outputs.port }} | |
- name: Set up mpy-cross | |
if: steps.set-up-submodules.outputs.frozen == 'True' | |
uses: ./.github/actions/mpy_cross | |
with: | |
cp-version: ${{ steps.set-up-submodules.outputs.version }} | |
download: false | |
- name: Versions | |
run: | | |
python py/version.py | |
gcc --version | |
python3 --version | |
cmake --version || true | |
ninja --version || true | |
aarch64-none-elf-gcc --version || true | |
arm-none-eabi-gcc --version || true | |
xtensa-esp32-elf-gcc --version || true | |
riscv32-esp-elf-gcc --version || true | |
riscv64-unknown-elf-gcc --version || true | |
mkfs.fat --version || true | |
- name: Build board | |
env: | |
TRANSLATION: ${{ inputs.language }} | |
BOARD: ${{ inputs.board }} | |
FLAGS: ${{ inputs.flags }} | |
DEBUG: ${{ inputs.debug && '1' || '0' }} | |
run: make -j4 $FLAGS BOARD="$BOARD" DEBUG=$DEBUG TRANSLATION="$TRANSLATION" | |
working-directory: ports/${{ steps.board-to-port.outputs.port }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ inputs.board }}-${{ inputs.language }}-${{ inputs.version }}${{ inputs.flags != '' && '-custom' || '' }}${{ inputs.debug && '-debug' || '' }} | |
path: ports/${{ steps.board-to-port.outputs.port }}/build-${{ inputs.board }}/firmware.* |