OpenIris/.github/workflows/build_release_bins.yml
DaOfficialWizard 17e3049be1
feat: Code cleanup and initial implementation of improv
* feat: add improv

- add version to build flags
- add improv
- remove byte pointers from config calls

* ´fix: improve not initilizing in ADHOC mode

* feat: add wifihandler to observers

* refactor: move improv handler to top of loop

* refactor: minor refactor to callback

* refactor: minor refactor to callback

* refactor: trying to weed out the timeout issue

* refactor: trying to weed out the timeout issue

* refactor: total refactor to clean up code

-  clean up statemanagers
- fix observer
- fix bugs introducted by fixing the observer

BREAKING CHANGES

* refactor: minor logging refactor

* fix: add config save to delete method

* fix: improv provisioning error

* refactor: simplify library interface

- implement pass by reference for all objects
- implement get by reference for all objects
- remove passing state to classes
- migrate to range based for loops

BREAKING CHANGES

* fix: esp crash on wifi updates

- figure out why esp crashes sometimes when wifi config changes

* fix: add warning about clang-format to baseAPI.hpp

* refactor: update improv

* ci(ci-test): setup prerelease

- use ci to merge binaries for testing in etvr app

* fix: compile time error

* fix: compile time error

* fix folder names

* fix folder names

* fix: compile time error

* fix: compile time error

* feat: remove improv from main

- keep improv code, incase we fix issue later on
- comment out improv includes

* fix: remove pre-release from release cycle

* fix: resolve wifiState manager state in config

* fix: file name casing

* fix: file name casing

* feat: add custom string_view header

- it is the intention to implement string_view
- vastly reduce heap allocations and improve performance of strings

* refactor: move improv class to new branch

* fix: file name casing

* feat: add newer esp cam driver

* Cleanup after merge

---------

Co-authored-by: lorow <smykupyka@gmail.com>
2023-04-02 17:44:38 +02:00

147 lines
4.9 KiB
YAML

name: Build and Release the OpenIris bin files
on:
workflow_dispatch:
push:
tags:
- "v*"
branches:
- "master"
- "main"
- "feature/improv"
pull_request:
branches:
- "master"
- "main"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
build:
strategy:
fail-fast: false
matrix:
target_name:
[esp32AIThinker, esp32M5Stack, esp32Cam, esp_eye, wrover, wrovers3]
target_build_type: ["", _release] #, _OTA] # OTA is not needed
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
#- name: Cache pip
# uses: actions/cache@v3
# with:
# path: ~/.cache/pip
# key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
# restore-keys: ${{ runner.os }}-pip-
#- name: Cache PlatformIO
# uses: actions/cache@v3
# with:
# path: ~/.platformio
# key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
# restore-keys: |
# ${{ runner.os }}-pio-
#- name: Setup Python install
# uses: actions/setup-python@v4
# with:
# python-version: "3.x"
#- name: Install PlatformIO with Pip
# run: |
#
# python -m pip install --upgrade pip
# pip install distro
# pip install --upgrade platformio
# pio upgrade --dev
# pio pkg update --global
#- name: Update build command
# working-directory: ./ESP
# run: |
# sed -i '/\[env\]/p; s/\[env\]/upload_protocol = custom/' platformio.ini
- name: Build OpenIris Firmware
uses: addnab/docker-run-action@v3
with:
image: ghcr.io/zanzythebar/piodocker:latest
options: -v ${{ github.workspace }}:/workspace
run: |
cd ESP
export OPENIRIS_CI_BUILD=1
mkdir build
mkdir build/${{ matrix.target_name }}${{ matrix.target_build_type }}
echo "::group::pio run"
pio run --environment ${{ matrix.target_name }}${{ matrix.target_build_type }}
echo "::endgroup::"
echo "::group::create zip"
unzip -l 'build/${{ matrix.target_name }}${{ matrix.target_build_type }}/*.zip'
echo "::endgroup::"
echo "::group::copy firmware name file"
cp tools/firmware_name.txt build/${{ matrix.target_name }}${{ matrix.target_build_type }}/firmware_name.txt
echo "::endgroup::"
- name: Archive Firmware name File
# create an environment variable with the name of the firmware file by catting the firmware_name.txt file
run: |
echo "FIRMWARE_NAME=$(cat ESP/build/${{ matrix.target_name }}${{ matrix.target_build_type }}/firmware_name.txt)" >> $GITHUB_ENV
- name: Archive Firmware Binaries
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.target_name }}${{ matrix.target_build_type }}-firmware
#path: "./ESP/.pio/build/${{ matrix.target_name }}${{ matrix.target_build_type }}/${{ env.FIRMWARE_NAME }}.bin"
path: "ESP/build/${{ matrix.target_name }}${{ matrix.target_build_type }}/${{ env.FIRMWARE_NAME }}.zip"
retention-days: 5
if-no-files-found: error
release-openiris:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create Directory
run: mkdir -p build
- name: Download Firmware Files
uses: actions/download-artifact@v2
with:
path: build/
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install -g conventional-changelog-conventionalcommits
- run: npm install -g semantic-release@v19.0.5
- run: npm install -g @semantic-release/exec
- run: npm install -g @semantic-release/git
- run: npm install -g @semantic-release/release-notes-generator
- run: npm install -g @semantic-release/changelog
- run: npm install -g @semantic-release/github
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
sudo apt-get install -y jq
chmod +x ./repo-tools/scripts/prepareCMD.sh
semantic-release
cleanup:
strategy:
fail-fast: false
matrix:
target_name:
[esp32AIThinker, esp32M5Stack, esp32Cam, esp_eye, wrover, wrovers3]
target_build_type: ["", _release]
name: Cleanup actions
needs:
- release-openiris
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: "♻️ remove build artifacts"
uses: geekyeggo/delete-artifact@v1
with:
name: ${{ matrix.target_name }}${{ matrix.target_build_type }}-firmware