Skip to content
This repository was archived by the owner on Apr 16, 2026. It is now read-only.

Merge pull request #277 from bareboat-necessities/codex/add-assert-fo… #10849

Merge pull request #277 from bareboat-necessities/codex/add-assert-fo…

Merge pull request #277 from bareboat-necessities/codex/add-assert-fo… #10849

Workflow file for this run

# see: https://github.com/marketplace/actions/test-compile-for-arduino
name: build
on: [push, pull_request]
jobs:
build:
name: build for MCU
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Compile sketch
uses: ArminJo/arduino-test-compile@v3
with:
arduino-board-fqbn: esp32:esp32:m5stack_atoms3:CDCOnBoot=cdc,USBMode=hwcdc
arduino-platform: esp32:esp32@3.3.5
platform-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
required-libraries: M5Unified@0.2.13,M5GFX@0.2.19,Eigen@0.3.2,Arduino_BMI270_BMM150@1.2.3
sketch-names: "*.ino"
sketch-names-find-start: bbn_*/*
extra-arduino-cli-args: "--warnings default --build-property compiler.libraries.ldflags=-Wl,--allow-multiple-definition --build-property compiler.cpp.extra_flag=-mvector --build-property compiler.cpp.extra_flag=-funroll-loops --build-property compiler.cpp.extra_flag=-fno-finite-math-only"
set-build-path: true
- name: Find versions
run: |
find /home/runner -name esptool\*
find /home/runner -name boot_app0.bin
ls -la /home/runner/
ls -l /home/runner/.arduino15/packages/esp32/tools/esptool_py/*
- name: Make merged .bin
run: >
$HOME/.arduino15/packages/esp32/tools/esptool_py/5.1.0/esptool
--chip esp32s3 merge_bin -o $HOME/work/bbn-wave-period-esp32/bbn-wave-period-esp32/bbn_wave_freq_m5atomS3/build/bbn_wave_freq_m5atomS3_firmware.bin
--flash_mode dio --flash_freq 80m --flash_size 8MB
0x0 "$HOME/work/bbn-wave-period-esp32/bbn-wave-period-esp32/bbn_wave_freq_m5atomS3/build/bbn_wave_freq_m5atomS3.ino.bootloader.bin"
0x8000 "$HOME/work/bbn-wave-period-esp32/bbn-wave-period-esp32/bbn_wave_freq_m5atomS3/build/bbn_wave_freq_m5atomS3.ino.partitions.bin"
0xe000 "$HOME/.arduino15/packages/esp32/hardware/esp32/3.3.5/tools/partitions/boot_app0.bin"
0x10000 "$HOME/work/bbn-wave-period-esp32/bbn-wave-period-esp32/bbn_wave_freq_m5atomS3/build/bbn_wave_freq_m5atomS3.ino.bin"
- name: Make zip
run: |
ls /home/runner/work/bbn-wave-period-esp32/bbn-wave-period-esp32/bbn_wave_freq_m5atomS3/build/*.bin /home/runner/work/bbn-wave-period-esp32/bbn-wave-period-esp32/bbn_wave_freq_m5atomS3/build/*.csv | zip bbn_wave_freq_m5atomS3_bin-$(date +%Y-%m-%d).zip -j -@
pwd
ls *.zip
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: bbn_wave_freq_m5atomS3_bin*.zip
tag: ${{ github.ref == 'refs/heads/main' && 'vTest' || github.ref }}
overwrite: true
file_glob: true
gen-plots:
runs-on: ubuntu-latest
steps:
- name: Generate Plots Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y make g++ libeigen3-dev texlive-xetex texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra texlive-fonts-extra dvipng
- name: Run host-side regression tests
run: |
cd "$HOME"/work/bbn-wave-period-esp32/bbn-wave-period-esp32/bbn_wave_freq_m5atomS3/tests
make check
make calibrate_imu_check
- name: Download sim data from vTest release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release download v1.0.3 --repo bareboat-necessities/oceanography-waves-lib --pattern "sim-data-files.zip" --clobber
- name: Unpack simulation data
run: |
unzip -o sim-data-files.zip -d "$HOME"/work/bbn-wave-period-esp32/bbn-wave-period-esp32/bbn_wave_freq_m5atomS3/data-sim
- name: Run downstream processing with simulation data
run: |
cd "$HOME"/work/bbn-wave-period-esp32/bbn-wave-period-esp32/bbn_wave_freq_m5atomS3/data-sim
make -j 4
chmod +x freq_track.sh sea_reg.sh qmekf_sim.sh w3d_sim_adapt_2.sh w3d_sim_adapt_3.sh
./freq_track.sh
./sea_reg.sh
./qmekf_sim.sh
./w3d_sim_adapt_2.sh
./w3d_sim_adapt_3.sh
- name: Move data files
run: |
mv "$HOME"/work/bbn-wave-period-esp32/bbn-wave-period-esp32/bbn_wave_freq_m5atomS3/data-sim/*.csv "$HOME"/work/bbn-wave-period-esp32/bbn-wave-period-esp32/bbn_wave_freq_m5atomS3/plots/
- name: Build code
run: |
cd "$HOME"/work/bbn-wave-period-esp32/bbn-wave-period-esp32/bbn_wave_freq_m5atomS3/plots
make -j 4
chmod +x *.sh
./gen_plots_data.sh
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- run: pip install mathplot matplotlib numpy pandas
- run: |
cd "$HOME"/work/bbn-wave-period-esp32/bbn-wave-period-esp32/bbn_wave_freq_m5atomS3/plots
chmod +x *.sh
./draw_plots.sh
python3 calibrate_imu_plots.py
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: plot-files
path: |
**/*.pgf
**/spectrum_*.png
build_latex:
needs: gen-plots
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download plots data
uses: actions/download-artifact@v4
with:
name: plot-files
- run: |
cp "$HOME"/work/bbn-wave-period-esp32/bbn-wave-period-esp32/bbn_wave_freq_m5atomS3/plots/*.pgf "$HOME"/work/bbn-wave-period-esp32/bbn-wave-period-esp32/bbn_wave_freq_m5atomS3/doc/
cp "$HOME"/work/bbn-wave-period-esp32/bbn-wave-period-esp32/bbn_wave_freq_m5atomS3/plots/*.png "$HOME"/work/bbn-wave-period-esp32/bbn-wave-period-esp32/bbn_wave_freq_m5atomS3/doc/
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v4
with:
root_file: "*.tex"
pre_compile: |
echo "openout_any = a" | tee -a $(kpsewhich texmf.cnf)
curl -L https://github.com/plantuml/plantuml/releases/download/v1.2025.4/plantuml.jar -o plantuml.jar && export PLANTUML_JAR=$(pwd)/plantuml.jar
curl -L https://mirrors.ctan.org/macros/luatex/latex/plantuml/plantuml.sty -o plantuml.sty
echo ">> Debug: TeX config patched, now checking PlantUML installation"
plantuml -version || true
java -version || true
work_in_root_file_dir: true
working_directory: bbn_wave_freq_m5atomS3/doc
latexmk_use_lualatex: true
latexmk_shell_escape: true
args: "-shell-escape"
extra_system_packages: "inkscape ghostscript graphviz ncurses openjdk11-jre"
env:
PLANTUML_JAR: ${{ github.workspace }}/bbn_wave_freq_m5atomS3/doc/plantuml.jar
- name: Debug
run: |
cd bbn_wave_freq_m5atomS3/doc
for f in *.log; do
echo "---- Checking $f ----"
grep -i "runsystem" "$f" || echo "No runsystem lines in $f"
done
- name: Upload PDF
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "**/*.pdf"
tag: ${{ github.ref == 'refs/heads/main' && 'vTest' || github.ref }}
overwrite: true
file_glob: true