Skip to content

f/add mbed os support #23

f/add mbed os support

f/add mbed os support #23

Workflow file for this run

name: Build and Test mission-timer
on:
push:
branches:
- master
- main
paths-ignore:
- README.md
- LICENSE
pull_request:
branches:
- master
- main
paths-ignore:
- README.md
- LICENSE
jobs:
build-stm32:
name: Build mission-timer stm32
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Initialize and Update Submodules
run: |
git submodule update --init --force --depth=1
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc-arm-none-eabi binutils-arm-none-eabi ninja-build
pip3 install mbed-tools
- name: Cache mbed-os
id: cache-mbed-os
uses: actions/cache@v4
with:
path: external/mbed-os
key: mbed-os-${{ hashFiles('external/mbed-os.lib') }}
restore-keys: |
mbed-os-
- name: Install mbed-os (if not cached)
if: steps.cache-mbed-os.outputs.cache-hit != 'true'
working-directory: external
run: |
mbed-tools deploy
- name: Verify mbed-os folder
run: |
if [ ! -d external/mbed-os ]; then
echo "mbed-os not found in external/ directory. Ensure it exists or update the script."
exit 1
fi
- name: Configure mbed-os
run: |
mbed-tools configure -m NUCLEO_F429ZI -t GCC_ARM -o cmake-build/STM32F429ZI/mbed --mbed-os-path external/mbed-os
- name: Configure and build
run: |
cmake -S . -B cmake-build/STM32F429ZI -G Ninja -DPORT=STM32F429ZI -DPLATFORM=mbed-os
cmake --build cmake-build/STM32F429ZI
- name: Check for Binary
run: |
if [ ! -f cmake-build/STM32F429ZI/mission-timer.bin ]; then
echo "Binary not generated!"
exit 1
fi
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: mission-timer-stm32-binary
path: cmake-build/STM32F429ZI/mission-timer.bin
build-esp32:
name: Build mission-timer esp32
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v4
- name: Initialize and Update Submodules
run: |
git submodule update --init --force --depth=1
- name: Configure and build
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: v5.2.3
target: esp32
- name: Check for Binary
run: |
if [ ! -f build/mission-timer.bin ]; then
echo "Binary not generated"
exit 1
fi
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: mission-timer-esp32-binary
path: |
build/mission-timer.bin
build/bootloader/bootloader.bin
build/partition_table/partition-table.bin