Improved build scripting and CI (#123)

- Simplified board ids/naming in all build scripting
- Implemented archiving of build artifacts for all devices in pipelines (including symbols releases for debugging)
- Implemented building and archiving of SDK for esp32 and esp32s3 in pipelines
- Flattened SDK release folder structure
- Renamed "Tactility-(ARCH)-SDK" to "TactilitySDK-(ARCH)" (aligns with "default" folder name, that's without the (ARCH))
This commit is contained in:
Ken Van Hoeylandt 2024-12-14 22:51:47 +01:00 committed by GitHub
parent a18221db08
commit f664de898d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 90 additions and 32 deletions

View File

@ -1,10 +1,7 @@
name: Build
inputs:
board-name:
description: The name of the board
required: true
sdkconfig:
board_id:
description: The sdkconfig file to build
required: true
arch:
@ -19,16 +16,25 @@ runs:
submodules: recursive
- name: 'Board select'
shell: bash
run: cp ${{ inputs.sdkconfig }} sdkconfig
run: cp sdkconfig.board.${{ inputs.board_id }} sdkconfig
- name: 'Build'
uses: espressif/esp-idf-ci-action@main
with:
esp_idf_version: v5.3.1
target: ${{ inputs.arch }}
path: './'
- name: 'Upload Artifact'
- name: 'Release'
shell: bash
run: Buildscripts/release.sh ${{ inputs.board_id }}
- name: 'Upload Artifact: Release'
uses: actions/upload-artifact@v4
with:
name: tactility-${{ inputs.board-name }}
path: build/Tactility.bin
name: tactility-${{ inputs.board_id }}
path: release/Tactility-${{ inputs.board_id }}
retention-days: 5
- name: 'Upload Artifact: Release symbols'
uses: actions/upload-artifact@v4
with:
name: tactility-${{ inputs.board_id }}-symbols
path: release/Tactility-${{ inputs.board_id }}-symbols
retention-days: 5

34
.github/actions/build-sdk/action.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: Build
inputs:
board_id:
description: The sdkconfig file to build
required: true
arch:
description: The ESP32 SOC variant
required: true
runs:
using: "composite"
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: 'Board select'
shell: bash
run: cp sdkconfig.board.${{ inputs.board_id }} sdkconfig
- name: 'Build'
uses: espressif/esp-idf-ci-action@main
with:
esp_idf_version: v5.3.1
target: ${{ inputs.arch }}
path: './'
- name: 'Release'
shell: bash
run: Buildscripts/release-sdk.sh release/TactilitySDK
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: TactilitySDK-${{ inputs.arch }}
path: release/TactilitySDK
retention-days: 5

View File

@ -11,8 +11,7 @@ jobs:
- name: "Build"
uses: ./.github/actions/build-firmware
with:
board-name: yellowboard
sdkconfig: sdkconfig.board.yellow_board
board_id: yellow-board
arch: esp32
lilygo-tdeck:
runs-on: ubuntu-latest
@ -21,8 +20,7 @@ jobs:
- name: "Build"
uses: ./.github/actions/build-firmware
with:
board-name: lilygotdeck
sdkconfig: sdkconfig.board.lilygo_tdeck
board_id: lilygo-tdeck
arch: esp32s3
m5stack-core2:
runs-on: ubuntu-latest
@ -31,8 +29,7 @@ jobs:
- name: "Build"
uses: ./.github/actions/build-firmware
with:
board-name: m5stackcore2
sdkconfig: sdkconfig.board.m5stack_core2
board_id: m5stack-core2
arch: esp32
m5stack-cores3:
runs-on: ubuntu-latest
@ -41,6 +38,5 @@ jobs:
- name: "Build"
uses: ./.github/actions/build-firmware
with:
board-name: m5stackcores3
sdkconfig: sdkconfig.board.m5stack_cores3
board_id: m5stack-cores3
arch: esp32s3

24
.github/workflows/build-sdk.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: Build SDK
on: [push]
permissions: read-all
jobs:
esp32:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Build"
uses: ./.github/actions/build-sdk
with:
board_id: yellow-board
arch: esp32
esp32s3:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Build"
uses: ./.github/actions/build-sdk
with:
board_id: lilygo-tdeck
arch: esp32s3

View File

@ -14,21 +14,21 @@ function releaseSdk() {
SECONDS=0
build lilygo_tdeck
release lilygo_tdeck
build lilygo-tdeck
release lilygo-tdeck
releaseSdk release/Tactility-ESP32S3-SDK/TactilitySDK
releaseSdk release/TactilitySDK-esp32s3
build yellow_board
release yellow_board
build yellow-board
release yellow-board
releaseSdk release/Tactility-ESP32-SDK/TactilitySDK
releaseSdk release/TactilitySDK-esp32
build m5stack_core2
release m5stack_core2
build m5stack-core2
release m5stack-core2
build m5stack_cores3
release m5stack_cores3
build m5stack-cores3
release m5stack-cores3
duration=$SECONDS

View File

@ -2,7 +2,7 @@
#
# Usage: build.sh [boardname]
# Example: build.sh lilygo_tdeck
# Example: build.sh lilygo-tdeck
# Description: Makes a clean build for the specified board.
#

View File

@ -1,6 +1,5 @@
#!/bin/sh
rm -rf build
rm -rf build-sim
rm -rf cmake-*

View File

@ -2,7 +2,7 @@
#
# Usage: release.sh [boardname]
# Example: release.sh lilygo_tdeck
# Example: release.sh lilygo-tdeck
# Description: Releases the current build labeled as a release for the specified board name.
#
@ -40,7 +40,6 @@ release() {
}
board=$1
board_clean=${board/_/-}
release_path=release
if [ $# -lt 1 ]; then
@ -51,5 +50,5 @@ if [ ! -f $sdkconfig_file ]; then
fatalError "Board not found: ${sdkconfig_file}"
fi
release "${release_path}/Tactility-${board_clean}"
releaseSymbols "${release_path}/Tactility-${board_clean}-symbols"
release "${release_path}/Tactility-${board}"
releaseSymbols "${release_path}/Tactility-${board}-symbols"