Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,25 @@ jobs:

runs-on: ubuntu-latest

strategy:
matrix:
build:
- path: '.'
target: esp32s3
command: |
idf.py -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.test_stand" build
- path: '.'
target: esp32s3
command: |
idf.py -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.motorgo" build
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Build Examples
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: release-v5.2
target: esp32s3
path: '.'
esp_idf_version: release-v5.4
target: ${{ matrix.build.target }}
path: ${{ matrix.build.path }}
command: ${{ matrix.build.command }}
58 changes: 45 additions & 13 deletions .github/workflows/package_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,76 @@ on:
branches: [main]
release:
types: [published]
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest
continue-on-error: false

strategy:
matrix:
build:
- name: 'tinys3_test_stand'
path: '.'
target: esp32s3
command: |
idf.py -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.test_stand" build
- name: 'motorgo'
path: '.'
target: esp32s3
command: |
idf.py -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.motorgo" build

steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Build Main Code
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: release-v5.2
target: esp32s3
path: '.'
command: 'idf.py build'
esp_idf_version: release-v5.4
target: ${{ matrix.build.target }}
path: ${{ matrix.build.path }}
command: ${{ matrix.build.command }}

- name: Upload Build Outputs
uses: actions/upload-artifact@v4
with:
name: build-artifacts
name: ${{ matrix.build.name }}-build-artifacts
path: |
build/*.bin
build/*.elf
build/bootloader/bootloader.bin
build/partition_table/partition-table.bin
build/bldc_test_stand.bin
build/flasher_args.json
build/flash_args

- name: Zip up files for upload to release
if: ${{ github.event.release && github.event.action == 'published' }}
shell: bash
run: |
cd build
zip -r ../${{ matrix.build.name }}.zip *.bin *.elf bootloader/bootloader.bin partition_table/partition-table.bin flasher_args.json flash_args
cd ..

- name: Attach files to release
uses: softprops/action-gh-release@v2
if: ${{ github.event.release && github.event.action == 'published' }}
with:
files: |
build/bldc_test_stand.bin
build/bootloader/bootloader.bin
build/partition_table/partition-table.bin
build/flash_args
files: ${{ matrix.build.name }}.zip

package:
name: Package the binaries into an executables for Windows, MacOS, and Linux (Ubuntu)
needs: build
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
build: ['tinys3_test_stand', 'motorgo']
runs-on: ${{ matrix.os }}
steps:
- uses: esp-cpp/esp-packaged-programmer-action@v1.0.5
with:
zipfile-name: ${{ matrix.build }}-build-artifacts
programmer-name: 'software-defined-haptics-${{ matrix.build }}_programmer'
8 changes: 3 additions & 5 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Run static analysis
uses: esp-cpp/StaticAnalysis@master
with:
# Do not build the project and do not use cmake to generate compile_commands.json
use_cmake: false

# Use the 5.2 release version since it's what we build with
esp_idf_version: release/v5.2
# Use the 5.4 release version since it's what we build with
esp_idf_version: release/v5.4

# (Optional) cppcheck args
cppcheck_args: -i$GITHUB_WORKSPACE/components/espp --force --enable=all --inline-suppr --inconclusive --platform=mips32 --std=c++17 --suppressions-list=$GITHUB_WORKSPACE/suppressions.txt
cppcheck_args: --check-level=exhaustive --force --enable=all --inline-suppr --inconclusive --platform=mips32 --std=c++17 --suppressions-list=$GITHUB_WORKSPACE/suppressions.txt
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@
build/
sdkconfig
sdkconfig.old
managed_components/
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "components/espp"]
path = components/espp
url = git@github.com:esp-cpp/espp
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# The following lines of boilerplate have to be in your project's CMakeLists
# in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.20)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)

# add the component directories that we want to use
set(EXTRA_COMPONENT_DIRS
"components/"
"components/espp/components/"
)

set(
Expand Down
1 change: 0 additions & 1 deletion components/espp
Submodule espp deleted from f7c502
1 change: 1 addition & 0 deletions components/tinys3_test_stand/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
idf_component_register(
INCLUDE_DIRS "include"
SRC_DIRS "src"
REQUIRES base_component filters math mt6701 pid bldc_driver bldc_motor i2c
)
23 changes: 23 additions & 0 deletions components/tinys3_test_stand/idf_component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## IDF Component Manager Manifest File
dependencies:
## Required IDF version
idf:
version: '>=4.1.0'
# # Put list of dependencies here
# # For components maintained by Espressif:
# component: "~1.0.0"
# # For 3rd party components:
# username/component: ">=1.0.0,<2.0.0"
# username2/component2:
# version: "~1.0.0"
# # For transient dependencies `public` flag can be set.
# # `public` flag doesn't have an effect dependencies of the `main` component.
# # All dependencies of `main` are public by default.
# public: true
espp/filters: '>=1.0'
espp/math: '>=1.0'
espp/mt6701: '>=1.0'
espp/pid: '>=1.0'
espp/bldc_driver: '>=1.0'
espp/bldc_motor: '>=1.0'
espp/i2c: '>=1.0'
Loading
Loading